|
|
|
@ -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) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|