Skip to content
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

FormBuilder initialValue is not taken into account for FormBuilderSwitch #159

Closed
Sigfrodr opened this issue Oct 27, 2019 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Sigfrodr
Copy link

Sigfrodr commented Oct 27, 2019

This works:
FormBuilderSwitch( attribute: 'theme', initialValue: userPreferences.darkTheme, activeColor: SecondaryColor, label: Text("Thème sombre"), decoration: InputDecoration( icon: Icon(FontAwesome.getIconData('moon-o')), border: InputBorder.none, ))

But this don't:
FormBuilder( key: _fbKey, initialValue: { 'theme': userPreferences.darkTheme, }, autovalidate: false, FormBuilderSwitch( attribute: 'theme', activeColor: SecondaryColor, label: Text("Thème sombre"), decoration: InputDecoration( icon: Icon(FontAwesome.getIconData('moon-o')), border: InputBorder.none, ))

@danvick
Copy link
Collaborator

danvick commented Oct 31, 2019

Hi @Sigfrodr,
Thanks for bringing this to my attention. I'm working on a fix.

@danvick danvick added the bug Something isn't working label Oct 31, 2019
@danvick
Copy link
Collaborator

danvick commented Nov 4, 2019

Kindly have a look at v3.6.0 from pub, it contains a fix for this.

Cheers!

@danvick danvick closed this as completed Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants