copyWith method
Style
copyWith({
- Color? backgroundColor,
- Color? color,
- TextDirection? direction,
- Display? display,
- String? fontFamily,
- List<
String> ? fontFamilyFallback, - List<
FontFeature> ? fontFeatureSettings, - FontSize? fontSize,
- FontStyle? fontStyle,
- FontWeight? fontWeight,
- double? height,
- LineHeight? lineHeight,
- double? letterSpacing,
- ListStyleType? listStyleType,
- ListStylePosition? listStylePosition,
- EdgeInsets? padding,
- EdgeInsets? margin,
- TextAlign? textAlign,
- TextDecoration? textDecoration,
- Color? textDecorationColor,
- TextDecorationStyle? textDecorationStyle,
- double? textDecorationThickness,
- List<
Shadow> ? textShadow, - VerticalAlign? verticalAlign,
- WhiteSpace? whiteSpace,
- double? width,
- double? wordSpacing,
- String? before,
- String? after,
- Border? border,
- Alignment? alignment,
- Widget? markerContent,
- int? maxLines,
- TextOverflow? textOverflow,
- TextTransform? textTransform,
- bool? beforeAfterNull,
Implementation
Style copyWith({
Color? backgroundColor,
Color? color,
TextDirection? direction,
Display? display,
String? fontFamily,
List<String>? fontFamilyFallback,
List<FontFeature>? fontFeatureSettings,
FontSize? fontSize,
FontStyle? fontStyle,
FontWeight? fontWeight,
double? height,
LineHeight? lineHeight,
double? letterSpacing,
ListStyleType? listStyleType,
ListStylePosition? listStylePosition,
EdgeInsets? padding,
EdgeInsets? margin,
TextAlign? textAlign,
TextDecoration? textDecoration,
Color? textDecorationColor,
TextDecorationStyle? textDecorationStyle,
double? textDecorationThickness,
List<Shadow>? textShadow,
VerticalAlign? verticalAlign,
WhiteSpace? whiteSpace,
double? width,
double? wordSpacing,
String? before,
String? after,
Border? border,
Alignment? alignment,
Widget? markerContent,
int? maxLines,
TextOverflow? textOverflow,
TextTransform? textTransform,
bool? beforeAfterNull,
}) {
return Style(
backgroundColor: backgroundColor ?? this.backgroundColor,
color: color ?? this.color,
direction: direction ?? this.direction,
display: display ?? this.display,
fontFamily: fontFamily ?? this.fontFamily,
fontFamilyFallback: fontFamilyFallback ?? this.fontFamilyFallback,
fontFeatureSettings: fontFeatureSettings ?? this.fontFeatureSettings,
fontSize: fontSize ?? this.fontSize,
fontStyle: fontStyle ?? this.fontStyle,
fontWeight: fontWeight ?? this.fontWeight,
height: height ?? this.height,
lineHeight: lineHeight ?? this.lineHeight,
letterSpacing: letterSpacing ?? this.letterSpacing,
listStyleType: listStyleType ?? this.listStyleType,
listStylePosition: listStylePosition ?? this.listStylePosition,
padding: padding ?? this.padding,
margin: margin ?? this.margin,
textAlign: textAlign ?? this.textAlign,
textDecoration: textDecoration ?? this.textDecoration,
textDecorationColor: textDecorationColor ?? this.textDecorationColor,
textDecorationStyle: textDecorationStyle ?? this.textDecorationStyle,
textDecorationThickness:
textDecorationThickness ?? this.textDecorationThickness,
textShadow: textShadow ?? this.textShadow,
verticalAlign: verticalAlign ?? this.verticalAlign,
whiteSpace: whiteSpace ?? this.whiteSpace,
width: width ?? this.width,
wordSpacing: wordSpacing ?? this.wordSpacing,
before: beforeAfterNull == true ? null : before ?? this.before,
after: beforeAfterNull == true ? null : after ?? this.after,
border: border ?? this.border,
alignment: alignment ?? this.alignment,
markerContent: markerContent ?? this.markerContent,
maxLines: maxLines ?? this.maxLines,
textOverflow: textOverflow ?? this.textOverflow,
textTransform: textTransform ?? this.textTransform,
);
}