sense_the_rythm

rythm game for ESense Earable
git clone git://source.orangerot.dev:/university/sense_the_rythm.git
Log | Files | Refs | README | LICENSE

esense_not_connected_dialog.dart (936B)


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