You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/widgets/markdown_field.dart
+29
Original file line number
Diff line number
Diff line change
@@ -112,8 +112,37 @@ class MarkdownField extends StatelessWidget {
112
112
/// Add label, hint etc
113
113
finalInputDecoration decoration;
114
114
115
+
/// The maximum number of lines to show at one time, wrapping if necessary.
116
+
///
117
+
/// This affects the height of the field itself and does not limit the number of lines that can be entered into the field.
118
+
///
119
+
/// If this is 1 (the default), the text will not wrap, but will scroll horizontally instead.
120
+
///
121
+
/// If this is null, there is no limit to the number of lines, and the text container will start with enough vertical space for one line and automatically grow to accommodate additional lines as they are entered, up to the height of its constraints.
122
+
///
123
+
/// If this is not null, the value must be greater than zero, and it will lock the input to the given number of lines and take up enough horizontal space to accommodate that number of lines. Setting [minLines] as well allows the input to grow and shrink between the indicated range.
115
124
finalint? maxLines;
125
+
126
+
/// The minimum number of lines to occupy when the content spans fewer lines.
127
+
///
128
+
/// This affects the height of the field itself and does not limit the number of lines that can be entered into the field.
129
+
///
130
+
/// If this is null (default), text container starts with enough vertical space for one line and grows to accommodate additional lines as they are entered.
131
+
///
132
+
/// This can be used in combination with [maxLines] for a varying set of behaviors.
133
+
///
134
+
/// If the value is set, it must be greater than zero. If the value is greater than 1, [maxLines] should also be set to either null or greater than this value.
135
+
///
136
+
/// When [maxLines] is set as well, the height will grow between the indicated range of lines. When [maxLines] is null, it will grow as high as needed, starting from [minLines].
116
137
finalint? minLines;
138
+
139
+
/// Whether this widget's height will be sized to fill its parent.
140
+
///
141
+
/// If set to true and wrapped in a parent widget like [Expanded] or [SizedBox], the input will expand to fill the parent.
142
+
///
143
+
/// [maxLines] and [minLines] must both be null when this is set to true, otherwise an error is thrown.
0 commit comments