From 0ef2959e4b4d45c762a8a763f4648e1ed33d41c6 Mon Sep 17 00:00:00 2001 From: Cheryl Date: Sun, 6 Aug 2023 19:15:36 -0700 Subject: [PATCH] Upgrade to 7.3.1 --- CHANGELOG.md | 6 ++++++ lib/src/models/documents/document.dart | 2 +- lib/src/widgets/toolbar/search_dialog.dart | 10 +++++----- pubspec.yaml | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 637f1082..f1c2661e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [7.3.1] +- Added case sensitive and whole word search parameters. +- Added wrap around. +- Moved search dialog to the bottom in order not to override the editor and the text found. +- Other minor search dialog enhancements. + # [7.3.0] - Add default attributes to basic factory. diff --git a/lib/src/models/documents/document.dart b/lib/src/models/documents/document.dart index 50925160..b62299d1 100644 --- a/lib/src/models/documents/document.dart +++ b/lib/src/models/documents/document.dart @@ -232,7 +232,7 @@ class Document { pattern = r'\b' + pattern + r'\b'; } final searchExpression = RegExp(pattern, caseSensitive: caseSensitive); - while (true) { + while (true) { index = lineText.indexOf(searchExpression, index + 1); if (index < 0) { break; diff --git a/lib/src/widgets/toolbar/search_dialog.dart b/lib/src/widgets/toolbar/search_dialog.dart index 08babac1..ef9e8bc1 100644 --- a/lib/src/widgets/toolbar/search_dialog.dart +++ b/lib/src/widgets/toolbar/search_dialog.dart @@ -58,9 +58,9 @@ class _SearchDialogState extends State { child: Row( children: [ Tooltip( - message: 'Case sensitivity and whole word search', + message: 'Case sensitivity and whole word search'.i18n, child: ToggleButtons( - onPressed: (int index) { + onPressed: (index) { if (index == 0) { _changeCaseSensitivity(); } else if (index == 1) { @@ -108,19 +108,19 @@ class _SearchDialogState extends State { if (_offsets == null) IconButton( icon: const Icon(Icons.search), - tooltip: 'Find text', + tooltip: 'Find text'.i18n, onPressed: _findText, ), if (_offsets != null) IconButton( icon: const Icon(Icons.keyboard_arrow_up), - tooltip: 'Move to previous occurrence', + tooltip: 'Move to previous occurrence'.i18n, onPressed: (_offsets!.isNotEmpty) ? _moveToPrevious : null, ), if (_offsets != null) IconButton( icon: const Icon(Icons.keyboard_arrow_down), - tooltip: 'Move to next occurrence', + tooltip: 'Move to next occurrence'.i18n, onPressed: (_offsets!.isNotEmpty) ? _moveToNext : null, ), ], diff --git a/pubspec.yaml b/pubspec.yaml index d0ae4fa7..ed564884 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter. -version: 7.3.0 +version: 7.3.1 homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill