fix: required named parameter 'onLiveTextInput' must be provided

This commit is contained in:
Lucas.Xu 2023-09-21 10:08:53 +08:00
commit 967e3e82a8

View file

@ -55,6 +55,18 @@ class _MobileEditorState extends State<MobileEditor> {
child: MobileFloatingToolbar(
editorState: editorState,
editorScrollController: editorScrollController,
toolbarBuilder: (context, anchor) {
return AdaptiveTextSelectionToolbar.editable(
clipboardStatus: ClipboardStatus.pasteable,
onCopy: () => copyCommand.execute(editorState),
onCut: () => cutCommand.execute(editorState),
onPaste: () => pasteCommand.execute(editorState),
onSelectAll: () => selectAllCommand.execute(editorState),
anchors: TextSelectionToolbarAnchors(
primaryAnchor: anchor,
),
);
},
child: AppFlowyEditor(
editorStyle: editorStyle,
editorState: editorState,
@ -128,6 +140,11 @@ class _MobileEditorState extends State<MobileEditor> {
fontWeight: FontWeight.w600,
),
);
map[ParagraphBlockKeys.type] = TextBlockComponentBuilder(
configuration: BlockComponentConfiguration(
placeholderText: (node) => 'Type something...',
),
);
return map;
}
}