fmassive/lib/main.dart

37 lines
864 B
Dart

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<NavigatorState>();
@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',
themeMode: ThemeMode.system,
darkTheme: ThemeData.dark(),
theme: ThemeData.light(),
initialRoute: '/home',
routes: routes,
navigatorKey: navigatorKey,
);
}
}