fmassive/lib/main.dart

38 lines
893 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',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
initialRoute: '/home',
routes: routes,
navigatorKey: navigatorKey,
);
}
}