From b09de44e367713ce675ebe8762c63d3705d269ca Mon Sep 17 00:00:00 2001 From: Andy Trand Date: Mon, 29 Nov 2021 20:27:49 +0200 Subject: [PATCH 1/3] font size parsing fix (#487) --- lib/src/widgets/text_line.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index 0990e797..14546d11 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -230,7 +230,14 @@ class TextLine extends StatelessWidget { res = res.merge(defaultStyles.sizeHuge); break; default: - final fontSize = double.tryParse(size.value); + double? fontSize; + if (size.value is double) { + fontSize = size.value; + } else if (size.value is int) { + fontSize = size.value.toDouble(); + } else if (size.value is String) { + fontSize = double.tryParse(size.value); + } if (fontSize != null) { res = res.merge(TextStyle(fontSize: fontSize)); } else { From 9380ede2aea56efc4baa7c945be9c7768fb5080e Mon Sep 17 00:00:00 2001 From: li3317 Date: Mon, 29 Nov 2021 21:22:44 -0500 Subject: [PATCH 2/3] upgrade to 2.0.22 --- CHANGELOG.md | 3 +++ pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d35c67ae..0ab8c3f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [2.0.22] +* Fix attribute compare and fix font size parsing. + ## [2.0.21] * Handle click on embed object. diff --git a/pubspec.yaml b/pubspec.yaml index 2b70bb4e..39947b72 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: 2.0.21 +version: 2.0.22 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill From 1b562c5b79aca49f3bf68dda15f8331c115c68c3 Mon Sep 17 00:00:00 2001 From: li3317 Date: Mon, 29 Nov 2021 21:52:09 -0500 Subject: [PATCH 3/3] reformat --- lib/src/translations/toolbar.i18n.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/translations/toolbar.i18n.dart b/lib/src/translations/toolbar.i18n.dart index 79a834c2..0ddaf9e9 100644 --- a/lib/src/translations/toolbar.i18n.dart +++ b/lib/src/translations/toolbar.i18n.dart @@ -93,7 +93,7 @@ extension Localization on String { 'Gallery': 'Галерея', 'Link': 'Посилання', 'Please first select some text to transform into a link.': - 'Виділіть текст для створення посилання.', + 'Виділіть текст для створення посилання.', }, };