diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/image/image_upload_widget.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/image/image_upload_widget.dart index bb02c74600..078609db91 100644 --- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/image/image_upload_widget.dart +++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/image/image_upload_widget.dart @@ -2,6 +2,7 @@ import 'package:appflowy_editor/src/core/document/node.dart'; import 'package:appflowy_editor/src/editor_state.dart'; import 'package:appflowy_editor/src/infra/flowy_svg.dart'; import 'package:appflowy_editor/src/render/selection_menu/selection_menu_service.dart'; +import 'package:appflowy_editor/src/render/style/editor_style.dart'; import 'package:flutter/material.dart'; OverlayEntry? _imageUploadMenu; @@ -20,6 +21,7 @@ void showImageUploadMenu( left: menuService.topLeft.dx, child: Material( child: ImageUploadMenu( + editorState: editorState, onSubmitted: (text) { // _dismissImageUploadMenu(); editorState.insertImageNode(text); @@ -53,10 +55,12 @@ class ImageUploadMenu extends StatefulWidget { Key? key, required this.onSubmitted, required this.onUpload, + this.editorState, }) : super(key: key); final void Function(String text) onSubmitted; final void Function(String text) onUpload; + final EditorState? editorState; @override State createState() => _ImageUploadMenuState(); @@ -66,6 +70,8 @@ class _ImageUploadMenuState extends State { final _textEditingController = TextEditingController(); final _focusNode = FocusNode(); + EditorStyle? get style => widget.editorState?.editorStyle; + @override void initState() { super.initState(); @@ -84,7 +90,7 @@ class _ImageUploadMenuState extends State { width: 300, padding: const EdgeInsets.all(24.0), decoration: BoxDecoration( - color: Colors.white, + color: style?.selectionMenuBackgroundColor ?? Colors.white, boxShadow: [ BoxShadow( blurRadius: 5, @@ -108,12 +114,12 @@ class _ImageUploadMenuState extends State { } Widget _buildHeader(BuildContext context) { - return const Text( + return Text( 'URL Image', textAlign: TextAlign.left, style: TextStyle( fontSize: 14.0, - color: Colors.black, + color: style?.selectionMenuItemTextColor ?? Colors.black, fontWeight: FontWeight.w500, ), );