ZegoUIKitPrebuiltCallMiniOverlayPage class

The page can be minimized within the app

To support the minimize functionality in the app:

  1. Add a minimize button.
ZegoUIKitPrebuiltCallConfig.topMenuBar.buttons.add(ZegoCallMenuBarButtonName.minimizingButton)

Alternatively, if you have defined your own button, you can call:

ZegoUIKitPrebuiltCallController().minimize.minimize().
  1. Nest the ZegoUIKitPrebuiltCallMiniOverlayPage within your MaterialApp widget. Make sure to return the correct context in the contextQuery 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 ZegoUIKitPrebuiltCallMiniPopScope(
        child: HomePage(),
      ),
      navigatorKey: widget.navigatorKey,
      builder: (BuildContext context, Widget? child) {
        return Stack(
          children: [
            child!,

            /// support minimizing
            ZegoUIKitPrebuiltCallMiniOverlayPage(
              contextQuery: () {
                return widget.navigatorKey.currentState!.context;
              },
            ),
          ],
        );
      },
    );
  }
}
Inheritance

Constructors

ZegoUIKitPrebuiltCallMiniOverlayPage({Key? key, required BuildContext contextQuery(), bool rootNavigator = true, bool navigatorWithSafeArea = true, Size? size, Offset topLeft = const Offset(100, 100), double borderRadius = 6.0, Color borderColor = Colors.black12, Color soundWaveColor = const Color(0xff2254f6), double padding = 0.0, bool showDevices = true, bool showUserName = true, bool showLeaveButton = true, Widget? leaveButtonIcon, Widget? foreground, Widget builder(ZegoUIKitUser? activeUser)?, ZegoAudioVideoViewForegroundBuilder? foregroundBuilder, ZegoAudioVideoViewBackgroundBuilder? backgroundBuilder, ZegoAvatarBuilder? avatarBuilder})
const

Properties

avatarBuilder ZegoAvatarBuilder?
final
backgroundBuilder ZegoAudioVideoViewBackgroundBuilder?
final
borderColor Color
final
borderRadius double
final
builder Widget Function(ZegoUIKitUser? activeUser)?
final
contextQuery BuildContext Function()
You need to return the context of NavigatorState in this callback
final
foreground Widget?
final
foregroundBuilder ZegoAudioVideoViewForegroundBuilder?
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leaveButtonIcon Widget?
final
final
padding double
final
rootNavigator bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDevices bool
final
showLeaveButton bool
final
showUserName bool
final
size Size?
final
soundWaveColor Color
final
topLeft Offset
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → ZegoUIKitPrebuiltCallMiniOverlayPageState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited