ZegoSendCallInvitationButton class

This button is used to send a call invitation to one or more specified users.

You can provide a target user list invitees and specify whether it is a video call isVideoCall. If it is not a video call, it defaults to an audio call. You can also pass additional custom data customData to the invitees. If you want to set a custom ringtone for the offline call invitation, set resourceID to a value that matches the push resource ID in the ZEGOCLOUD management console. Please note that the resourceID will only take effect when ZegoUIKitPrebuiltCallInvitationService.init.notifyWhenAppRunningInBackgroundOrQuit is set to true. You can also set the notification title notificationTitle and message notificationMessage. If the call times out, the call will automatically hang up after the specified timeout period timeoutSeconds (in seconds).

Inheritance

Constructors

ZegoSendCallInvitationButton({Key? key, required List<ZegoUIKitUser> invitees, required bool isVideoCall, String? callID, String customData = '', Future<bool> onWillPressed()?, void onPressed(String code, String message, List<String>)?, String? resourceID, String? notificationTitle, String? notificationMessage, Size? buttonSize, double? borderRadius, ButtonIcon? icon, Size? iconSize, bool iconVisible = true, String? text, TextStyle? textStyle, double? iconTextSpacing, bool verticalLayout = true, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, int timeoutSeconds = 60, Color? clickableTextColor = Colors.black, Color? unclickableTextColor = Colors.black, Color? clickableBackgroundColor = Colors.transparent, Color? unclickableBackgroundColor = Colors.transparent})
const

Properties

borderRadius double?
The radius of the button.
final
buttonSize Size?
The size of the button.
final
callID String?
you can specify the call ID. If not provided, the system will generate one automatically based on certain rules.
final
clickableBackgroundColor Color?
The background color when the button is clickable.
final
clickableTextColor Color?
The text color when the button is clickable.
final
customData String
Custom data to be passed to the invitee.
final
hashCode int
The hash code for this object.
no setterinherited
icon ButtonIcon?
The icon widget for the button.
final
iconSize Size?
The size of the icon.
final
iconTextSpacing double?
The spacing between the icon and text.
final
iconVisible bool
final
invitees List<ZegoUIKitUser>
The list of invitees to send the call invitation to.
final
isVideoCall bool
Determines whether the call is a video call. If false, it is an audio call by default.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
padding of button
final
notificationMessage String?
The message for the notification.
final
notificationTitle String?
The title for the notification.
final
onPressed → (void Function(String code, String message, List<String>)?)
Callback function that is executed when the button is pressed.
final
onWillPressed → (Future<bool> Function()?)
send call invitation if return true, false will do nothing
final
padding EdgeInsetsGeometry?
padding of button
final
resourceID String?
The resource id for notification which same as Zego Console
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
The text displayed on the button.
final
textStyle TextStyle?
The text style for the button text.
final
timeoutSeconds int
The timeout duration in seconds for the call invitation.
final
unclickableBackgroundColor Color?
The background color when the button is unclickable.
final
unclickableTextColor Color?
The text color when the button is unclickable.
final
verticalLayout bool
Determines whether the layout is vertical or horizontal.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ZegoSendCallInvitationButton>
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