Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: The appearance of slash menu didn't change along with theme mode changes (#3630) (#3706)

Liel Fridman16a4babdcaeb
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart
index 252ed4fdbd..ed795ea658 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart
@@ -133,15 +133,18 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
),
];
- late final showSlashMenu = customSlashCommand(
- slashMenuItems,
- shouldInsertSlash: false,
- style: styleCustomizer.selectionMenuStyleBuilder(),
- ).handler;
-
EditorStyleCustomizer get styleCustomizer => widget.styleCustomizer;
DocumentBloc get documentBloc => context.read<DocumentBloc>();
+ Future<bool> showSlashMenu(editorState) async {
+ final result = await customSlashCommand(
+ slashMenuItems,
+ shouldInsertSlash: false,
+ style: styleCustomizer.selectionMenuStyleBuilder(),
+ ).handler(editorState);
+ return result;
+ }
+
@override
void initState() {
super.initState();