Skip to content
Snippets Groups Projects
overview.dart 2.69 KiB
Newer Older
import 'package:flutter/material.dart';

class Overview extends StatelessWidget {
  const Overview({Key? key}) : super(key: key);

  Widget _buildPopupInfoDialog(BuildContext context) {

    return AlertDialog(
      title: const Text('Version 1.0.0'),

      content: Column(
        mainAxisSize: MainAxisSize.min,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: const <Widget>[
          Icon( Icons.copyright_outlined),
          Text('Alfred Wegener Institute'),
          Text('Data-Logistics-Support'),
          SizedBox(height: 10),
          Text('Maximilian Betz'),
          SizedBox(height: 30),
          Text('o2a-support@awi.de'),
        ],
      ),
      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),