You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following assertion was thrown building _FormScope:A TextEditingController was used after being disposed. Once you have called dispose() on a TextEditingController, it can no longer be used. User-created ancestor of the error-causing widget was: FormBuilder-[LabeledGlobalKey#30305]
When the exception was thrown, this was the stack:
#0 ChangeNotifier._debugAssertNotDisposed. (package:flutter/src/foundation/change_notifier.dart:105:9) #1 ChangeNotifier._debugAssertNotDisposed (package:flutter/src/foundation/change_notifier.dart:111:6) #2 ChangeNotifier.addListener (package:flutter/src/foundation/change_notifier.dart:141:12) #3 FormBuilderTextFieldState.initState (package:flutter_form_builder/src/fields/form_builder_text_field.dart:111:26) #4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4068:58)
I have no idea what is causing it, since I am not disposing any TextEditingController at all.
I am using version 3.5.3 of flutter_form_builder, because newer versions are incompatible with Intl 0.15.8 and newer versions of Intl are incompatible with flutter_localizations.
The text was updated successfully, but these errors were encountered:
Hi @pulstar,
Seems like your app UI is frequently rebuilding during runtime thus causing the TextEditingController used in the TextField to be disposed of.
On the issue of dependency resolution, I'd suggest having a look at this video which will help to make sure you don't remain behind just because of dependency mismatch.
I know this is old - but I looked at my app UI a little more closely and realized I had an issue like @danvick suggested. I use the Provider package and when a user hit the bottom navigator button named "home" I popped off everything on the stack with Navigator.of(context).popUntil((route) => route.isFirst); . This caused the state to be messed up when switching to the page with my TextEditingController because it disposed of the controller when I had popped everything off the stack.
I am getting a weird error:
The following assertion was thrown building _FormScope:A TextEditingController was used after being disposed. Once you have called dispose() on a TextEditingController, it can no longer be used. User-created ancestor of the error-causing widget was: FormBuilder-[LabeledGlobalKey#30305]
When the exception was thrown, this was the stack:
#0 ChangeNotifier._debugAssertNotDisposed. (package:flutter/src/foundation/change_notifier.dart:105:9)
#1 ChangeNotifier._debugAssertNotDisposed (package:flutter/src/foundation/change_notifier.dart:111:6)
#2 ChangeNotifier.addListener (package:flutter/src/foundation/change_notifier.dart:141:12)
#3 FormBuilderTextFieldState.initState (package:flutter_form_builder/src/fields/form_builder_text_field.dart:111:26)
#4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4068:58)
I have no idea what is causing it, since I am not disposing any TextEditingController at all.
I am using version 3.5.3 of flutter_form_builder, because newer versions are incompatible with Intl 0.15.8 and newer versions of Intl are incompatible with flutter_localizations.
The text was updated successfully, but these errors were encountered: