Upgrade to 4.1.7

pull/796/head
X Code 3 years ago
parent b30fee9ae4
commit 9a62ee79f9
  1. 3
      CHANGELOG.md
  2. 20
      lib/src/widgets/toolbar.dart
  3. 8
      lib/src/widgets/toolbar/quill_dropdown_button.dart
  4. 2
      pubspec.yaml

@ -1,3 +1,6 @@
# [4.1.7]
* Convert FontSize to a Map to allow for named Font Size.
# [4.1.6]
* Update quill_dropdown_button.dart.

@ -151,8 +151,19 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
];
//default font size values
final fontSizes =
fontSizeValues ?? {'10':10, '12':12, '14':14, '16':16, '18':18, '20':20, '24':24, '28':28, '32':32, '48':48};
final fontSizes = fontSizeValues ??
{
'10': 10,
'12': 12,
'14': 14,
'16': 16,
'18': 18,
'20': 20,
'24': 24,
'28': 28,
'32': 32,
'48': 48
};
return QuillToolbar(
key: key,
@ -197,7 +208,10 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
}
},
rawitemsmap: fontSizes,
initialValue: (initialFontSizeValue != null) && (initialFontSizeValue <= fontSizes.length - 1) ? initialFontSizeValue : 0,
initialValue: (initialFontSizeValue != null) &&
(initialFontSizeValue <= fontSizes.length - 1)
? initialFontSizeValue
: 0,
),
if (showBoldButton)
ToggleStyleButton(

@ -36,7 +36,8 @@ class _QuillDropdownButtonState<T> extends State<QuillDropdownButton<T>> {
@override
void initState() {
super.initState();
_currentValue = widget.rawitemsmap.keys.elementAt(widget.initialValue as int);
_currentValue =
widget.rawitemsmap.keys.elementAt(widget.initialValue as int);
}
@override
@ -89,7 +90,10 @@ class _QuillDropdownButtonState<T> extends State<QuillDropdownButton<T>> {
return null;
}
setState(() {
_currentValue = widget.rawitemsmap.entries.firstWhere((element) => element.value==newValue, orElse: () => widget.rawitemsmap.entries.first).key;
_currentValue = widget.rawitemsmap.entries
.firstWhere((element) => element.value == newValue,
orElse: () => widget.rawitemsmap.entries.first)
.key;
widget.onSelected(newValue);
});
});

@ -1,6 +1,6 @@
name: flutter_quill
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
version: 4.1.6
version: 4.1.7
#author: bulletjournal
homepage: https://bulletjournal.us/home/index.html
repository: https://github.com/singerdmx/flutter-quill

Loading…
Cancel
Save