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
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:fw_ava_flutter_sdk/fw_ava_flutter_sdk.dart';
void main() {
FwAvaFlutterSdkInitializer.init(avaId: "xxxxx");
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
AvaLocalizations.delegate, // Add ava localizations delegates.
],
supportedLocales: [
...AvaLocalizations.supportedLocales, // Add ava supported locales.
],
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: const Center(
child: Padding(
padding: EdgeInsets.all(20),
child: AvaCard(),
),
),
floatingActionButton: const AvaFloatingButton(),
),
);
}
}