1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-12 15:58:32 +00:00

add form_app (#463)

* add form_app

* revert unrelated changes

* use links in README

* remove unnecessary type annotation

* Remove GlobalKey for sign_in_http sample

* reword comment

* run package:copywriter

* use relative import

* fix quotes

* Add punctuation

* make sure setState() is used in form_widgets sample

* avoid first person pronoun

* store date state in parent widget in form_widgets.dart
This commit is contained in:
John Ryan
2020-06-12 12:38:46 -07:00
committed by GitHub
parent a94342d199
commit af5be70f34
72 changed files with 2598 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# form_app
A sample demonstrating different types of forms and best practices.
## Sign In w/ HTTP
[*lib/src/sign_in_http.dart*](lib/src/sign_in_http.dart)
A sign in form using `package:http` to send a request.
## Form widgets
[*lib/src/form_widgets.dart*](lib/src/form_widgets.dart)
A stylized form that uses widgets like TextField, DatePicker, Slider, Checkbox,
and Switch.
## Autofill
[*lib/src/autofill.dart*](lib/src/autofill.dart)
A form that uses AutofillGroup to auto-fill the users name, email, and address.
In order to use Autofill in a browser, your app needs to be hosted with HTTPS.
If you would like to test locally, you can build the app in release mode
(`flutter run -d chrome --release --web-port=5000`) and use
[ngrok](https://ngrok.com/) to create an HTTPS url for your local app (`ngrok
http 5000`)
## Validation
[*lib/src/validation.dart*](lib/src/validation.dart)
A form that alerts the user if the data entered is invalid.