-
-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FormBuilderCustomField as dropdownbutton and FormBuilderDropdown UI problem #63
Comments
Kindly stick with Column(
children: <Widget>[
FormBuilderDropdown(
attribute: "country",
hint: Text('Select Country'),
onChanged: (val) {
//Clear any selected fields for governorate and district if country changes
_fbKey.currentState.fields['governorate'].currentState
.didChange(null);
_fbKey.currentState.fields['district'].currentState
.didChange(null);
//TODO: Update Governorates list
},
decoration: InputDecoration(
labelText: 'Country',
labelStyle: TextStyle(
fontFamily: 'Open Sans',
),
),
validators: [
FormBuilderValidators.required(
errorText: 'Please select District.'),
],
initialValue: null,
items: countries,
),
FormBuilderDropdown(
attribute: "governorate",
hint: Text('Select governorate'),
onChanged: (val) {
//Clear any selected fields for district if governorate changes
_fbKey.currentState.fields['district'].currentState
.didChange(null);
//TODO: Update Districts list
},
decoration: InputDecoration(
labelText: 'Governorate',
labelStyle: TextStyle(
fontFamily: 'Open Sans',
),
),
validators: [
FormBuilderValidators.required(
errorText: 'Please select governorate.'),
],
initialValue: null,
items: governorates,
),
FormBuilderDropdown(
attribute: "d",
hint: Text('Select governorate'),
onChanged: (val) {
_fbKey.currentState.fields['district'].currentState
.didChange(null);
},
decoration: InputDecoration(
labelText: 'District',
labelStyle: TextStyle(
fontFamily: 'Open Sans',
),
),
validators: [
FormBuilderValidators.required(
errorText: 'Please select district.'),
],
initialValue: null,
items: districts,
),
],
), |
Thanks this solved my all problems including the null exception. |
Glad to hear that! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From this image http://prntscr.com/nrrkpw you can understand what I am talking about. It looks really odd. Is there a way to solve this issue?
The text was updated successfully, but these errors were encountered: