diff --git a/CHANGELOG.md b/CHANGELOG.md index 427d4c95..7fc19bab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [2.0.0] +* Text Alignment functions + Block Format standards. + ## [1.9.6] * Support putting QuillEditor inside a Scrollable view. diff --git a/lib/src/widgets/cursor.dart b/lib/src/widgets/cursor.dart index 427158d2..0365d317 100644 --- a/lib/src/widgets/cursor.dart +++ b/lib/src/widgets/cursor.dart @@ -247,7 +247,8 @@ class CursorPainter { /// [position] is relative (x) in text line void paint(Canvas canvas, Offset offset, TextPosition position) { final caretOffset = - editable!.getOffsetForCaret(position, prototype) + offset;; + editable!.getOffsetForCaret(position, prototype) + offset; + var caretRect = prototype.shift(caretOffset); if (style.offset != null) { caretRect = caretRect.shift(style.offset!); diff --git a/lib/src/widgets/text_block.dart b/lib/src/widgets/text_block.dart index 64d00cfb..e46cba0d 100644 --- a/lib/src/widgets/text_block.dart +++ b/lib/src/widgets/text_block.dart @@ -213,11 +213,13 @@ class EditableTextBlock extends StatelessWidget { extraIndent = 16.0 * indent.value; } - var baseIndent = 0.0; - if (attrs.containsKey(Attribute.blockQuote.key)) { return 16.0 + extraIndent; - } else if (attrs.containsKey(Attribute.list.key) || + } + + var baseIndent = 0.0; + + if (attrs.containsKey(Attribute.list.key) || attrs.containsKey(Attribute.codeBlock.key)) { baseIndent = 32.0; } diff --git a/pubspec.yaml b/pubspec.yaml index 4a442472..fc49b2e1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 1.9.6 +version: 2.0.0 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill