copyWith method
- @useResult
- BoxConstraints? constraints,
- BoxDecoration? decoration,
- ImageFilter? backgroundFilter,
- EdgeInsetsGeometry? padding,
- IconThemeData? iconStyle,
- double? iconSpacing,
- TextStyle? titleTextStyle,
- double? titleSpacing,
- TextStyle? descriptionTextStyle,
- double? suffixSpacing,
- FToastMotion motion(
- FToastMotion motion
Returns a copy of this FToastStyle with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FToastStyle.constraints - The toast's constraints.
- FToastStyle.decoration - The toast's decoration.
- FToastStyle.backgroundFilter - An optional background filter.
- FToastStyle.padding - The toast content's padding.
- FToastStyle.iconStyle - The style of the toast's prefix icon.
- FToastStyle.iconSpacing - The spacing between the icon and the title.
- FToastStyle.titleTextStyle - The title's text style.
- FToastStyle.titleSpacing - The spacing between the title and description Defaults to 5.
- FToastStyle.descriptionTextStyle - The description's text style.
- FToastStyle.suffixSpacing - The spacing between the icon and the title.
- FToastStyle.motion - The motion-related properties.
Implementation
@useResult
FToastStyle copyWith({
BoxConstraints? constraints,
BoxDecoration? decoration,
ImageFilter? backgroundFilter,
EdgeInsetsGeometry? padding,
IconThemeData? iconStyle,
double? iconSpacing,
TextStyle? titleTextStyle,
double? titleSpacing,
TextStyle? descriptionTextStyle,
double? suffixSpacing,
FToastMotion Function(FToastMotion motion)? motion,
}) => FToastStyle(
constraints: constraints ?? this.constraints,
decoration: decoration ?? this.decoration,
backgroundFilter: backgroundFilter ?? this.backgroundFilter,
padding: padding ?? this.padding,
iconStyle: iconStyle ?? this.iconStyle,
iconSpacing: iconSpacing ?? this.iconSpacing,
titleTextStyle: titleTextStyle ?? this.titleTextStyle,
titleSpacing: titleSpacing ?? this.titleSpacing,
descriptionTextStyle: descriptionTextStyle ?? this.descriptionTextStyle,
suffixSpacing: suffixSpacing ?? this.suffixSpacing,
motion: motion != null ? motion(this.motion) : this.motion,
);