Last active
August 6, 2020 02:01
-
-
Save truongsinh/b965355bd8804607bc5fb52df07a4b51 to your computer and use it in GitHub Desktop.
AutofillGroup to autofill multiple fields in one tap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/main.dart b/lib/main.dart | |
index ae75939..4f1704b 100644 | |
--- a/lib/main.dart | |
+++ b/lib/main.dart | |
@@ -33,6 +33,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> { | |
@override | |
Widget build(BuildContext context) => ListView( | |
padding: EdgeInsets.symmetric(horizontal: 16), | |
+ children: [ | |
+ AutofillGroup( | |
+ child: Column( | |
children: [ | |
TextFormField( | |
autofillHints: [AutofillHints.streetAddressLine1], | |
@@ -48,6 +51,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> { | |
hintText: '(optional) APT number, c/o', | |
), | |
), | |
+ ], | |
+ ), | |
+ ), | |
CheckboxListTile( | |
contentPadding: EdgeInsets.zero, | |
title: const Text("Billing address same as shipping address"), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment