Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class _QuillToolbarSelectLineHeightStyleDropdownButtonState
Attribute<dynamic> _selectedItem = Attribute.lineHeight;

final _menuController = MenuController();

@override
void initState() {
super.initState();
Expand Down Expand Up @@ -97,9 +98,17 @@ class _QuillToolbarSelectLineHeightStyleDropdownButtonState

String _label(Attribute<dynamic> attribute) {
var label = LineHeightAttribute.lineHeightNormal.value.toString();

if (attribute.value != null) {
label = attribute.value.toString();
} else {
final defaultDisplayText = widget.options.defaultDisplayText;

if (defaultDisplayText != null && defaultDisplayText.isNotEmpty) {
label = defaultDisplayText;
}
}

return label;
}

Expand Down
Loading