Revert erroneous refactor

This commit is contained in:
Marco 2024-02-05 10:39:01 +01:00
parent ba478fedca
commit 9f64959498

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);
},
),
],