Public Access
feat(ui): add dark theme
This commit is contained in:
+13
-1
@@ -27,8 +27,14 @@ class MyApp extends StatelessWidget {
|
|||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Oeffimaster',
|
title: 'Oeffimaster',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
colorScheme: .fromSeed(seedColor: Colors.yellow),
|
brightness: Brightness.light,
|
||||||
|
colorSchemeSeed: Colors.yellow,
|
||||||
),
|
),
|
||||||
|
darkTheme: ThemeData(
|
||||||
|
brightness: Brightness.dark,
|
||||||
|
colorSchemeSeed: Colors.yellow,
|
||||||
|
),
|
||||||
|
themeMode: ThemeMode.system,
|
||||||
// home: const MyHomePage(title: 'Oeffimaster'), //this is what matters
|
// home: const MyHomePage(title: 'Oeffimaster'), //this is what matters
|
||||||
home: const JourneyOverviewPage(),
|
home: const JourneyOverviewPage(),
|
||||||
// routes: {
|
// routes: {
|
||||||
@@ -108,6 +114,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
|
||||||
|
foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -366,6 +374,8 @@ class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
|
||||||
|
foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (widget.journeyId != null) {
|
if (widget.journeyId != null) {
|
||||||
loadJourney(widget.journeyId as int);
|
loadJourney(widget.journeyId as int);
|
||||||
@@ -770,6 +780,8 @@ class _JourneyOverviewPageState extends State<JourneyOverviewPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
|
||||||
|
foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
|
|||||||
Reference in New Issue
Block a user