Skip to content

Instantly share code, notes, and snippets.

@coorasse
Created May 22, 2020 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coorasse/1c63529d8d2ced4c3f766b104919df10 to your computer and use it in GitHub Desktop.
Save coorasse/1c63529d8d2ced4c3f766b104919df10 to your computer and use it in GitHub Desktop.
ListView(
children: <Widget>[
BeeHeader(i18n.t('inspections.contactSection')),
BeeInput(
i18n.t('inspections.firstName'),
validator: Validators.presence(i18n.t('inspections.firstNameEmpty')),
onSaved: (String value) {
beekeeper.firstname = value;
},
),
BeeInput(
i18n.t('inspections.lastName'),
validator: Validators.presence(i18n.t('inspections.lastNameEmpty')),
onSaved: (String value) {
beekeeper.lastname = value;
},
),
BeeInput(
i18n.t('inspections.email'),
controller: TextEditingController()..text = beekeeper.email,
validator: Validators.email(i18n.t('inspections.invalidEmail')),
onSaved: (String value) {
beekeeper.email = value;
},
),
BeeInput(
i18n.t('inspections.telephone'),
onSaved: (String value) {
beekeeper.telephone = value;
},
),
BeeInput(
i18n.t('inspections.mobile'),
onSaved: (String value) {
beekeeper.mobile = value;
},
),
Container(
margin: const EdgeInsets.only(top: 30.0), child: BeeHeader(i18n.t('inspections.addressSection'))),
BeeInput(
i18n.t('inspections.street'),
onSaved: (String value) {
beekeeper.street = value;
},
),
BeeInput(
i18n.t('inspections.houseNo'),
onSaved: (String value) {
beekeeper.houseNo = value;
},
),
BeeInput(
i18n.t('inspections.zip'),
onSaved: (String value) {
beekeeper.zip = value;
},
),
BeeInput(
i18n.t('inspections.location'),
lastField: true,
onSaved: (String value) {
beekeeper.location = value;
},
),
Container(
margin: const EdgeInsets.only(top: 30.0),
child: Center(
child: RaisedButton(
onPressed: _submit,
child: Text(i18n.t('buttons.next')),
)),
),
],
),
h1 = t('inspections.contactSection')
= f.input :first_name
= f.input :last_name
= f.input :email
= f.input :telephone
= f.input :mobile
h1 = t('inspections.addressSection')
= f.input :street
= f.input :house_no
= f.input :zip
= f.input :location
= f.submit t('buttons.next'), class: 'mt-3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment