From 9225ca00e26c6462ba39aede2bbb255c18ccbad5 Mon Sep 17 00:00:00 2001 From: mark8044 <87546778+mark8044@users.noreply.github.com> Date: Tue, 17 May 2022 19:55:33 -0700 Subject: [PATCH] Update toolbar.dart --- lib/src/widgets/toolbar.dart | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index 38bd8083..5efd20d7 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -199,14 +199,12 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { ], onSelected: (newSize) { if (newSize == '0') { + controller + .formatSelection(Attribute.fromKeyValue('size', null)); + } else { controller.formatSelection( - Attribute.fromKeyValue('size', null)); + Attribute.fromKeyValue('size', getFontSize(newSize))); } - else - { - controller.formatSelection( - Attribute.fromKeyValue('size', getFontSize(newSize))); - } }, rawItemsMap: fontSizes, ),