Code refactor

pull/950/head
X Code 3 years ago
parent 7884f9a83b
commit ffbd50cd04
  1. 4
      README.md
  2. 2
      lib/src/translations/toolbar.i18n.dart
  3. 10
      lib/src/widgets/delegate.dart

@ -332,8 +332,8 @@ Currently, translations are available for these 22 locales:
* `Locale('de')` * `Locale('de')`
* `Locale('da')` * `Locale('da')`
* `Locale('fr')` * `Locale('fr')`
* `Locale('zh', 'CN')` * `Locale('zh', 'cn')`
* `Locale('zh', 'HK')` * `Locale('zh', 'hk')`
* `Locale('ko')` * `Locale('ko')`
* `Locale('ru')` * `Locale('ru')`
* `Locale('es')` * `Locale('es')`

@ -202,7 +202,7 @@ extension Localization on String {
'Camera': 'Camera', 'Camera': 'Camera',
'Video': 'Video', 'Video': 'Video',
}, },
'zh_CN': { 'zh_cn': {
'Paste a link': '粘贴链接', 'Paste a link': '粘贴链接',
'Ok': '', 'Ok': '',
'Select Color': '选择颜色', 'Select Color': '选择颜色',

@ -324,13 +324,11 @@ class EditorTextSelectionGestureDetectorBuilder {
@protected @protected
void onDragSelectionEnd(DragEndDetails details) { void onDragSelectionEnd(DragEndDetails details) {
renderEditor!.handleDragEnd(details); renderEditor!.handleDragEnd(details);
if (isDesktop()) { if (isDesktop() &&
delegate.selectionEnabled &&
shouldShowSelectionToolbar) {
// added to show selection copy/paste toolbar after drag to select // added to show selection copy/paste toolbar after drag to select
if (delegate.selectionEnabled) { editor!.showToolbar();
if (shouldShowSelectionToolbar) {
editor!.showToolbar();
}
}
} }
} }

Loading…
Cancel
Save