Fix #1392: UnhandledFlutterException: Null check operator used on a null value in Container.insert(container.dart:127) (#1393)

pull/1396/head
Egor Korshun 2 years ago committed by GitHub
parent 36d72c1987
commit 4eb2d1d9f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 16
      lib/src/models/documents/nodes/container.dart
  3. 2
      pubspec.yaml

@ -1,3 +1,6 @@
# [7.4.5]
- Fix #1392.
# [7.4.4] # [7.4.4]
- Fix #1311. - Fix #1311.

@ -124,15 +124,15 @@ abstract class Container<T extends Node?> extends Node {
if (isNotEmpty) { if (isNotEmpty) {
final child = queryChild(index, false); final child = queryChild(index, false);
child.node!.insert(child.offset, data, style); if (child.isNotEmpty) {
return; child.node!.insert(child.offset, data, style);
}
} else {
assert(index == 0);
final node = defaultChild;
add(node);
node?.insert(index, data, style);
} }
// empty
assert(index == 0);
final node = defaultChild;
add(node);
node?.insert(index, data, style);
} }
@override @override

@ -1,6 +1,6 @@
name: flutter_quill 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. 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.4.4 version: 7.4.5
homepage: https://1o24bbs.com/c/bulletjournal/108 homepage: https://1o24bbs.com/c/bulletjournal/108
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill

Loading…
Cancel
Save