add clear option to font size dropdown

pull/821/head
li3317 3 years ago
parent b401cc5518
commit ccf0953727
  1. 10
      lib/src/widgets/toolbar.dart

@ -155,8 +155,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
];
//default font size values
final fontSizes =
fontSizeValues ?? {'Small': 'small', 'Large': 'large', 'Huge': 'huge'};
final fontSizes = fontSizeValues ??
{'Small': 'small', 'Large': 'large', 'Huge': 'huge', 'Clear': '0'};
return QuillToolbar(
key: key,
@ -194,7 +194,11 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
PopupMenuItem<String>(
key: ValueKey(fontSize.key),
value: fontSize.value,
child: Text(fontSize.key.toString()),
child: Text(fontSize.key.toString(),
style: TextStyle(
color: fontSize.value == '0'
? Colors.red
: Colors.black)),
),
],
onSelected: (newSize) {

Loading…
Cancel
Save