import 'package:flutter/material.dart'; import 'package:fmassive/database.dart'; import 'package:fmassive/edit_set.dart'; import 'package:fmassive/home_page.dart'; MyDatabase db = MyDatabase(); void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { MyApp({Key? key}) : super(key: key); final navigatorKey = GlobalKey(); @override Widget build(BuildContext context) { const edit = EditGymSetPage(gymSet: GymSetsCompanion()); final Map routes = { '/home': (context) => const HomePage(), '/edit-set': (context) => edit, }; return MaterialApp( title: 'Gym App', theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), initialRoute: '/home', routes: routes, navigatorKey: navigatorKey, ); } }