Simplify main.dart

This commit is contained in:
Brandon Presley 2023-11-28 20:08:29 +13:00
parent 4a83465d82
commit b617724f0a

View File

@ -1,6 +1,5 @@
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();
@ -16,20 +15,12 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
const edit = EditGymSetPage(gymSet: GymSetsCompanion());
final Map<String, WidgetBuilder> routes = {
'/home': (context) => const HomePage(),
'/edit-set': (context) => edit,
};
return MaterialApp(
title: 'Gym App',
title: 'Massive',
themeMode: ThemeMode.system,
home: const HomePage(),
darkTheme: ThemeData.dark(),
theme: ThemeData.light(),
initialRoute: '/home',
routes: routes,
navigatorKey: navigatorKey,
);
}