mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +00:00
Migrate form_app to Material 3 (#1612)
This commit is contained in:
@@ -88,7 +88,10 @@ class FormApp extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp.router(
|
return MaterialApp.router(
|
||||||
title: 'Form Samples',
|
title: 'Form Samples',
|
||||||
theme: ThemeData(primarySwatch: Colors.teal),
|
theme: ThemeData(
|
||||||
|
colorSchemeSeed: Colors.teal,
|
||||||
|
useMaterial3: true,
|
||||||
|
),
|
||||||
routerConfig: router,
|
routerConfig: router,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ class _FormValidationDemoState extends State<FormValidationDemo> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
style: TextButton.styleFrom(foregroundColor: Colors.white),
|
|
||||||
child: const Text('Submit'),
|
child: const Text('Submit'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// Validate the form by getting the FormState from the GlobalKey
|
// Validate the form by getting the FormState from the GlobalKey
|
||||||
|
|||||||
Reference in New Issue
Block a user