Alan Flutter Framework
Available on Android and iOS platforms.
The Alan Flutter plugin helps you to integrate your voice experience and Alan Studio script into your Flutter app.
Integrating with Alan
To integrate a Flutter app with Alan:
-
In the
pubspec.yaml
file of your Flutter project, add the Alan voice dependency://pubspec.yaml file ... dependencies: flutter: sdk: flutter ... alan_voice: 2.0.13
-
Open the
main.dart
file and at the top of it, add thealan_voice
package dependency://main.dart file ... import 'package:alan_voice/alan_voice.dart';
-
In the
_MyHomePageState
class, add the method for initializing the Alan button://main.dart file ... class _MyHomePageState extends State<MyHomePage> { ... _MyHomePageState() { //init Alan with sample project id AlanVoice.addButton( "", buttonAlign: AlanVoice.BUTTON_ALIGN_LEFT); } ...
-
In Alan Studio, go to Integrations, copy the value from the Alan SDK Key field and insert this value in the quotes.
//main.dart file ... class _MyHomePageState extends State<MyHomePage> { ... _MyHomePageState() { //init Alan with sample project id AlanVoice.addButton( "314203787ccd9370974f1bf6b6929c1b2e956eca572e1d8b807a3e2338fdd0dc/prod", buttonAlign: AlanVoice.BUTTON_ALIGN_LEFT); } ...
That's it. Now you can run the app, tap the Alan button and start interacting with Alan.
Trying Alan sample apps
In our GitHub repository, you can find sample Flutter apps already integrated with Alan. Download these apps to get an idea of how you can voice-enable your app and synchronize your GUI with the voice UX.
- Alan simple app: an example demonstrating how to integrate Alan with a Flutter app
- Flutter Shrine app: a shopping app with a voice interface synchronized with the app visual elements
What's next?
You can now proceed to building a voice interface with Alan. Use the following resources:
-
Read tutorials on Flutter:
- Go to Server API to learn about Alan concepts and functionality you can use to create a voice script.