From b401cc5518de56ab9f4168b5f1f91d33de41aa0c Mon Sep 17 00:00:00 2001 From: X Code Date: Tue, 17 May 2022 21:33:19 -0700 Subject: [PATCH] Code cleanup --- lib/src/widgets/toolbar.dart | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index 5efd20d7..78434a1d 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -198,13 +198,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { ), ], onSelected: (newSize) { - if (newSize == '0') { - controller - .formatSelection(Attribute.fromKeyValue('size', null)); - } else { - controller.formatSelection( - Attribute.fromKeyValue('size', getFontSize(newSize))); - } + controller.formatSelection(Attribute.fromKeyValue( + 'size', newSize == '0' ? null : getFontSize(newSize))); }, rawItemsMap: fontSizes, ),