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