blob: 32d1d6bd3ae41237e0635daeb909369fa5eb2aad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
import 'package:flutter/material.dart';
class ESenseNotConnectedDialog extends StatelessWidget {
const ESenseNotConnectedDialog(
{super.key, required this.onCancel, required this.onContinue});
final VoidCallback onCancel;
final VoidCallback onContinue;
@override
Widget build(BuildContext context) {
return AlertDialog(
title: const Text("ESense not connected"),
content: const Text(
"You will only be able to play with the arrow keys of an external keyboard. "),
actions: <Widget>[
TextButton(
onPressed: () {
Navigator.pop(context, 'Cancel');
onCancel();
},
child: const Text('Connect to ESense'),
),
TextButton(
onPressed: () {
Navigator.pop(context, 'Cancel');
onContinue();
},
child: const Text('Continue anyway'),
),
],
);
}
}
|