1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Migrate form_app to Material 3 (#1612)

This commit is contained in:
Miguel Beltran
2023-02-01 05:15:27 +01:00
committed by GitHub
parent 0a9f7eae6c
commit effc48c16b
2 changed files with 4 additions and 2 deletions

View File

@@ -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,
);
}

View File

@@ -27,7 +27,6 @@ class _FormValidationDemoState extends State<FormValidationDemo> {
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