From 7884f9a83bcb678ecb87a38945c2b073e4c85fdc Mon Sep 17 00:00:00 2001 From: X Code Date: Sun, 11 Sep 2022 11:38:27 -0700 Subject: [PATCH] Upgrade to 6.0.2 --- CHANGELOG.md | 3 +++ example/lib/main.dart | 5 +++-- lib/src/widgets/delegate.dart | 7 ++----- lib/src/widgets/raw_editor.dart | 4 ++-- pubspec.yaml | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85639249..8a4c2b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [6.0.2] +* Address Dart Analysis issues. + # [6.0.1] * 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. diff --git a/example/lib/main.dart b/example/lib/main.dart index ce398bce..1e71e94b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; + import 'pages/home_page.dart'; void main() { @@ -36,8 +37,8 @@ class MyApp extends StatelessWidget { GlobalCupertinoLocalizations.delegate, ], supportedLocales: [ - const Locale('en', "US"), - const Locale('zh', "HK"), + const Locale('en', 'US'), + const Locale('zh', 'HK'), ], home: HomePage(), ); diff --git a/lib/src/widgets/delegate.dart b/lib/src/widgets/delegate.dart index 817056ed..b70a1d35 100644 --- a/lib/src/widgets/delegate.dart +++ b/lib/src/widgets/delegate.dart @@ -2,9 +2,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter_quill/src/utils/platform.dart'; import '../../flutter_quill.dart'; +import '../utils/platform.dart'; import 'text_selection.dart'; typedef EmbedsBuilder = Widget Function( @@ -114,7 +114,7 @@ class EditorTextSelectionGestureDetectorBuilder { shouldShowSelectionToolbar = kind == null || kind == 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.stylus; } @@ -351,10 +351,7 @@ class EditorTextSelectionGestureDetectorBuilder { onSingleLongTapMoveUpdate: onSingleLongTapMoveUpdate, onSingleLongTapEnd: onSingleLongTapEnd, onDoubleTapDown: onDoubleTapDown, - onSecondaryTapDown: null, onSecondarySingleTapUp: onSecondarySingleTapUp, - onSecondarySingleTapCancel: null, - onSecondaryDoubleTapDown: null, onDragSelectionStart: onDragSelectionStart, onDragSelectionUpdate: onDragSelectionUpdate, onDragSelectionEnd: onDragSelectionEnd, diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index deacdedd..ac2678c9 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -366,7 +366,7 @@ class RawEditorState extends EditorState shortcuts: { // shortcuts added for Windows platform LogicalKeySet(LogicalKeyboardKey.escape): - HideSelectionToolbarIntent(), + const HideSelectionToolbarIntent(), LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyZ): const UndoTextIntent(SelectionChangedCause.keyboard), LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyY): @@ -1885,7 +1885,7 @@ class _CopySelectionAction extends ContextAction { !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 { const HideSelectionToolbarIntent(); } diff --git a/pubspec.yaml b/pubspec.yaml index e6a76bca..587912ac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 6.0.1 +version: 6.0.2 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill