import 'package:diameter/navigation.dart'; import 'package:diameter/screens/reports/export.dart'; import 'package:flutter/material.dart'; class ReportsOverviewScreen extends StatefulWidget { static const String routeName = '/reports'; const ReportsOverviewScreen({Key? key}) : super(key: key); @override _ReportsOverviewScreenState createState() => _ReportsOverviewScreenState(); } class _ReportsOverviewScreenState extends State { final ScrollController _scrollController = ScrollController(); @override void dispose() { _scrollController.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Reports'), ), drawer: const Navigation(currentLocation: ReportsOverviewScreen.routeName), body: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: GridView.count( crossAxisCount: 2, children: [ GestureDetector( onTap: () => Navigator.pushNamed(context, Routes.dailyChart), child: Padding( padding: const EdgeInsets.all(10.0), child: Card( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: const EdgeInsets.all(10.0), child: Icon(Icons.today, size: 50, color: Theme.of(context).textTheme.subtitle2?.color), ), Text( 'DAILY REPORT', style: Theme.of(context).textTheme.subtitle2, textAlign: TextAlign.center ), ], ), ), ), ), GestureDetector( onTap: () => showDialog( context: context, builder: (context) => const ExportDialog(), ), child: Padding( padding: const EdgeInsets.all(10.0), child: Card( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: const EdgeInsets.all(10.0), child: Icon(Icons.today, size: 50, color: Theme.of(context).textTheme.subtitle2?.color), ), Text( 'PDF REPORT', style: Theme.of(context).textTheme.subtitle2, textAlign: TextAlign.center ), ], ), ), ), ), ], ), ), ], ), ); } }