mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: build regression (#4667)
This commit is contained in:
@ -3,9 +3,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:appflowy/workspace/presentation/settings/widgets/emoji_picker/emoji_picker.dart';
|
import 'package:appflowy/workspace/presentation/settings/widgets/emoji_picker/emoji_picker.dart';
|
||||||
|
|
||||||
final CommandShortcutEvent emojiShortcutEvent = CommandShortcutEvent(
|
final CommandShortcutEvent emojiShortcutEvent = CommandShortcutEvent(
|
||||||
key: 'show emoji picker',
|
key: 'Ctrl + Alt + E to show emoji picker',
|
||||||
command: 'ctrl+alt+e',
|
command: 'ctrl+alt+e',
|
||||||
macOSCommand: 'cmd+alt+e',
|
macOSCommand: 'cmd+alt+e',
|
||||||
|
getDescription: () => 'Show an emoji picker',
|
||||||
handler: _emojiShortcutHandler,
|
handler: _emojiShortcutHandler,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -46,7 +47,7 @@ CommandShortcutEventHandler _emojiShortcutHandler = (editorState) {
|
|||||||
alignment = Alignment.topLeft;
|
alignment = Alignment.topLeft;
|
||||||
final bottomRight = rect.bottomRight;
|
final bottomRight = rect.bottomRight;
|
||||||
final topRight = rect.topRight;
|
final topRight = rect.topRight;
|
||||||
var newOffset = bottomRight + menuOffset;
|
final newOffset = bottomRight + menuOffset;
|
||||||
offset = Offset(
|
offset = Offset(
|
||||||
newOffset.dx,
|
newOffset.dx,
|
||||||
newOffset.dy,
|
newOffset.dy,
|
||||||
@ -65,7 +66,7 @@ CommandShortcutEventHandler _emojiShortcutHandler = (editorState) {
|
|||||||
|
|
||||||
// show on left
|
// show on left
|
||||||
if (offset.dx - editorOffset.dx > editorWidth / 2) {
|
if (offset.dx - editorOffset.dx > editorWidth / 2) {
|
||||||
alignment = _alignment == Alignment.topLeft
|
alignment = alignment == Alignment.topLeft
|
||||||
? Alignment.topRight
|
? Alignment.topRight
|
||||||
: Alignment.bottomRight;
|
: Alignment.bottomRight;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user