build method
- @override
- BuildContext context,
- SettingsModel model
override
Builds the UI according to the state in model
.
Implementation
@override
Widget build(BuildContext context, SettingsModel model) => MaterialApp(
title: "Binghamton University Rover Team",
home: SplashPage(),
debugShowCheckedModeBanner: false,
themeMode: models.isReady ? model.dashboard.themeMode : ThemeMode.system,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: binghamtonGreen,
secondary: secondaryColor,
),
appBarTheme: const AppBarTheme(
backgroundColor: binghamtonGreen,
foregroundColor: Colors.white,
),
dropdownMenuTheme: const DropdownMenuThemeData(
textStyle: TextStyle(fontWeight: FontWeight.normal),
),
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSeed(
brightness: Brightness.dark,
seedColor: binghamtonGreen,
surface: const Color.fromRGBO(40, 40, 40, 1),
secondary: secondaryColor,
onSecondary: Colors.white,
),
dropdownMenuTheme: const DropdownMenuThemeData(
textStyle: TextStyle(fontWeight: FontWeight.normal),
),
appBarTheme: const AppBarTheme(
backgroundColor: binghamtonGreen,
foregroundColor: Colors.white,
),
),
routes: {
Routes.home: (_) => HomePage(),
Routes.settings: (_) => SettingsPage(),
},
);