copyWith method
- Decoration? decoration,
- MaterialStateProperty<
Color?> ? dataRowColor, - @Deprecated('Migrate to use dataRowMinHeight and dataRowMaxHeight instead. ' 'This feature was deprecated after v3.7.0-5.0.pre.') double? dataRowHeight,
- double? dataRowMinHeight,
- double? dataRowMaxHeight,
- TextStyle? dataTextStyle,
- MaterialStateProperty<
Color?> ? headingRowColor, - double? headingRowHeight,
- TextStyle? headingTextStyle,
- double? horizontalMargin,
- double? columnSpacing,
- double? dividerThickness,
- double? checkboxHorizontalMargin,
- MaterialStateProperty<
MouseCursor?> ? headingCellCursor, - MaterialStateProperty<
MouseCursor?> ? dataRowCursor, - MainAxisAlignment? headingRowAlignment,
Creates a copy of this object but with the given fields replaced with the new values.
Implementation
DataTableThemeData copyWith({
Decoration? decoration,
MaterialStateProperty<Color?>? dataRowColor,
@Deprecated(
'Migrate to use dataRowMinHeight and dataRowMaxHeight instead. '
'This feature was deprecated after v3.7.0-5.0.pre.',
)
double? dataRowHeight,
double? dataRowMinHeight,
double? dataRowMaxHeight,
TextStyle? dataTextStyle,
MaterialStateProperty<Color?>? headingRowColor,
double? headingRowHeight,
TextStyle? headingTextStyle,
double? horizontalMargin,
double? columnSpacing,
double? dividerThickness,
double? checkboxHorizontalMargin,
MaterialStateProperty<MouseCursor?>? headingCellCursor,
MaterialStateProperty<MouseCursor?>? dataRowCursor,
MainAxisAlignment? headingRowAlignment,
}) {
assert(dataRowHeight == null || (dataRowMinHeight == null && dataRowMaxHeight == null),
'dataRowHeight ($dataRowHeight) must not be set if dataRowMinHeight ($dataRowMinHeight) or dataRowMaxHeight ($dataRowMaxHeight) are set.');
dataRowMinHeight = dataRowHeight ?? dataRowMinHeight;
dataRowMaxHeight = dataRowHeight ?? dataRowMaxHeight;
return DataTableThemeData(
decoration: decoration ?? this.decoration,
dataRowColor: dataRowColor ?? this.dataRowColor,
dataRowMinHeight: dataRowMinHeight ?? this.dataRowMinHeight,
dataRowMaxHeight: dataRowMaxHeight ?? this.dataRowMaxHeight,
dataTextStyle: dataTextStyle ?? this.dataTextStyle,
headingRowColor: headingRowColor ?? this.headingRowColor,
headingRowHeight: headingRowHeight ?? this.headingRowHeight,
headingTextStyle: headingTextStyle ?? this.headingTextStyle,
horizontalMargin: horizontalMargin ?? this.horizontalMargin,
columnSpacing: columnSpacing ?? this.columnSpacing,
dividerThickness: dividerThickness ?? this.dividerThickness,
checkboxHorizontalMargin: checkboxHorizontalMargin ?? this.checkboxHorizontalMargin,
headingCellCursor: headingCellCursor ?? this.headingCellCursor,
dataRowCursor: dataRowCursor ?? this.dataRowCursor,
headingRowAlignment: headingRowAlignment ?? this.headingRowAlignment,
);
}