showCallOverlay method
void
showCallOverlay()
Displays the full-screen call overlay UI.
This includes dimmed background + CallingScreen. The overlay is non-dismissible unless manually hidden via hideCallOverlay.
Implementation
void showCallOverlay() {
const overlayId = "call_overlay";
if (FlutterOverlayManager.I.isOverlayShowing(overlayId)) return;
FlutterOverlayManager.I.show(
(context) {
return Stack(
children: [
// Transparent touch-dismiss layer
Positioned.fill(
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () => hideCallOverlay(),
child: Container(color: Colors.black54),
),
),
// Centered calling UI wrapped in BlocProvider
Center(
child: BlocProvider.value(
value: _bloc,
child: const CallingScreen(),
),
),
],
);
},
id: overlayId,
zindex: 1,
backgroundColor: Colors.transparent,
dismissible: false,
);
}