copyWith method
TxExpandableTextThemeData
copyWith({
- int? collapsedLines,
- TextStyle? toggleButtonTextStyle,
- Color? toggleButtonForegroundColor,
- TxTextOverflow? overflow,
override
创建此对象的副本,但将给定字段替换为新值。
Implementation
@override
TxExpandableTextThemeData copyWith({
int? collapsedLines,
TextStyle? toggleButtonTextStyle,
Color? toggleButtonForegroundColor,
TxTextOverflow? overflow,
}) {
assert(collapsedLines == null || collapsedLines > 0);
return TxExpandableTextThemeData(
collapsedLines: collapsedLines ?? this.collapsedLines,
toggleButtonTextStyle:
toggleButtonTextStyle ?? this.toggleButtonTextStyle,
toggleButtonForegroundColor:
toggleButtonForegroundColor ?? this.toggleButtonForegroundColor,
overflow: overflow ?? this.overflow,
);
}