:drunk: Add call overlay

This commit is contained in:
2025-05-26 01:52:08 +08:00
parent fed8171b36
commit 6b4189a93b
4 changed files with 49 additions and 16 deletions

View File

@ -42,9 +42,32 @@ class CallScreen extends HookConsumerWidget {
appBar: AppBar(
leading: PageBackButton(
onWillPop: () {
callNotifier.disconnect().then((_) {
callNotifier.dispose();
});
showDialog<void>(
context: context,
builder: (context) {
return AlertDialog(
content: const Text(
'Do you want to leave the call or leave it in background?',
),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text('In Background'),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
await callNotifier.disconnect();
callNotifier.dispose();
},
child: const Text('Leave'),
),
],
);
},
);
},
),
title: Column(