copyWith static method
Widget
copyWith({
- Key? key,
- required Widget child,
- TextStyle? textStyle,
- TextStyle? titleTextStyle,
- EdgeInsets? titlePadding,
- EdgeInsets? padding,
- Color? highlightColor,
- Color? backgroundColor,
- double? itemSpacing,
- Color? infoColor,
- Color? errorColor,
- Color? warningColor,
- Color? successColor,
- Curve? animationCurve,
- Duration? duration,
- Duration? animationDuration,
Makes a copy of the nearest MessageTheme overwriting selected fields.
Implementation
static Widget copyWith({
Key? key,
required Widget child,
TextStyle? textStyle,
TextStyle? titleTextStyle,
EdgeInsets? titlePadding,
EdgeInsets? padding,
Color? highlightColor,
Color? backgroundColor,
double? itemSpacing,
Color? infoColor,
Color? errorColor,
Color? warningColor,
Color? successColor,
Curve? animationCurve,
Duration? duration,
Duration? animationDuration,
}) {
return Builder(
key: key,
builder: (context) => MessageTheme(
data: MessageTheme.of(context).copyWith(
textStyle: textStyle,
titleTextStyle: titleTextStyle,
titlePadding: titlePadding,
padding: padding,
highlightColor: highlightColor,
backgroundColor: backgroundColor,
itemSpacing: itemSpacing,
infoColor: infoColor,
errorColor: errorColor,
warningColor: warningColor,
successColor: successColor,
animationCurve: animationCurve,
duration: duration,
animationDuration: animationDuration,
),
child: child,
),
);
}