Allow removing font size attribute from text (#817)

pull/821/head
mark8044 3 years ago committed by GitHub
parent 2addd734d7
commit 5e39e5b2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      lib/src/widgets/toolbar.dart

@ -198,8 +198,13 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
),
],
onSelected: (newSize) {
controller.formatSelection(
Attribute.fromKeyValue('size', getFontSize(newSize)));
if (newSize == '0') {
controller
.formatSelection(Attribute.fromKeyValue('size', null));
} else {
controller.formatSelection(
Attribute.fromKeyValue('size', getFontSize(newSize)));
}
},
rawItemsMap: fontSizes,
),

Loading…
Cancel
Save