Powered by Algolia

Alan Flutter Framework

The Alan Flutter plugin helps you to integrate your voice experience and Alan Studio script into your Flutter app

Getting Started

  1. Add Alan Voice dependency to your app

your pubspec.yaml file:

    sdk: flutter

  alan_voice: 0.5.0    
  1. Clone the Flutter sample application repository and open main.dart file.

First add alanvoice_ package dependency

import 'package:alan_voice/alan_voice.dart';
  1. Locate the MyButtonState class and remove everything from it and paste following code:
class MyButtonState extends State<MyButton> {
  bool _enabled = true; //start button state

  void _initAlanButton() async {
    //init Alan with sample project id

    setState(() {
      _enabled = false;
  1. Now, we need to modify main widget. Locate this section of the code:
new Text(displayedString, style: new TextStyle(fontSize: 40.0)),

and replace it with:

new Text("Alan voice example", style: new TextStyle(fontSize: 40.0)),
  1. Next, locate the section of code in the RaisedButton widget params:

    onPressed: onPressOfButton

and replace it with:

onPressed: _initAlanButton

That's it. Now run your app and press the button!