Components topic
ZegoUIKitPrebuiltLiveAudioRoomMiniOverlayPage && ZegoUIKitPrebuiltLiveAudioRoomMiniPopScope
The page can be minimized within the app
To support the minimize functionality in the app:
- Add a minimize button.
ZegoUIKitPrebuiltLiveAudioRoomConfig.topMenuBar.buttons.add(ZegoLiveAudioRoomMenuBarButtonName.minimizingButton)
Alternatively, if you have defined your own button, you can call:
ZegoUIKitPrebuiltLiveAudioRoomController().minimize.minimize().
- Nest the
ZegoUIKitPrebuiltLiveAudioRoomMiniOverlayPage
within your MaterialApp widget. Make sure to return the correct context in thecontextQuery
parameter.How to add in MaterialApp, example:
void main() { WidgetsFlutterBinding.ensureInitialized(); final navigatorKey = GlobalKey<NavigatorState>(); runApp(MyApp( navigatorKey: navigatorKey, )); } class MyApp extends StatefulWidget { final GlobalKey<NavigatorState> navigatorKey; const MyApp({ required this.navigatorKey, Key? key, }) : super(key: key); @override State<StatefulWidget> createState() => MyAppState(); } class MyAppState extends State<MyApp> { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: const ZegoUIKitPrebuiltLiveAudioRoomMiniPopScope( child: HomePage(), ), navigatorKey: widget.navigatorKey, builder: (BuildContext context, Widget? child) { return Stack( children: [ child!, /// support minimizing ZegoUIKitPrebuiltLiveAudioRoomMiniOverlayPage( contextQuery: () { return widget.navigatorKey.currentState!.context; }, ), ], ); }, ); } }
Classes
- ZegoUIKitPrebuiltLiveAudioRoom APIs Events Configs Components Migration_v3.x
- Live Audio Room Widget. You can embed this widget into any page of your project to integrate the functionality of a audio chat room. You can refer to our documentation, or our sample code.
- ZegoUIKitPrebuiltLiveAudioRoom APIs Events Configs Components Migration_v3.x
- Live Audio Room Widget. You can embed this widget into any page of your project to integrate the functionality of a audio chat room. You can refer to our documentation, or our sample code.