|
|
@ -153,6 +153,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
//default font size values |
|
|
|
//default font size values |
|
|
|
final fontSizes = fontSizeValues ?? |
|
|
|
final fontSizes = fontSizeValues ?? |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
'Default':0, |
|
|
|
'10': 10, |
|
|
|
'10': 10, |
|
|
|
'12': 12, |
|
|
|
'12': 12, |
|
|
|
'14': 14, |
|
|
|
'14': 14, |
|
|
@ -202,10 +203,15 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
onSelected: (newSize) { |
|
|
|
onSelected: (newSize) { |
|
|
|
if (newSize != null) { |
|
|
|
if ((newSize != null) && (newSize as int > 0)) { |
|
|
|
controller |
|
|
|
controller |
|
|
|
.formatSelection(Attribute.fromKeyValue('size', newSize)); |
|
|
|
.formatSelection(Attribute.fromKeyValue('size', newSize)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (newSize as int == 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
controller |
|
|
|
|
|
|
|
.formatSelection(Attribute.fromKeyValue('size', null)); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
rawitemsmap: fontSizes, |
|
|
|
rawitemsmap: fontSizes, |
|
|
|
initialValue: (initialFontSizeValue != null) && |
|
|
|
initialValue: (initialFontSizeValue != null) && |
|
|
|