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 cause exception in rotation for duplicate attribute #67

Closed
shariful2011 opened this issue May 24, 2019 · 5 comments
Closed

Comments

@shariful2011
Copy link

During rotation got an exception as follows:
I/flutter (28924): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (28924): The following assertion was thrown building MyDropDown:
I/flutter (28924): Field with attribute 'attribute' already exists. Make sure that two or more fields don't have the same
I/flutter (28924): attribute name.
I/flutter (28924): 'package:flutter_form_builder/src/form_builder.dart': Failed assertion: line 64 pos 12:
I/flutter (28924): '_fieldKeys.containsKey(attribute) == false'

@danvick
Copy link
Collaborator

danvick commented May 25, 2019

Kindly make sure that no two fields have the same attribute name

@danvick danvick closed this as completed May 25, 2019
@shariful2011
Copy link
Author

All of my fields are a unique attribute. It perfectly works with Portrait mode but not in Landscape mode.

@danvick
Copy link
Collaborator

danvick commented May 25, 2019

Thanks for bringing this issue to my attention. I'll have a look into it and try to fix it as soon as I can.

Meanwhile, as I had earlier noted, an assertion failure is not necessarily an error, you can therefore ignore this assertion failure as it won't affect your app in production.

@danvick danvick reopened this May 25, 2019
@shariful2011
Copy link
Author

If I can't do anything in development phase what can I have in production? Please solve it, it's making crazy on every rotation.

@danvick
Copy link
Collaborator

danvick commented Jul 12, 2019

The assertion was removed in later versions of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants