File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class _QuillToolbarSelectLineHeightStyleDropdownButtonState
4848 Attribute <dynamic > _selectedItem = Attribute .lineHeight;
4949
5050 final _menuController = MenuController ();
51+
5152 @override
5253 void initState () {
5354 super .initState ();
@@ -97,9 +98,17 @@ class _QuillToolbarSelectLineHeightStyleDropdownButtonState
9798
9899 String _label (Attribute <dynamic > attribute) {
99100 var label = LineHeightAttribute .lineHeightNormal.value.toString ();
101+
100102 if (attribute.value != null ) {
101103 label = attribute.value.toString ();
104+ } else {
105+ final defaultDisplayText = widget.options.defaultDisplayText;
106+
107+ if (defaultDisplayText != null && defaultDisplayText.isNotEmpty) {
108+ label = defaultDisplayText;
109+ }
102110 }
111+
103112 return label;
104113 }
105114
You can’t perform that action at this time.
0 commit comments