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, ),