|
@@ -150,11 +150,16 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
|
|
final (bool autoFocus, Selection? selection) =
|
|
|
_computeAutoFocusParameters();
|
|
|
|
|
|
- final editor = AppFlowyEditor(
|
|
|
+ final editorScrollController = EditorScrollController(
|
|
|
editorState: widget.editorState,
|
|
|
- editable: true,
|
|
|
shrinkWrap: widget.shrinkWrap,
|
|
|
scrollController: effectiveScrollController,
|
|
|
+ );
|
|
|
+
|
|
|
+ final editor = AppFlowyEditor(
|
|
|
+ editorState: widget.editorState,
|
|
|
+ editable: true,
|
|
|
+ editorScrollController: editorScrollController,
|
|
|
// setup the auto focus parameters
|
|
|
autoFocus: widget.autoFocus ?? autoFocus,
|
|
|
focusedSelection: selection,
|
|
@@ -171,18 +176,12 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
|
|
);
|
|
|
|
|
|
return Center(
|
|
|
- child: ConstrainedBox(
|
|
|
- constraints: const BoxConstraints(
|
|
|
- maxWidth: double.infinity,
|
|
|
- maxHeight: double.infinity,
|
|
|
- ),
|
|
|
- child: FloatingToolbar(
|
|
|
- style: styleCustomizer.floatingToolbarStyleBuilder(),
|
|
|
- items: toolbarItems,
|
|
|
- editorState: widget.editorState,
|
|
|
- scrollController: effectiveScrollController,
|
|
|
- child: editor,
|
|
|
- ),
|
|
|
+ child: FloatingToolbar(
|
|
|
+ style: styleCustomizer.floatingToolbarStyleBuilder(),
|
|
|
+ items: toolbarItems,
|
|
|
+ editorState: widget.editorState,
|
|
|
+ editorScrollController: editorScrollController,
|
|
|
+ child: editor,
|
|
|
),
|
|
|
);
|
|
|
}
|