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

pull/1393/head
EgorK0rshun 2 years ago
parent 36d72c1987
commit 6be6fe0e6a
  1. 3
      CHANGELOG.md
  2. 10
      lib/src/models/documents/nodes/container.dart
  3. 2
      pubspec.yaml

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

@ -108,9 +108,7 @@ abstract class Container<T extends Node?> extends Node {
Iterable<EmbedBuilder>? embedBuilders,
EmbedBuilder? unknownEmbedBuilder,
]) =>
children
.map((e) => e.toPlainText(embedBuilders, unknownEmbedBuilder))
.join();
children.map((e) => e.toPlainText(embedBuilders, unknownEmbedBuilder)).join();
/// Content length of this node's children.
///
@ -124,16 +122,16 @@ abstract class Container<T extends Node?> extends Node {
if (isNotEmpty) {
final child = queryChild(index, false);
if (child.isNotEmpty) {
child.node!.insert(child.offset, data, style);
return;
}
// empty
} else {
assert(index == 0);
final node = defaultChild;
add(node);
node?.insert(index, data, style);
}
}
@override
void retain(int index, int? length, Style? attributes) {

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

Loading…
Cancel
Save