showCallOverlay method
void
showCallOverlay()
Hiển thị overlay call full màn
Implementation
void showCallOverlay() {
const overlayId = "call_overlay";
if (FlutterOverlayManager.I.isOverlayShowing(overlayId)) return;
FlutterOverlayManager.I.show(
(context) {
return Stack(
children: [
// Background mờ full màn
Positioned.fill(
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
hideCallOverlay();
},
child: Container(color: Colors.black54),
),
),
// Màn CallingScreen bọc BlocProvider
Center(
child: BlocProvider.value(
value: _bloc, // instance của SipControllerBloc
child: const CallingScreen(),
),
),
],
);
},
id: overlayId,
zindex: 1,
backgroundColor: Colors.transparent,
dismissible: false,
);
}