Fix snackbar in host/join dialog #9

Merged
marco merged 2 commits from fix-dialog-snackbar into master 2024-02-05 09:48:30 +00:00
Showing only changes of commit 9f64959498 - Show all commits

View File

@ -59,27 +59,26 @@ class _LobbySelectorState extends State<LobbySelector> {
Future<void> buildJoinOrHostDialog(BuildContext context) {
return showDialog<void>(
context: context,
builder: (BuildContext builderContext) {
builder: (BuildContext context) {
return Scaffold(
body: AlertDialog(
title: const Text('Host or join?'),
actions: <Widget>[
TextButton(
child: const Text('Cancel'),
onPressed: () => builderContext.pop(),
onPressed: () => context.pop(),
),
TextButton(
child: const Text('Host'),
onPressed: () {
builderContext.pop(); //close dialog before going to host
builderContext.goNamed('host');
context.pop(); //close dialog before going to host
context.goNamed('host');
}),
TextButton(
child: const Text('Join'),
onPressed: () {
builderContext
.pop(); //close dialog before going to next dialog
buildEnterPassphraseDialog(builderContext);
context.pop(); //close dialog before going to next dialog
buildEnterPassphraseDialog(context);
},
),
],