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

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

* revert: pubspec.lock change

* fix: use context inside of function

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
Co-authored-by: Yijing Huang <hyj891204@gmail.com>
This commit is contained in:
Liel Fridman 2023-10-24 12:43:25 +03:00 committed by GitHub
parent 85c0622245
commit 16a4babdca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();