Closed curlylazy closed 3 months ago
I'm getting the same error too. I notice that the AnimationController isn't disposed in the dispose() function of the _DropDownTextFieldState class. If you add a check for whether the ticker is animating, then tell it to stop before explicitly disposing of the AnimationController this seems to fix it for me.
@sharathrajMindstack any chance you've seen this before or can verify this fix? I'm not quite sure how to patch or submit a PR.
@override
void dispose() {
if (widget.searchFocusNode == null) _searchFocusNode.dispose();
if (widget.textFieldFocusNode == null) _textFieldFocusNode.dispose();
// <--- Add code between these lines
if (_controller.isAnimating) {
_controller.stop();
}
_controller.dispose();
// <--- end of new lines
_cnt.dispose();
super.dispose();
}
Thank you for the fix, @dankhan-helmet. I have included it in the latest release. Sorry for delayed response, @curlylazy . I was bus with other things and couldn't maintain this package. The issue has been fixed in the latest release, dropdown_textfield: ^1.1.0
thank you so much for fixing the package.
Awesome thanks so much for the fix. Just to note that this update only supports flutter >= v3.22 only, due to MaterialStateProperty
-> WidgetStateProperty
breaking changes.
hello,
i found a bug (maybe), when we click the dropdown, while the dropdown showing data, then click back to the previouse page, and suddenly its triggred an error..
FlutterError (_DropDownTextFieldState#6aa21(tickers: tracking 1 ticker) was disposed with an active Ticker.
hope you can help me..