From 9690ef58cfe10f0282d78729de860eb0d21d6cf1 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 24 Jul 2023 08:06:07 -0700 Subject: [PATCH] Update Gallery demo app themes for Material3 compatibility (#131093) --- .../flutter_gallery/lib/demo/pesto_demo.dart | 3 ++- .../flutter_gallery/lib/demo/shrine/app.dart | 1 + .../flutter_gallery/lib/demo/shrine/login.dart | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart b/dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart index fd36fe6c69..5d40dbeaf8 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart @@ -23,8 +23,9 @@ const double _kRecipePageMaxWidth = 500.0; final Set _favoriteRecipes = {}; final ThemeData _kTheme = ThemeData( + appBarTheme: const AppBarTheme(foregroundColor: Colors.white, backgroundColor: Colors.teal), brightness: Brightness.light, - primarySwatch: Colors.teal, + floatingActionButtonTheme: const FloatingActionButtonThemeData(foregroundColor: Colors.white), ); class PestoHome extends StatelessWidget { diff --git a/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart b/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart index dd9db3b926..0b4ff755f4 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart @@ -92,6 +92,7 @@ ThemeData _buildShrineTheme() { textTheme: _buildShrineTextTheme(base.textTheme), primaryTextTheme: _buildShrineTextTheme(base.primaryTextTheme), iconTheme: _customIconTheme(base.iconTheme), + appBarTheme: const AppBarTheme(backgroundColor: kShrinePink100), ); } diff --git a/dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart b/dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart index ba11ceaa0b..c78279068a 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart @@ -99,7 +99,7 @@ class _LoginPageState extends State { // of Shrine completely. Navigator.of(context, rootNavigator: true).pop(); }, - child: const Text('CANCEL'), + child: Text('CANCEL', style: Theme.of(context).textTheme.bodySmall), ), ElevatedButton( style: ElevatedButton.styleFrom( @@ -111,7 +111,7 @@ class _LoginPageState extends State { onPressed: () { Navigator.pop(context); }, - child: const Text('NEXT'), + child: Text('NEXT', style: Theme.of(context).textTheme.bodySmall), ), ], ),