Last active
August 6, 2020 01:28
-
-
Save truongsinh/0ff2f22f16aee3cb950e3519413c19cf to your computer and use it in GitHub Desktop.
first field(s) to have autofill
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 1460ece..ae75939 100644 | |
--- a/lib/main.dart | |
+++ b/lib/main.dart | |
@@ -35,12 +35,14 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> { | |
padding: EdgeInsets.symmetric(horizontal: 16), | |
children: [ | |
TextFormField( | |
+ autofillHints: [AutofillHints.streetAddressLine1], | |
decoration: const InputDecoration( | |
labelText: 'Shipping address 1', | |
hintText: 'Number and street', | |
), | |
), | |
TextFormField( | |
+ autofillHints: [AutofillHints.streetAddressLine2], | |
decoration: const InputDecoration( | |
labelText: 'Shipping address 2', | |
hintText: '(optional) APT number, c/o', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment