Reputation: 1
Here is the code for my Html editor. which is running perfectly, But when I try to change the font size or type, in total whenever I click on any drop down menu it throwing error in web, but working perfectly in Android.
Update :: I found out that, It's a bug with the package: they have mentioned it there. use this method, solves the problem and works fine.
The current workaround is to build and/or run your Web app with flutter run --web-renderer html
and flutter build web --web-renderer html
.
HtmlEditor(
controller: controller, //required
htmlToolbarOptions: const HtmlToolbarOptions(
dropdownMenuMaxHeight: 100,
dropdownMenuDirection: DropdownMenuDirection.down,
dropdownItemHeight: 60,
),
htmlEditorOptions: const HtmlEditorOptions(
hint: "Your text here...",
autoAdjustHeight: true,
spellCheck: true,
adjustHeightForKeyboard: true,
androidUseHybridComposition: true
),
otherOptions: const OtherOptions(height: 400, decoration: BoxDecoration()),
),
This is the image of the HtmlEditor code output:
Whenever I try to change the fontsize or click on any dropdown menu: this error is showing from the
focus_manager.dart
- file
// Request that an update be scheduled, optionally requesting focus for the
// given newFocus node.
void _markNeedsUpdate() {
assert(_focusDebug('Scheduling update, current focus is $_primaryFocus, next focus will be $_markedForFocus'));
if (_haveScheduledUpdate) {
return;
}
_haveScheduledUpdate = true;
scheduleMicrotask(_applyFocusChange);
}
These are the images from android These are the images from android (https://i.sstatic.net/pVnYG.jpg)
but it's not working on flutter web. (not in google chrome or Edge)
.
Upvotes: 0
Views: 1233