Skip to content

Commit bf70b7c

Browse files
author
Nguyen Dat
committed
add maxline
1 parent 1719cfe commit bf70b7c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/html_parser.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ class StyledText extends StatelessWidget {
787787
textAlign: style.textAlign,
788788
textDirection: style.direction,
789789
textScaleFactor: textScaleFactor,
790+
maxLines: style.maxLine,
790791
),
791792
);
792793
}

lib/style.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ class Style {
175175
Alignment alignment;
176176
String markerContent;
177177

178+
/// MaxLine
179+
///
180+
///
181+
///
182+
///
183+
int maxLine;
184+
178185
Style({
179186
this.backgroundColor = Colors.transparent,
180187
this.color,
@@ -207,6 +214,7 @@ class Style {
207214
this.border,
208215
this.alignment,
209216
this.markerContent,
217+
this.maxLine,
210218
}) {
211219
if (this.alignment == null &&
212220
(display == Display.BLOCK || display == Display.LIST_ITEM)) {
@@ -280,6 +288,7 @@ class Style {
280288
//TODO merge border
281289
alignment: other.alignment,
282290
markerContent: other.markerContent,
291+
maxLine: other.maxLine,
283292
);
284293
}
285294

@@ -347,6 +356,7 @@ class Style {
347356
Border border,
348357
Alignment alignment,
349358
String markerContent,
359+
int maxLine,
350360
}) {
351361
return Style(
352362
backgroundColor: backgroundColor ?? this.backgroundColor,
@@ -381,6 +391,7 @@ class Style {
381391
border: border ?? this.border,
382392
alignment: alignment ?? this.alignment,
383393
markerContent: markerContent ?? this.markerContent,
394+
maxLine: maxLine ?? this.maxLine,
384395
);
385396
}
386397

0 commit comments

Comments
 (0)