From 9888d5ccf09d45b2d81a154936448ea1d6bcaf43 Mon Sep 17 00:00:00 2001 From: X Code Date: Sun, 6 Mar 2022 09:22:49 -0800 Subject: [PATCH] Upgrade to 4.0.8 --- CHANGELOG.md | 3 +++ lib/src/widgets/text_line.dart | 6 +++--- pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 545bbec0..c84a3a2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [4.0.8] +* Fix blank lines do not display when --web-renderer=html. + # [4.0.7] * Refactor getPlainText (better handling of blank lines and lines with multiple markups. diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index 7c59d693..b8f05103 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -1,11 +1,11 @@ import 'dart:collection'; import 'dart:math' as math; +import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/foundation.dart'; import 'package:tuple/tuple.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -209,10 +209,10 @@ class _TextLineState extends State { TextSpan _buildTextSpan(DefaultStyles defaultStyles, LinkedList nodes, TextStyle lineStyle) { final shouldWrap = nodes.isEmpty && kIsWeb; - LinkedList newNodes = LinkedList()..add(leaf.Text('\u{200B}')); + final newNodes = LinkedList()..add(leaf.Text('\u{200B}')); final children = (shouldWrap ? newNodes : nodes) .map((node) => - _getTextSpanFromNode(defaultStyles, node, widget.line.style)) + _getTextSpanFromNode(defaultStyles, node, widget.line.style)) .toList(growable: false); return TextSpan(children: children, style: lineStyle); diff --git a/pubspec.yaml b/pubspec.yaml index b05679b7..b90623bb 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: 4.0.7 +version: 4.0.8 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill