-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I noticed that getText() doesn't work first time when it's called. When I wait a little bit and call it again then I get the HTML content from FlutterSummernote() widget. I implemented following and ugly workaround to this problem.
GlobalKey<FlutterSummernoteState> keyEditor = GlobalKey();
...
progressNote.prnoMemo = await keyEditor.currentState?.getText();
// getText() is buggy and doesn't work first time when it's called
await Future.delayed(Duration(milliseconds: 500));
progressNote.prnoMemo = await keyEditor.currentState?.getText();
print('from HTML editor : ${progressNote.prnoMemo}');
...
FlutterSummernote(
height: 350,
value: progressNote.prnoMemo,
hint: progressNote.prnoMemo == null ? 'Enter your note here...' : '',
key: keyEditor,
...
Please investigate and resolve this problem.
I use flutter_summernote: ^0.2.3 in my pubspec.yaml file and
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
vipinkrishna131
Metadata
Metadata
Assignees
Labels
No labels