File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class ListTileControl extends StatelessWidget {
54
54
selected: selected,
55
55
dense: dense,
56
56
onTap: onPressed,
57
+ enabled: ! disabled,
57
58
leading: leadingCtrls.isNotEmpty
58
59
? createControl (control, leadingCtrls.first.id, disabled)
59
60
: null ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class TextControl extends StatelessWidget {
18
18
19
19
String text = control.attrString ("value" , "" )! ;
20
20
bool noWrap = control.attrBool ("noWrap" , false )! ;
21
+ int ? maxLines = control.attrInt ("maxLines" );
21
22
22
23
TextStyle ? style;
23
24
var styleName = control.attrString ("style" , null );
@@ -50,11 +51,13 @@ class TextControl extends StatelessWidget {
50
51
control.attrBool ("selectable" , false )!
51
52
? SelectableText (
52
53
text,
54
+ maxLines: maxLines,
53
55
style: style,
54
56
textAlign: textAlign,
55
57
)
56
58
: Text (
57
59
text,
60
+ maxLines: maxLines,
58
61
softWrap: ! noWrap,
59
62
style: style,
60
63
textAlign: textAlign,
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ def __init__(
52
52
weight : FontWeight = None ,
53
53
italic : bool = None ,
54
54
style : str = None ,
55
+ max_lines : int = None ,
55
56
overflow : TextOverflow = None ,
56
57
selectable : bool = None ,
57
58
no_wrap : bool = None ,
@@ -79,6 +80,7 @@ def __init__(
79
80
self .italic = italic
80
81
self .no_wrap = no_wrap
81
82
self .style = style
83
+ self .max_lines = max_lines
82
84
self .overflow = overflow
83
85
self .selectable = selectable
84
86
self .color = color
@@ -166,6 +168,16 @@ def selectable(self):
166
168
def selectable (self , value : Optional [bool ]):
167
169
self ._set_attr ("selectable" , value )
168
170
171
+ # max_lines
172
+ @property
173
+ def max_lines (self ):
174
+ return self ._get_attr ("maxLines" )
175
+
176
+ @max_lines .setter
177
+ @beartype
178
+ def max_lines (self , value : Optional [int ]):
179
+ self ._set_attr ("maxLines" , value )
180
+
169
181
# overflow
170
182
@property
171
183
def overflow (self ):
You can’t perform that action at this time.
0 commit comments