From 46b91ed1206bb6a37f1f6b14d97dc22b823a2a83 Mon Sep 17 00:00:00 2001 From: mark8044 <87546778+mark8044@users.noreply.github.com> Date: Fri, 6 May 2022 14:49:37 -0700 Subject: [PATCH] Update toolbar.dart --- lib/src/widgets/toolbar.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index 1ba69639..8d82718f 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -153,6 +153,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { //default font size values final fontSizes = fontSizeValues ?? { + 'Default':0, '10': 10, '12': 12, '14': 14, @@ -202,10 +203,15 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { ), ], onSelected: (newSize) { - if ((newSize != null) && (newSize > 0)) { + if ((newSize != null) && (newSize as int > 0)) { controller .formatSelection(Attribute.fromKeyValue('size', newSize)); } + if (newSize as int == 0) + { + controller + .formatSelection(Attribute.fromKeyValue('size', null)); + } }, rawitemsmap: fontSizes, initialValue: (initialFontSizeValue != null) &&