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

Throws when too close to the bottom of the screen #101

Open
K-Zawis opened this issue Nov 30, 2021 · 0 comments
Open

Throws when too close to the bottom of the screen #101

K-Zawis opened this issue Nov 30, 2021 · 0 comments

Comments

@K-Zawis
Copy link

K-Zawis commented Nov 30, 2021

I'm making a dynamic form builder and to test it I have been adding various forms of form fields to it. While adding the chips input field, I have noticed something.

If the choice chip is at the bottom of the form it will throw the following error message:

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: This widget has been unmounted, so the State no longer has a context (and should be considered defunct). E/flutter (13406): Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active. E/flutter (13406): #0 State.context.<anonymous closure> (package:flutter/src/widgets/framework.dart:909:9) E/flutter (13406): #1 State.context (package:flutter/src/widgets/framework.dart:915:6) E/flutter (13406): #2 ChipsInputState._scrollToVisible.<anonymous closure>.<anonymous closure> (package:flutter_chips_input/src/chips_input.dart:289:27) E/flutter (13406): #3 ChipsInputState._scrollToVisible.<anonymous closure>.<anonymous closure> (package:flutter_chips_input/src/chips_input.dart:288:53) E/flutter (13406): #4 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1145:15) E/flutter (13406): #5 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1090:9) E/flutter (13406): #6 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:996:5) E/flutter (13406): #7 _rootRun (dart:async/zone.dart:1426:13) E/flutter (13406): #8 _CustomZone.run (dart:async/zone.dart:1328:19) E/flutter (13406): #9 _CustomZone.runGuarded (dart:async/zone.dart:1236:7) E/flutter (13406): #10 _invoke (dart:ui/hooks.dart:150:10) E/flutter (13406): #11 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270:5) E/flutter (13406): #12 _drawFrame (dart:ui/hooks.dart:114:31) E/flutter (13406):

If I add some padding and move the page up, it will work fine. But eventually, the closer it gets to the bottom (bellow a padding of 34 in a list view builder and fully scrolled down) the above error message throws and hides the keyboard, resetting any chips that may have been already added. So if you tap the field when it's visible, but not 34 pixels away from the bottom edge it throw the unmounted error, otherwise works as expected.

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

1 participant