Upgrade to 4.1.8

pull/802/head
X Code 3 years ago
parent 3909365252
commit af8146ad45
  1. 3
      CHANGELOG.md
  2. 3
      lib/src/widgets/toolbar.dart
  3. 22
      lib/src/widgets/toolbar/quill_dropdown_button.dart
  4. 2
      pubspec.yaml

@ -1,3 +1,6 @@
# [4.1.8]
* Update font size dropdown.
# [4.1.7]
* Convert FontSize to a Map to allow for named Font Size.

@ -209,8 +209,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
controller
.formatSelection(Attribute.fromKeyValue('size', newSize));
}
if (newSize as int == 0)
{
if (newSize as int == 0) {
controller
.formatSelection(Attribute.fromKeyValue('size', null));
}

@ -74,16 +74,19 @@ class _QuillDropdownButtonState<T> extends State<QuillDropdownButton<T>> {
final attribute = attrs[widget.attribute.key];
if (attribute == null) {
return widget.rawitemsmap.keys.elementAt(widget.initialValue as int).toString();
}
else {
return widget.rawitemsmap.keys
.elementAt(widget.initialValue as int)
.toString();
} else {
return widget.rawitemsmap.entries
.firstWhere((element) => element.value == attribute.value,
orElse: () => widget.rawitemsmap.entries.first)
.key;
}
}
return widget.rawitemsmap.keys.elementAt(widget.initialValue as int).toString();
return widget.rawitemsmap.keys
.elementAt(widget.initialValue as int)
.toString();
}
@override
@ -152,9 +155,16 @@ class _QuillDropdownButtonState<T> extends State<QuillDropdownButton<T>> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(_currentValue.toString(), style: TextStyle(fontSize: widget.iconSize / 1.15, color: widget.iconTheme?.iconUnselectedColor ?? theme.iconTheme.color)),
Text(_currentValue.toString(),
style: TextStyle(
fontSize: widget.iconSize / 1.15,
color: widget.iconTheme?.iconUnselectedColor ??
theme.iconTheme.color)),
SizedBox(width: 3),
Icon(Icons.arrow_drop_down, size: widget.iconSize / 1.15, color: widget.iconTheme?.iconUnselectedColor ?? theme.iconTheme.color)
Icon(Icons.arrow_drop_down,
size: widget.iconSize / 1.15,
color: widget.iconTheme?.iconUnselectedColor ??
theme.iconTheme.color)
],
),
);

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

Loading…
Cancel
Save