copyWith method
ToastMeta
copyWith({
- Widget? icon,
- String? title,
- String? style,
- String? description,
- Color? color,
- VoidCallback? action,
- VoidCallback? dismiss,
- VoidCallback? onDismiss,
- VoidCallback? onShow,
- Duration? duration,
- ToastNotificationPosition? position,
- Map<
String, dynamic> ? metaData, - ToastAnimation? animation,
- ToastAnimation? reverseAnimation,
- bool? dismissOtherToast,
- TextDirection? textDirection,
- Alignment? alignment,
- Axis? axis,
- Offset? startOffset,
- Offset? endOffset,
- Offset? reverseStartOffset,
- Offset? reverseEndOffset,
- bool? isHideKeyboard,
- bool? isIgnoring,
- CustomAnimationBuilder? animationBuilder,
- CustomAnimationBuilder? reverseAnimBuilder,
- ToastOnInitStateCallback? onInitState,
ToastMeta.copyWith() is used to copy the current toast alert and override the values.
Implementation
ToastMeta copyWith({
Widget? icon,
String? title,
String? style,
String? description,
Color? color,
VoidCallback? action,
VoidCallback? dismiss,
VoidCallback? onDismiss,
VoidCallback? onShow,
Duration? duration,
ToastNotificationPosition? position,
Map<String, dynamic>? metaData,
ToastAnimation? animation,
ToastAnimation? reverseAnimation,
bool? dismissOtherToast,
TextDirection? textDirection,
Alignment? alignment,
Axis? axis,
Offset? startOffset,
Offset? endOffset,
Offset? reverseStartOffset,
Offset? reverseEndOffset,
bool? isHideKeyboard,
bool? isIgnoring,
CustomAnimationBuilder? animationBuilder,
CustomAnimationBuilder? reverseAnimBuilder,
ToastOnInitStateCallback? onInitState,
}) {
return ToastMeta(
icon: icon ?? this.icon,
title: title ?? this.title,
style: style ?? this.style,
description: description ?? this.description,
color: color ?? this.color,
action: action ?? this.action,
dismiss: dismiss ?? this.dismiss,
onDismiss: onDismiss ?? this.onDismiss,
onShow: onShow ?? this.onShow,
duration: duration ?? this.duration,
position: position ?? this.position,
metaData: metaData ?? this.metaData,
animation: animation ?? this.animation,
reverseAnimation: reverseAnimation ?? this.reverseAnimation,
dismissOtherToast: dismissOtherToast ?? this.dismissOtherToast,
textDirection: textDirection ?? this.textDirection,
alignment: alignment ?? this.alignment,
axis: axis ?? this.axis,
startOffset: startOffset ?? this.startOffset,
endOffset: endOffset ?? this.endOffset,
reverseStartOffset: reverseStartOffset ?? this.reverseStartOffset,
reverseEndOffset: reverseEndOffset ?? this.reverseEndOffset,
isHideKeyboard: isHideKeyboard ?? this.isHideKeyboard,
isIgnoring: isIgnoring ?? this.isIgnoring,
animationBuilder: animationBuilder ?? this.animationBuilder,
reverseAnimBuilder: reverseAnimBuilder ?? this.reverseAnimBuilder,
onInitState: onInitState ?? this.onInitState,
);
}