Update Line _format method

pull/180/head
Xin Yao 4 years ago
parent 451dffc4cd
commit ca9a13b150
  1. 7
      lib/models/documents/nodes/line.dart
  2. 2
      lib/widgets/controller.dart

@ -1,5 +1,7 @@
import 'dart:math' as math;
import 'package:collection/collection.dart';
import '../../quill_delta.dart';
import '../attribute.dart';
import '../style.dart';
@ -203,10 +205,11 @@ class Line extends Container<Leaf?> {
} // No block-level changes
if (parent is Block) {
final parentStyle = (parent as Block).style.getBlockExceptHeader();
final parentStyle = (parent as Block).style.getBlocksExceptHeader();
if (blockStyle.value == null) {
_unwrap();
} else if (blockStyle != parentStyle) {
} else if (!const MapEquality()
.equals(newStyle.getBlocksExceptHeader(), parentStyle)) {
_unwrap();
_applyBlockStyles(newStyle);
} // else the same style, no-op.

@ -34,7 +34,7 @@ class QuillController extends ChangeNotifier {
/// Controls whether this [QuillController] instance has already been disposed
/// of
///
///
/// This is a safe approach to make sure that listeners don't crash when
/// adding, removing or listeners to this instance.
bool _isDisposed = false;

Loading…
Cancel
Save