1
0
mirror of https://github.com/flutter/samples.git synced 2026-05-03 13:26:06 +00:00

Enable Material 3 on place_tracker (#1621)

This commit is contained in:
Miguel Beltran
2023-02-01 23:27:41 +01:00
committed by GitHub
parent a91b434155
commit a5cdae3ab0
2 changed files with 22 additions and 13 deletions

View File

@@ -24,6 +24,18 @@ class PlaceTrackerApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp.router(
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.green,
appBarTheme: AppBarTheme(
backgroundColor: Colors.green[700],
foregroundColor: Colors.white,
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: Colors.green[700],
foregroundColor: Colors.white,
),
),
routerConfig: GoRouter(routes: [
GoRoute(
path: '/',
@@ -65,7 +77,6 @@ class _PlaceTrackerHomePage extends StatelessWidget {
Text('Place Tracker'),
],
),
backgroundColor: Colors.green[700],
actions: [
Padding(
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 16.0, 0.0),