Upgrade to 6.0.2

pull/950/head
X Code 3 years ago
parent d966db1394
commit 7884f9a83b
  1. 3
      CHANGELOG.md
  2. 5
      example/lib/main.dart
  3. 7
      lib/src/widgets/delegate.dart
  4. 4
      lib/src/widgets/raw_editor.dart
  5. 2
      pubspec.yaml

@ -1,3 +1,6 @@
# [6.0.2]
* Address Dart Analysis issues.
# [6.0.1] # [6.0.1]
* Changed translation country code (zh_HK -> zh_hk) to lower case, which is required for i18n_extension used in flutter_quill. * Changed translation country code (zh_HK -> zh_hk) to lower case, which is required for i18n_extension used in flutter_quill.
* Add localization in example's main to demonstrate translation. * Add localization in example's main to demonstrate translation.

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'pages/home_page.dart'; import 'pages/home_page.dart';
void main() { void main() {
@ -36,8 +37,8 @@ class MyApp extends StatelessWidget {
GlobalCupertinoLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
], ],
supportedLocales: [ supportedLocales: [
const Locale('en', "US"), const Locale('en', 'US'),
const Locale('zh', "HK"), const Locale('zh', 'HK'),
], ],
home: HomePage(), home: HomePage(),
); );

@ -2,9 +2,9 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart'; import 'package:flutter/scheduler.dart';
import 'package:flutter_quill/src/utils/platform.dart';
import '../../flutter_quill.dart'; import '../../flutter_quill.dart';
import '../utils/platform.dart';
import 'text_selection.dart'; import 'text_selection.dart';
typedef EmbedsBuilder = Widget Function( typedef EmbedsBuilder = Widget Function(
@ -114,7 +114,7 @@ class EditorTextSelectionGestureDetectorBuilder {
shouldShowSelectionToolbar = kind == null || shouldShowSelectionToolbar = kind == null ||
kind == kind ==
PointerDeviceKind PointerDeviceKind
.mouse || // this is added to enable word selection by mouse double tap .mouse || // Enable word selection by mouse double tap
kind == PointerDeviceKind.touch || kind == PointerDeviceKind.touch ||
kind == PointerDeviceKind.stylus; kind == PointerDeviceKind.stylus;
} }
@ -351,10 +351,7 @@ class EditorTextSelectionGestureDetectorBuilder {
onSingleLongTapMoveUpdate: onSingleLongTapMoveUpdate, onSingleLongTapMoveUpdate: onSingleLongTapMoveUpdate,
onSingleLongTapEnd: onSingleLongTapEnd, onSingleLongTapEnd: onSingleLongTapEnd,
onDoubleTapDown: onDoubleTapDown, onDoubleTapDown: onDoubleTapDown,
onSecondaryTapDown: null,
onSecondarySingleTapUp: onSecondarySingleTapUp, onSecondarySingleTapUp: onSecondarySingleTapUp,
onSecondarySingleTapCancel: null,
onSecondaryDoubleTapDown: null,
onDragSelectionStart: onDragSelectionStart, onDragSelectionStart: onDragSelectionStart,
onDragSelectionUpdate: onDragSelectionUpdate, onDragSelectionUpdate: onDragSelectionUpdate,
onDragSelectionEnd: onDragSelectionEnd, onDragSelectionEnd: onDragSelectionEnd,

@ -366,7 +366,7 @@ class RawEditorState extends EditorState
shortcuts: <LogicalKeySet, Intent>{ shortcuts: <LogicalKeySet, Intent>{
// shortcuts added for Windows platform // shortcuts added for Windows platform
LogicalKeySet(LogicalKeyboardKey.escape): LogicalKeySet(LogicalKeyboardKey.escape):
HideSelectionToolbarIntent(), const HideSelectionToolbarIntent(),
LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyZ): LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyZ):
const UndoTextIntent(SelectionChangedCause.keyboard), const UndoTextIntent(SelectionChangedCause.keyboard),
LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyY): LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyY):
@ -1885,7 +1885,7 @@ class _CopySelectionAction extends ContextAction<CopySelectionTextIntent> {
!state.textEditingValue.selection.isCollapsed; !state.textEditingValue.selection.isCollapsed;
} }
// intent class for "escape" key to dismiss selection toolbar in Windows platform //Intent class for "escape" key to dismiss selection toolbar in Windows platform
class HideSelectionToolbarIntent extends Intent { class HideSelectionToolbarIntent extends Intent {
const HideSelectionToolbarIntent(); const HideSelectionToolbarIntent();
} }

@ -1,6 +1,6 @@
name: flutter_quill name: flutter_quill
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
version: 6.0.1 version: 6.0.2
#author: bulletjournal #author: bulletjournal
homepage: https://bulletjournal.us/home/index.html homepage: https://bulletjournal.us/home/index.html
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill

Loading…
Cancel
Save