Skip to content
Snippets Groups Projects
Commit d477a4fc authored by Florian Schindler's avatar Florian Schindler
Browse files

Update app.dart

color scheme: light and dark
systemuimode: edgetoedge and more
parent 780e210e
No related branches found
No related tags found
No related merge requests found
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:trackeroo/app_scaffold.dart';
class MyApp extends StatelessWidget {
......@@ -7,12 +8,42 @@ class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle(
systemNavigationBarColor: Colors.transparent,
systemNavigationBarDividerColor: Colors.transparent,
systemNavigationBarIconBrightness: Theme.of(context).brightness == Brightness.dark ? Brightness.light : Brightness.dark,
systemNavigationBarContrastEnforced: true,
statusBarColor: Colors.transparent,
statusBarIconBrightness: Theme.of(context).brightness == Brightness.dark ? Brightness.light : Brightness.dark,
),
child: Builder(
builder: (context) {
final lightColorScheme = ColorScheme.fromSeed(seedColor: const Color(0xFF0077B6));
final darkColorScheme = ColorScheme.fromSeed(
seedColor: const Color(0xFF0077B6),
brightness: Brightness.dark,
);
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
colorScheme: lightColorScheme,
brightness: Brightness.light,
useMaterial3: true,
// textTheme: GoogleFonts.rubikTextTheme(ThemeData.light().textTheme)
),
darkTheme: ThemeData(
colorScheme: darkColorScheme,
brightness: Brightness.dark,
useMaterial3: true,
// textTheme: GoogleFonts.rubikTextTheme(ThemeData.dark().textTheme)
),
home: const AppScaffold(),
);
}
),
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment