fw_ava_flutter_sdk 0.0.2 fw_ava_flutter_sdk: ^0.0.2 copied to clipboard
Flutter plugin for Firework Ava SDK, which supports integrating AI Digital Humans into Flutter Apps
fw_ava_flutter_sdk #
Get Started #
1. Prerequisites #
// flutter
Flutter SDK ">=3.0.0"
Dart SDK ">=2.17.0 <4.0.0"
// iOS
iOS 14 or greater.
// Android
minSdkVersion 23 or greater
2. Microphone Permission Configuration #
To enable audio interaction with Ava, configure microphone permissions:
iOS
- Add
NSMicrophoneUsageDescription
in yourinfo.plist
Android
- None
3. Initialize the SDK #
Initialize the SDK with your avaId:
FwAvaFlutterSdkInitializer.init(avaId: "yourAvaID");
Note: Initialize the SDK before using
AvaCard
orAvaFloatingButton
. An invalidavaId
will throw anIllegalArgumentAvaException
, and attempting to use these components without initializing the SDK will result in aNotInitializedAvaException
.
4. Configure Localization #
Add localization support to your App:
MaterialApp(
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate, // Add Material localizations delegate
AvaLocalizations.delegate, // Add ava localizations delegate
],
supportedLocales: [
...AvaLocalizations.supportedLocales, // Add ava supported locales
],
……
);
5. Add AvaCard and AvaFloatingButton #
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
……
home: Scaffold(
……
body: const Center(
child: Padding(
child: AvaCard(), // Add AvaCard
),
),
floatingActionButton: const AvaFloatingButton(), // Add AvaFloatingButton
),
);
}
}
Demo Screenshots #