69 lines
3.4 KiB
Dart
69 lines
3.4 KiB
Dart
import 'package:diameter/components/app_theme.dart';
|
|
import 'package:diameter/screens/accuracy_detail.dart';
|
|
import 'package:diameter/screens/basal/basal_profile_detail.dart';
|
|
import 'package:diameter/screens/bolus/bolus_profile_detail.dart';
|
|
import 'package:diameter/screens/log/log.dart';
|
|
import 'package:diameter/screens/log/log_entry.dart';
|
|
import 'package:diameter/screens/log/log_event_detail.dart';
|
|
import 'package:diameter/screens/log/log_event_type_detail.dart';
|
|
import 'package:diameter/screens/log/log_event_type_list.dart';
|
|
import 'package:diameter/screens/meal/meal_category_detail.dart';
|
|
import 'package:diameter/screens/meal/meal_category_list.dart';
|
|
import 'package:diameter/screens/meal/meal_detail.dart';
|
|
import 'package:diameter/screens/meal/meal_list.dart';
|
|
import 'package:diameter/screens/meal/meal_portion_type_detail.dart';
|
|
import 'package:diameter/screens/meal/meal_portion_type_list.dart';
|
|
import 'package:diameter/screens/meal/meal_source_detail.dart';
|
|
import 'package:diameter/screens/meal/meal_source_list.dart';
|
|
import 'package:diameter/settings.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:parse_server_sdk_flutter/parse_server_sdk.dart';
|
|
import 'package:diameter/screens/accuracy_list.dart';
|
|
import 'package:diameter/config.dart';
|
|
import 'package:diameter/screens/basal/basal_profiles_list.dart';
|
|
import 'package:diameter/screens/bolus/bolus_profile_list.dart';
|
|
import 'package:diameter/navigation.dart';
|
|
import 'package:flex_color_scheme/flex_color_scheme.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await Parse().initialize(keyApplicationId, keyParseServerUrl,
|
|
clientKey: keyClientKey, debug: true);
|
|
|
|
Settings.loadSettingsIntoConfig();
|
|
|
|
runApp(
|
|
MaterialApp(
|
|
theme: AppTheme.makeTheme(AppTheme.lightTheme),
|
|
darkTheme: AppTheme.makeTheme(AppTheme.darkTheme),
|
|
themeMode: ThemeMode.system,
|
|
initialRoute: '/',
|
|
routes: {
|
|
'/': (context) => const LogScreen(),
|
|
Routes.log: (context) => const LogScreen(),
|
|
Routes.logEntry: (context) => const LogEntryScreen(),
|
|
Routes.logEvent: (context) => const LogEventDetailScreen(),
|
|
Routes.logEventTypes: (context) => const LogEventTypeListScreen(),
|
|
Routes.logEventType: (context) => const LogEventTypeDetailScreen(),
|
|
Routes.accuracies: (context) => const AccuracyListScreen(),
|
|
Routes.accuracy: (context) => const AccuracyDetailScreen(),
|
|
Routes.meals: (context) => const MealListScreen(),
|
|
Routes.meal: (context) => const MealDetailScreen(),
|
|
Routes.mealCategories: (context) => const MealCategoryListScreen(),
|
|
Routes.mealCategory: (context) => const MealCategoryDetailScreen(),
|
|
Routes.mealPortionTypes: (context) => const MealPortionTypeListScreen(),
|
|
Routes.mealPortionType: (context) =>
|
|
const MealPortionTypeDetailScreen(),
|
|
Routes.mealSources: (context) => const MealSourceListScreen(),
|
|
Routes.mealSource: (context) => const MealSourceDetailScreen(),
|
|
Routes.bolusProfiles: (context) => const BolusProfileListScreen(),
|
|
Routes.bolusProfile: (context) => const BolusProfileDetailScreen(),
|
|
Routes.basalProfiles: (context) => const BasalProfileListScreen(),
|
|
Routes.basalProfile: (context) => const BasalProfileDetailScreen(),
|
|
Routes.settings: (context) => const SettingsScreen(),
|
|
},
|
|
),
|
|
);
|
|
}
|