import 'package:flutter/material.dart'; import 'package:mobileeventlog/datamodel.dart'; class Overview extends StatelessWidget { const Overview({Key? key}) : super(key: key); Widget _buildPopupInfoDialog(BuildContext context) { return AlertDialog( content: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ const Icon( Icons.copyright_outlined), const Text('Alfred Wegener Institute'), const Text('Data-Logistics-Support'), const SizedBox(height: 15), const Text('Maximilian Betz'), const SizedBox(height: 0), const Text('o2a-support@awi.de'), const SizedBox(height: 15), Text('Git-Commit-Hash: ' + getGitHash()), ], ), actions: <Widget>[ TextButton( onPressed: () { Navigator.of(context).pop(); }, child: const Text('Close'), ), ], ); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Mobile Event Log'), actions: [ IconButton( icon: const Icon( Icons.info, size: 34.0), onPressed: (){ showDialog( barrierDismissible: false, context: context, builder: (BuildContext context) => _buildPopupInfoDialog(context), ); } ), ], ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: <Widget>[ const SizedBox(height: 10), Expanded( child: ElevatedButton( child: const Text('Add Event', style: TextStyle(fontSize: 36)), onPressed: () { Navigator.pushNamed(context, '/second'); }, ), ), const SizedBox(height: 10), Expanded( child: ElevatedButton( child: const Text('View & Sync', style: TextStyle(fontSize: 36)), onPressed: () { Navigator.pushNamed(context, '/third'); }, ), ), const SizedBox(height: 10), Expanded( child: ElevatedButton( child: const Text('Configuration', style: TextStyle(fontSize: 36)), onPressed: () { Navigator.pushNamed(context, '/forth'); }, ), ), const SizedBox(height: 10), ], )), ); } } //TODO: Display sensor path in information view.