copyWith method
SkeletonTheme
copyWith({
- ValueGetter<
Duration?> ? duration, - ValueGetter<
Color?> ? fromColor, - ValueGetter<
Color?> ? toColor, - ValueGetter<
bool?> ? enableSwitchAnimation,
Returns a copy of this theme with the given fields replaced.
Implementation
SkeletonTheme copyWith({
ValueGetter<Duration?>? duration,
ValueGetter<Color?>? fromColor,
ValueGetter<Color?>? toColor,
ValueGetter<bool?>? enableSwitchAnimation,
}) {
return SkeletonTheme(
duration: duration == null ? this.duration : duration(),
fromColor: fromColor == null ? this.fromColor : fromColor(),
toColor: toColor == null ? this.toColor : toColor(),
enableSwitchAnimation: enableSwitchAnimation == null
? this.enableSwitchAnimation
: enableSwitchAnimation(),
);
}