From effc48c16b01d2f5f5cf8e4df6cbbc502d52f748 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Wed, 1 Feb 2023 05:15:27 +0100 Subject: [PATCH] Migrate form_app to Material 3 (#1612) --- form_app/lib/main.dart | 5 ++++- form_app/lib/src/validation.dart | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/form_app/lib/main.dart b/form_app/lib/main.dart index 423b894b5..7517b572e 100644 --- a/form_app/lib/main.dart +++ b/form_app/lib/main.dart @@ -88,7 +88,10 @@ class FormApp extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp.router( title: 'Form Samples', - theme: ThemeData(primarySwatch: Colors.teal), + theme: ThemeData( + colorSchemeSeed: Colors.teal, + useMaterial3: true, + ), routerConfig: router, ); } diff --git a/form_app/lib/src/validation.dart b/form_app/lib/src/validation.dart index 04b2aa522..07b3201b5 100644 --- a/form_app/lib/src/validation.dart +++ b/form_app/lib/src/validation.dart @@ -27,7 +27,6 @@ class _FormValidationDemoState extends State { Padding( padding: const EdgeInsets.all(8), child: TextButton( - style: TextButton.styleFrom(foregroundColor: Colors.white), child: const Text('Submit'), onPressed: () { // Validate the form by getting the FormState from the GlobalKey