mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: support toggling the markdown style by shortcuts (#3674)
This commit is contained in:
@ -245,7 +245,7 @@ void main() {
|
|||||||
await tester.wait(500);
|
await tester.wait(500);
|
||||||
|
|
||||||
// Focus on the editor
|
// Focus on the editor
|
||||||
final textBlock = find.byType(TextBlockComponentWidget);
|
final textBlock = find.byType(ParagraphBlockComponentWidget);
|
||||||
await tester.tapAt(tester.getCenter(textBlock));
|
await tester.tapAt(tester.getCenter(textBlock));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ void main() {
|
|||||||
LocaleKeys.menuAppHeader_defaultNewPageName.tr(),
|
LocaleKeys.menuAppHeader_defaultNewPageName.tr(),
|
||||||
);
|
);
|
||||||
// and with one paragraph block
|
// and with one paragraph block
|
||||||
expect(find.byType(TextBlockComponentWidget), findsOneWidget);
|
expect(find.byType(ParagraphBlockComponentWidget), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('delete the readme page and restore it', (tester) async {
|
testWidgets('delete the readme page and restore it', (tester) async {
|
||||||
|
@ -30,7 +30,7 @@ void main() {
|
|||||||
LocaleKeys.menuAppHeader_defaultNewPageName.tr(),
|
LocaleKeys.menuAppHeader_defaultNewPageName.tr(),
|
||||||
);
|
);
|
||||||
// and with one paragraph block
|
// and with one paragraph block
|
||||||
expect(find.byType(TextBlockComponentWidget), findsOneWidget);
|
expect(find.byType(ParagraphBlockComponentWidget), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('create a new document, grid, board and calendar',
|
testWidgets('create a new document, grid, board and calendar',
|
||||||
@ -55,7 +55,7 @@ void main() {
|
|||||||
switch (layout) {
|
switch (layout) {
|
||||||
case ViewLayoutPB.Document:
|
case ViewLayoutPB.Document:
|
||||||
// and with one paragraph block
|
// and with one paragraph block
|
||||||
expect(find.byType(TextBlockComponentWidget), findsOneWidget);
|
expect(find.byType(ParagraphBlockComponentWidget), findsOneWidget);
|
||||||
break;
|
break;
|
||||||
case ViewLayoutPB.Grid:
|
case ViewLayoutPB.Grid:
|
||||||
expect(find.byType(GridPage), findsOneWidget);
|
expect(find.byType(GridPage), findsOneWidget);
|
||||||
|
@ -240,7 +240,7 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
|||||||
|
|
||||||
final customBlockComponentBuilderMap = {
|
final customBlockComponentBuilderMap = {
|
||||||
PageBlockKeys.type: PageBlockComponentBuilder(),
|
PageBlockKeys.type: PageBlockComponentBuilder(),
|
||||||
ParagraphBlockKeys.type: TextBlockComponentBuilder(
|
ParagraphBlockKeys.type: ParagraphBlockComponentBuilder(
|
||||||
configuration: configuration,
|
configuration: configuration,
|
||||||
),
|
),
|
||||||
TodoListBlockKeys.type: TodoListBlockComponentBuilder(
|
TodoListBlockKeys.type: TodoListBlockComponentBuilder(
|
||||||
|
@ -47,7 +47,7 @@ class BlockOptionButton extends StatelessWidget {
|
|||||||
: PopoverDirection.leftWithCenterAligned,
|
: PopoverDirection.leftWithCenterAligned,
|
||||||
actions: popoverActions,
|
actions: popoverActions,
|
||||||
onPopupBuilder: () {
|
onPopupBuilder: () {
|
||||||
keepEditorFocusNotifier.value += 1;
|
keepEditorFocusNotifier.increase();
|
||||||
blockComponentState.alwaysShowActions = true;
|
blockComponentState.alwaysShowActions = true;
|
||||||
},
|
},
|
||||||
onClosed: () {
|
onClosed: () {
|
||||||
@ -55,7 +55,7 @@ class BlockOptionButton extends StatelessWidget {
|
|||||||
editorState.selectionType = null;
|
editorState.selectionType = null;
|
||||||
editorState.selection = null;
|
editorState.selection = null;
|
||||||
blockComponentState.alwaysShowActions = false;
|
blockComponentState.alwaysShowActions = false;
|
||||||
keepEditorFocusNotifier.value -= 1;
|
keepEditorFocusNotifier.decrease();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onSelected: (action, controller) {
|
onSelected: (action, controller) {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
|
|
@ -3,7 +3,6 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/actions/op
|
|||||||
import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart';
|
import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart';
|
||||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||||
|
|
||||||
import 'package:flowy_infra_ui/widget/ignore_parent_gesture.dart';
|
import 'package:flowy_infra_ui/widget/ignore_parent_gesture.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@ -112,32 +111,6 @@ class OptionActionList extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BlockComponentActionButton extends StatelessWidget {
|
|
||||||
const BlockComponentActionButton({
|
|
||||||
super.key,
|
|
||||||
required this.icon,
|
|
||||||
required this.onTap,
|
|
||||||
});
|
|
||||||
|
|
||||||
final bool isHovering = false;
|
|
||||||
final Widget icon;
|
|
||||||
final VoidCallback onTap;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return MouseRegion(
|
|
||||||
cursor: SystemMouseCursors.grab,
|
|
||||||
child: GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: onTap,
|
|
||||||
onTapDown: (details) {},
|
|
||||||
onTapUp: (details) {},
|
|
||||||
child: icon,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class OptionActionButton extends StatelessWidget {
|
class OptionActionButton extends StatelessWidget {
|
||||||
const OptionActionButton({
|
const OptionActionButton({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -11,7 +11,7 @@ final alignToolbarItem = ToolbarItem(
|
|||||||
id: 'editor.align',
|
id: 'editor.align',
|
||||||
group: 4,
|
group: 4,
|
||||||
isActive: onlyShowInTextType,
|
isActive: onlyShowInTextType,
|
||||||
builder: (context, editorState, highlightColor) {
|
builder: (context, editorState, highlightColor, _) {
|
||||||
final selection = editorState.selection!;
|
final selection = editorState.selection!;
|
||||||
final nodes = editorState.getNodesInSelection(selection);
|
final nodes = editorState.getNodesInSelection(selection);
|
||||||
|
|
||||||
@ -89,11 +89,11 @@ class _AlignmentButtonsState extends State<_AlignmentButtons> {
|
|||||||
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
||||||
),
|
),
|
||||||
popupBuilder: (_) {
|
popupBuilder: (_) {
|
||||||
keepEditorFocusNotifier.value += 1;
|
keepEditorFocusNotifier.increase();
|
||||||
return _AlignButtons(onAlignChanged: widget.onAlignChanged);
|
return _AlignButtons(onAlignChanged: widget.onAlignChanged);
|
||||||
},
|
},
|
||||||
onClose: () {
|
onClose: () {
|
||||||
keepEditorFocusNotifier.value -= 1;
|
keepEditorFocusNotifier.decrease();
|
||||||
},
|
},
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/base/insert_page_command.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/base/insert_page_command.dart';
|
||||||
import 'package:appflowy/workspace/application/view/view_ext.dart';
|
import 'package:appflowy/workspace/application/view/view_ext.dart';
|
||||||
import 'package:appflowy/workspace/application/view/view_service.dart';
|
import 'package:appflowy/workspace/application/view/view_service.dart';
|
||||||
@ -6,13 +7,12 @@ import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
|
|||||||
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
||||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
import 'package:flowy_infra_ui/widget/error_page.dart';
|
import 'package:flowy_infra_ui/widget/error_page.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
|
||||||
|
|
||||||
void showLinkToPageMenu(
|
void showLinkToPageMenu(
|
||||||
OverlayState container,
|
OverlayState container,
|
||||||
@ -27,13 +27,13 @@ void showLinkToPageMenu(
|
|||||||
final top = alignment == Alignment.bottomLeft ? offset.dy : null;
|
final top = alignment == Alignment.bottomLeft ? offset.dy : null;
|
||||||
final bottom = alignment == Alignment.topLeft ? offset.dy : null;
|
final bottom = alignment == Alignment.topLeft ? offset.dy : null;
|
||||||
|
|
||||||
keepEditorFocusNotifier.value += 1;
|
keepEditorFocusNotifier.increase();
|
||||||
late OverlayEntry linkToPageMenuEntry;
|
late OverlayEntry linkToPageMenuEntry;
|
||||||
linkToPageMenuEntry = FullScreenOverlayEntry(
|
linkToPageMenuEntry = FullScreenOverlayEntry(
|
||||||
top: top,
|
top: top,
|
||||||
bottom: bottom,
|
bottom: bottom,
|
||||||
left: offset.dx,
|
left: offset.dx,
|
||||||
dismissCallback: () => keepEditorFocusNotifier.value -= 1,
|
dismissCallback: () => keepEditorFocusNotifier.decrease(),
|
||||||
builder: (context) => Material(
|
builder: (context) => Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: LinkToPageMenu(
|
child: LinkToPageMenu(
|
||||||
|
@ -24,7 +24,7 @@ class FindAndReplaceMenuWidget extends StatefulWidget {
|
|||||||
class _FindAndReplaceMenuWidgetState extends State<FindAndReplaceMenuWidget> {
|
class _FindAndReplaceMenuWidgetState extends State<FindAndReplaceMenuWidget> {
|
||||||
bool showReplaceMenu = false;
|
bool showReplaceMenu = false;
|
||||||
|
|
||||||
late SearchServiceV2 searchService = SearchServiceV2(
|
late SearchServiceV3 searchService = SearchServiceV3(
|
||||||
editorState: widget.editorState,
|
editorState: widget.editorState,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class FindMenu extends StatefulWidget {
|
|||||||
|
|
||||||
final EditorState editorState;
|
final EditorState editorState;
|
||||||
final VoidCallback onDismiss;
|
final VoidCallback onDismiss;
|
||||||
final SearchServiceV2 searchService;
|
final SearchServiceV3 searchService;
|
||||||
final void Function(bool value) onShowReplace;
|
final void Function(bool value) onShowReplace;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -93,7 +93,7 @@ class _FindMenuState extends State<FindMenu> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
widget.searchService.matchedPositions.addListener(_setState);
|
widget.searchService.matchWrappers.addListener(_setState);
|
||||||
widget.searchService.currentSelectedIndex.addListener(_setState);
|
widget.searchService.currentSelectedIndex.addListener(_setState);
|
||||||
|
|
||||||
findTextEditingController.addListener(_searchPattern);
|
findTextEditingController.addListener(_searchPattern);
|
||||||
@ -105,7 +105,7 @@ class _FindMenuState extends State<FindMenu> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
widget.searchService.matchedPositions.removeListener(_setState);
|
widget.searchService.matchWrappers.removeListener(_setState);
|
||||||
widget.searchService.currentSelectedIndex.removeListener(_setState);
|
widget.searchService.currentSelectedIndex.removeListener(_setState);
|
||||||
widget.searchService.dispose();
|
widget.searchService.dispose();
|
||||||
findTextEditingController.removeListener(_searchPattern);
|
findTextEditingController.removeListener(_searchPattern);
|
||||||
@ -117,7 +117,7 @@ class _FindMenuState extends State<FindMenu> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// the selectedIndex from searchService is 0-based
|
// the selectedIndex from searchService is 0-based
|
||||||
final selectedIndex = widget.searchService.selectedIndex + 1;
|
final selectedIndex = widget.searchService.selectedIndex + 1;
|
||||||
final matches = widget.searchService.matchedPositions.value;
|
final matches = widget.searchService.matchWrappers.value;
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
const HSpace(4.0),
|
const HSpace(4.0),
|
||||||
@ -232,7 +232,7 @@ class ReplaceMenu extends StatefulWidget {
|
|||||||
/// The localizations of the find and replace menu
|
/// The localizations of the find and replace menu
|
||||||
final FindReplaceLocalizations? localizations;
|
final FindReplaceLocalizations? localizations;
|
||||||
|
|
||||||
final SearchServiceV2 searchService;
|
final SearchServiceV3 searchService;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ReplaceMenu> createState() => _ReplaceMenuState();
|
State<ReplaceMenu> createState() => _ReplaceMenuState();
|
||||||
|
@ -9,7 +9,7 @@ final customizeFontToolbarItem = ToolbarItem(
|
|||||||
id: 'editor.font',
|
id: 'editor.font',
|
||||||
group: 4,
|
group: 4,
|
||||||
isActive: onlyShowInTextType,
|
isActive: onlyShowInTextType,
|
||||||
builder: (context, editorState, highlightColor) {
|
builder: (context, editorState, highlightColor, _) {
|
||||||
final selection = editorState.selection!;
|
final selection = editorState.selection!;
|
||||||
final popoverController = PopoverController();
|
final popoverController = PopoverController();
|
||||||
return MouseRegion(
|
return MouseRegion(
|
||||||
@ -18,8 +18,8 @@ final customizeFontToolbarItem = ToolbarItem(
|
|||||||
currentFontFamily: '',
|
currentFontFamily: '',
|
||||||
offset: const Offset(0, 12),
|
offset: const Offset(0, 12),
|
||||||
popoverController: popoverController,
|
popoverController: popoverController,
|
||||||
onOpen: () => keepEditorFocusNotifier.value += 1,
|
onOpen: () => keepEditorFocusNotifier.increase(),
|
||||||
onClose: () => keepEditorFocusNotifier.value -= 1,
|
onClose: () => keepEditorFocusNotifier.decrease(),
|
||||||
showResetButton: true,
|
showResetButton: true,
|
||||||
onFontFamilyChanged: (fontFamily) async {
|
onFontFamilyChanged: (fontFamily) async {
|
||||||
popoverController.close();
|
popoverController.close();
|
||||||
|
@ -3,14 +3,13 @@ import 'package:appflowy/generated/locale_keys.g.dart';
|
|||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/plugins.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/plugins.dart';
|
||||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
final ToolbarItem inlineMathEquationItem = ToolbarItem(
|
final ToolbarItem inlineMathEquationItem = ToolbarItem(
|
||||||
id: 'editor.inline_math_equation',
|
id: 'editor.inline_math_equation',
|
||||||
group: 2,
|
group: 2,
|
||||||
isActive: onlyShowInSingleSelectionAndTextType,
|
isActive: onlyShowInSingleSelectionAndTextType,
|
||||||
builder: (context, editorState, highlightColor) {
|
builder: (context, editorState, highlightColor, _) {
|
||||||
final selection = editorState.selection!;
|
final selection = editorState.selection!;
|
||||||
final nodes = editorState.getNodesInSelection(selection);
|
final nodes = editorState.getNodesInSelection(selection);
|
||||||
final isHighlight = nodes.allSatisfyInSelection(selection, (delta) {
|
final isHighlight = nodes.allSatisfyInSelection(selection, (delta) {
|
||||||
|
@ -14,7 +14,7 @@ final ToolbarItem smartEditItem = ToolbarItem(
|
|||||||
id: 'appflowy.editor.smart_edit',
|
id: 'appflowy.editor.smart_edit',
|
||||||
group: 0,
|
group: 0,
|
||||||
isActive: onlyShowInSingleSelectionAndTextType,
|
isActive: onlyShowInSingleSelectionAndTextType,
|
||||||
builder: (context, editorState, _) => SmartEditActionList(
|
builder: (context, editorState, _, __) => SmartEditActionList(
|
||||||
editorState: editorState,
|
editorState: editorState,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -55,9 +55,9 @@ class _SmartEditActionListState extends State<SmartEditActionList> {
|
|||||||
actions: SmartEditAction.values
|
actions: SmartEditAction.values
|
||||||
.map((action) => SmartEditActionWrapper(action))
|
.map((action) => SmartEditActionWrapper(action))
|
||||||
.toList(),
|
.toList(),
|
||||||
onClosed: () => keepEditorFocusNotifier.value -= 1,
|
onClosed: () => keepEditorFocusNotifier.decrease(),
|
||||||
buildChild: (controller) {
|
buildChild: (controller) {
|
||||||
keepEditorFocusNotifier.value += 1;
|
keepEditorFocusNotifier.increase();
|
||||||
return FlowyIconButton(
|
return FlowyIconButton(
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
tooltipText: isOpenAIEnabled
|
tooltipText: isOpenAIEnabled
|
||||||
|
@ -163,16 +163,19 @@ class _ToggleListBlockComponentWidgetState
|
|||||||
textDirection: textDirection,
|
textDirection: textDirection,
|
||||||
children: [
|
children: [
|
||||||
// the emoji picker button for the note
|
// the emoji picker button for the note
|
||||||
FlowyIconButton(
|
Container(
|
||||||
width: 24.0,
|
constraints: const BoxConstraints(minWidth: 26, minHeight: 22),
|
||||||
|
padding: const EdgeInsets.only(right: 4.0),
|
||||||
|
child: FlowyIconButton(
|
||||||
|
width: 18.0,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
collapsed ? Icons.arrow_right : Icons.arrow_drop_down,
|
collapsed ? Icons.arrow_right : Icons.arrow_drop_down,
|
||||||
|
size: 18.0,
|
||||||
),
|
),
|
||||||
onPressed: onCollapsed,
|
onPressed: onCollapsed,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
|
||||||
width: 4.0,
|
|
||||||
),
|
),
|
||||||
|
|
||||||
Flexible(
|
Flexible(
|
||||||
child: AppFlowyRichText(
|
child: AppFlowyRichText(
|
||||||
key: forwardKey,
|
key: forwardKey,
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/inline_math_equation/inline_math_equation.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/inline_math_equation/inline_math_equation.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/mention/mention_block.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/mention/mention_block.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/more/cubit/document_appearance_cubit.dart';
|
import 'package:appflowy/plugins/document/presentation/more/cubit/document_appearance_cubit.dart';
|
||||||
|
|
||||||
import 'package:appflowy/plugins/inline_actions/inline_actions_menu.dart';
|
import 'package:appflowy/plugins/inline_actions/inline_actions_menu.dart';
|
||||||
|
|
||||||
import 'package:appflowy/util/google_font_family_extension.dart';
|
import 'package:appflowy/util/google_font_family_extension.dart';
|
||||||
|
|
||||||
import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
|
import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -63,12 +60,13 @@ class EditorStyleCustomizer {
|
|||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
),
|
),
|
||||||
code: GoogleFonts.robotoMono(
|
code: GoogleFonts.arefRuqaaInk(
|
||||||
textStyle: baseTextStyle(fontFamily).copyWith(
|
textStyle: baseTextStyle(fontFamily).copyWith(
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
|
fontStyle: FontStyle.italic,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
backgroundColor: theme.colorScheme.inverseSurface,
|
backgroundColor: theme.colorScheme.inverseSurface.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -102,7 +100,7 @@ class EditorStyleCustomizer {
|
|||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
),
|
),
|
||||||
code: GoogleFonts.robotoMono(
|
code: GoogleFonts.arefRuqaaInk(
|
||||||
textStyle: baseTextStyle(fontFamily).copyWith(
|
textStyle: baseTextStyle(fontFamily).copyWith(
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
|
@ -36,12 +36,12 @@ void showEmojiPickerMenu(
|
|||||||
final top = alignment == Alignment.topLeft ? offset.dy : null;
|
final top = alignment == Alignment.topLeft ? offset.dy : null;
|
||||||
final bottom = alignment == Alignment.bottomLeft ? offset.dy : null;
|
final bottom = alignment == Alignment.bottomLeft ? offset.dy : null;
|
||||||
|
|
||||||
keepEditorFocusNotifier.value += 1;
|
keepEditorFocusNotifier.increase();
|
||||||
final emojiPickerMenuEntry = FullScreenOverlayEntry(
|
final emojiPickerMenuEntry = FullScreenOverlayEntry(
|
||||||
top: top,
|
top: top,
|
||||||
bottom: bottom,
|
bottom: bottom,
|
||||||
left: offset.dx,
|
left: offset.dx,
|
||||||
dismissCallback: () => keepEditorFocusNotifier.value -= 1,
|
dismissCallback: () => keepEditorFocusNotifier.decrease(),
|
||||||
builder: (context) => Material(
|
builder: (context) => Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -54,11 +54,11 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: adb05d4
|
ref: "194fe2f"
|
||||||
resolved-ref: adb05d4c49fe2f518e5554cc7d6c2fbe3b01670d
|
resolved-ref: "194fe2fec9ce00baa2d5f2afbbfe0a45b3a7b158"
|
||||||
url: "https://github.com/AppFlowy-IO/appflowy-editor.git"
|
url: "https://github.com/AppFlowy-IO/appflowy-editor.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.4.3"
|
version: "1.4.4"
|
||||||
appflowy_popover:
|
appflowy_popover:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -47,7 +47,7 @@ dependencies:
|
|||||||
appflowy_editor:
|
appflowy_editor:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/AppFlowy-IO/appflowy-editor.git
|
url: https://github.com/AppFlowy-IO/appflowy-editor.git
|
||||||
ref: "adb05d4"
|
ref: "194fe2f"
|
||||||
appflowy_popover:
|
appflowy_popover:
|
||||||
path: packages/appflowy_popover
|
path: packages/appflowy_popover
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user