alan_voice 0.6.7 copy "alan_voice: ^0.6.7" to clipboard
alan_voice: ^0.6.7 copied to clipboard

outdated

Alan voice plugin

alan_voice #

Alan voice plugin

About #

This plugin helps you to integrate Alan voice experience into your Flutter app

Quickstart #

Add Alan Voice dependency to your app

your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
    ...
    
  alan_voice: 0.5.0    

We will use Flutter sample app from here: https://github.com/nisrulz/flutter-examples/tree/master/stateful_widget

Clone this repo and open main.dart file.

First add alan_voice package dependency

import 'package:alan_voice/alan_voice.dart';

Than locate MyButtonState class 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
    AlanVoice.initButton("8e0b083e795c924d64635bba9c3571f42e956eca572e1d8b807a3e2338fdd0dc/stage");

    setState(() {
      _enabled = false;
    });
}

And now modify main widget:

  1. locate this string
new Text(displayedString, style: new TextStyle(fontSize: 40.0)),

and change it to

new Text("Alan voice example", style: new TextStyle(fontSize: 40.0)),
  1. locate following line in the RaisedButton widget params:
onPressed: onPressOfButton

and change it to

onPressed: _initAlanButton
  1. That's it. Now run your app and press the button!

See: https://docs-stage.alan.app/docs/intro.html for more info.

106
likes
0
pub points
88%
popularity

Publisher

unverified uploader

Alan voice plugin

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on alan_voice