visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
283 stars 44 forks source link

Inputs - Remove late final from keyboardVisibilitySub #76

Closed Phil9l closed 1 year ago

Phil9l commented 2 years ago

This change was made in dea76 commit. This commit reverts this change because of the following problem.

It causes the problem:

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following LateError was thrown while finalizing the widget tree:
LateInitializationError: Field 'keyboardVisibilitySub' has not been initialized.
When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49  throw_
packages/visual_editor/main.dart 152:40                                       get keyboardVisibilitySub
packages/visual_editor/editor/services/editor.service.dart 47:11              disposeEditor
packages/visual_editor/main.dart 233:20                                       dispose
packages/flutter/src/widgets/framework.dart 5088:11                           unmount
packages/flutter/src/widgets/framework.dart 1917:12                           [_unmount]
packages/flutter/src/widgets/framework.dart 1915:7                            <fn>
packages/flutter/src/widgets/framework.dart 6381:16                           visitChildren
...

Similar problem discussed on SO: https://stackoverflow.com/questions/69309379/lateinitializationerror-field-has-not-been-initialized-in-flutter

adrian-moisa commented 2 years ago

I don't think I'll be merging this for now. I found problems that seem to be higher up in the call stack. I'll be updating you once I have a clear answer.