35 lines
936 B
Dart
35 lines
936 B
Dart
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'),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|