From 6019403b9519d9551536d2d6d77a28c8eb5390b1 Mon Sep 17 00:00:00 2001 From: Egor Korshun <120365747+EgorK0rshun@users.noreply.github.com> Date: Sat, 28 Oct 2023 16:29:44 +0300 Subject: [PATCH 1/2] Fix #1487 (#1488) --- CHANGELOG.md | 3 +++ lib/src/models/documents/nodes/line.dart | 12 ++++++------ pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92350ddc..5776f039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [8.1.1] +- Fix null error in line.dart [#1487](https://github.com/singerdmx/flutter-quill/issues/1487) + ## [8.1.0] - Fixes a word typo of `mirgration` to `migration` in readme & migration document. - Updated migration guide diff --git a/lib/src/models/documents/nodes/line.dart b/lib/src/models/documents/nodes/line.dart index b34f00fa..58ba9cc6 100644 --- a/lib/src/models/documents/nodes/line.dart +++ b/lib/src/models/documents/nodes/line.dart @@ -182,12 +182,12 @@ class Line extends Container { // nextLine might have been unmounted since last assert so we need to // check again we still have a line after us. - assert(nextLine != null); - - // Move remaining children in this line to the next line so that all - // attributes of nextLine are preserved. - nextLine!.moveChildToNewParent(this); - moveChildToNewParent(nextLine); + if (nextLine != null) { + // Move remaining children in this line to the next line so that all + // attributes of nextLine are preserved. + nextLine?.moveChildToNewParent(this); + moveChildToNewParent(nextLine); + } } if (isLFDeleted) { diff --git a/pubspec.yaml b/pubspec.yaml index 86abf644..8fd42e6e 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: 8.1.0 +version: 8.1.1 homepage: https://1o24bbs.com/c/bulletjournal/108 repository: https://github.com/singerdmx/flutter-quill topics: From 3e9ab4bd4d56a5599c7cd07e3e4fd108e4034eee Mon Sep 17 00:00:00 2001 From: X Code Date: Sun, 29 Oct 2023 13:21:35 -0700 Subject: [PATCH 2/2] Create publish.yml --- .github/workflows/publish.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..b51a07c7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,12 @@ +name: Publish to pub.dev + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' + +jobs: + publish: + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 + # with: + # working-directory: path/to/package/within/repository