CallScreenOverlay class
Launches CometChatOngoingCall in a completely isolated widget tree (its own MaterialApp inside an OverlayEntry).
This decouples the call screen from the host app's navigation stack:
- Own Navigator: the call screen is not one of the app's routes (while it is up, a pop entry on the app's top route keeps back off the app's screens: see show)
- Own BuildContext — no dependency on the app's widget tree
- Own theme; the app's language (the locale of the app's navigator)
Usage:
// Show the call screen
CallScreenOverlay.show(
sessionId: 'abc123',
sessionSettingsBuilder: SessionSettingsBuilder()..setLayout(LayoutType.tile),
);
// Dismiss when the call ends
CallScreenOverlay.dismiss(sessionId: 'abc123');
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
dismiss(
{String? sessionId}) → void - Dismiss the call screen overlay. Safe to call when nothing is showing.
-
show(
{required String sessionId, required SessionSettingsBuilder sessionSettingsBuilder, CallWorkFlow? callWorkFlow, OnError? onError}) → void - Show the ongoing call screen in an isolated overlay.