CometChatIncomingCall class

CometChatIncomingCall is a widget which is used to display incoming call. When the logged in user receives a call, this widget will be invoked.

CometChatIncomingCall(
  call: call,
  user: user,
  subtitle: 'Incoming Call',
  declineButtonText: 'Decline',
  declineButtonTextStyle: TextStyle(color: Colors.white),
  declineButtonIconUrl: 'assets/images/decline.png',
  declineButtonIconUrlPackage: 'assets',
  acceptButtonText: 'Accept',
  acceptButtonTextStyle: TextStyle(color: Colors.white),
);
Inheritance

Constructors

CometChatIncomingCall({Key? key, required Call call, User? user, OnError? onError, dynamic onDecline(BuildContext, Call)?, dynamic onAccept(BuildContext, Call)?, bool? disableSoundForCalls, String? customSoundForCalls, String? customSoundForCallsPackage, CometChatIncomingCallStyle? incomingCallStyle, SessionSettingsBuilder? callSettingsBuilder, double? height, double? width, String? declineButtonText, String? acceptButtonText, Widget? callIcon, Widget? titleView(BuildContext context, Call call)?, Widget? subTitleView(BuildContext context, Call call)?, Widget? leadingView(BuildContext context, Call call)?, Widget? itemView(BuildContext context, Call call)?, Widget? trailingView(BuildContext context, Call call)?, IncomingCallBloc? incomingCallBloc})
const

Properties

acceptButtonText String?
acceptButtonText is used to set a custom accept text
final
call Call
call active Call object
final
callIcon Widget?
callIcon is used to set a custom call icon
final
callSettingsBuilder SessionSettingsBuilder?
sessionSettingsBuilder is used to set the session settings (V5)
final
customSoundForCalls String?
customSoundForCalls is used to define the custom sound for calls.
final
customSoundForCallsPackage String?
customSoundForCallsPackage is used to define the custom sound for calls.
final
declineButtonText String?
declineButtonText is used to set a custom decline text
final
disableSoundForCalls bool?
disableSoundForCalls is used to define whether to disable sound for call or not.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
height is used to set the height of the widget.
final
incomingCallBloc IncomingCallBloc?
incomingCallBloc Optional external IncomingCallBloc instance. If provided, this bloc will be used instead of creating a new one internally.
final
incomingCallStyle CometChatIncomingCallStyle?
incomingCallStyle is used to set a custom incoming call style
final
itemView Widget? Function(BuildContext context, Call call)?
itemView is used to define the item view.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingView Widget? Function(BuildContext context, Call call)?
leadingView is used to define the leading view.
final
onAccept → dynamic Function(BuildContext, Call)?
onAccept is called when the call is accepted
final
onDecline → dynamic Function(BuildContext, Call)?
onDecline is called when the call is declined
final
onError OnError?
onError is called when some error occurs
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subTitleView Widget? Function(BuildContext context, Call call)?
subTitleView is used to define the subtitle view.
final
titleView Widget? Function(BuildContext context, Call call)?
titleView is used to define the title view.
final
trailingView Widget? Function(BuildContext context, Call call)?
trailingView is used to define the trailing view.
final
user User?
user is used to set a custom user for the widget
final
width double?
width is used to set the width of the widget.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CometChatIncomingCall>
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, int wrapWidth = 65}) 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