From 500a0f8705ea80f8b6190b8edca1a298b1720238 Mon Sep 17 00:00:00 2001 From: Ellet Date: Sun, 3 Nov 2024 17:12:53 +0300 Subject: [PATCH] chore(deps): update Dart SDK constraints for compatibility Updated the minimum required Dart SDK from 3.2.0 to 3.0.0 to ensure compatibility. --- CHANGELOG.md | 4 ++++ lib/src/operation/operation.dart | 8 ++++---- pubspec.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5843e3c..ae46c57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 10.8.2 + +* Updated the minimum required Dart SDK from `3.2.0` to `3.0.0` for improved compatibility. + ## 10.8.1 * Seperate [dart_quill_delta](https://pub.dev/packages/dart_quill_delta) version from [flutter_quill](https://pub.dev/packages/flutter_quill). Discussed in [Flutter Quill #2259](https://github.com/singerdmx/flutter-quill/issues/2259) \ No newline at end of file diff --git a/lib/src/operation/operation.dart b/lib/src/operation/operation.dart index 126942a..49a665c 100644 --- a/lib/src/operation/operation.dart +++ b/lib/src/operation/operation.dart @@ -62,7 +62,7 @@ class Operation { /// Rich-text attributes set by this operation, can be `null`. Map? get attributes => - _attributes == null ? null : Map.from(_attributes); + _attributes == null ? null : Map.from(_attributes!); final Map? _attributes; /// Creates new [Operation] from JSON payload. @@ -110,7 +110,7 @@ class Operation { bool get isRetain => key == Operation.retainKey; /// Returns `true` if this operation has no attributes, e.g. is plain text. - bool get isPlain => _attributes == null || _attributes.isEmpty; + bool get isPlain => (_attributes == null || _attributes!.isEmpty); /// Returns `true` if this operation sets at least one attribute. bool get isNotPlain => !isPlain; @@ -150,9 +150,9 @@ class Operation { @override int get hashCode { - if (_attributes != null && _attributes.isNotEmpty) { + if (_attributes != null && _attributes!.isNotEmpty) { final attrsHash = - hashObjects(_attributes.entries.map((e) => hash2(e.key, e.value))); + hashObjects(_attributes!.entries.map((e) => hash2(e.key, e.value))); return hash3(key, value, attrsHash); } return hash2(key, value); diff --git a/pubspec.yaml b/pubspec.yaml index 5fa9a64..2b67d64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,13 +1,13 @@ name: dart_quill_delta description: "A Dart port of quill-js-delta, offering a simple and expressive JSON format for describing rich-text content and its changes." -version: 10.8.1 +version: 10.8.2 homepage: https://github.com/FlutterQuill/dart-quill-delta repository: https://github.com/FlutterQuill/dart-quill-delta issue_tracker: https://github.com/FlutterQuill/dart-quill-delta/issues documentation: https://github.com/FlutterQuill/dart-quill-delta environment: - sdk: ^3.2.3 + sdk: ^3.0.0 dependencies: collection: ^1.17.0 @@ -15,5 +15,5 @@ dependencies: quiver: ^3.2.1 dev_dependencies: - lints: ^4.0.0 - test: ^1.24.0 + lints: ^5.0.0 + test: ^1.25.8