copyWith method

CircleAvatar copyWith({
  1. Key? key,
  2. Widget? child,
  3. Color? backgroundColor,
  4. ImageProvider<Object>? backgroundImage,
  5. ImageProvider<Object>? foregroundImage,
  6. void onBackgroundImageError(
    1. Object,
    2. StackTrace?
    )?,
  7. void onForegroundImageError(
    1. Object,
    2. StackTrace?
    )?,
  8. Color? foregroundColor,
  9. double? radius,
  10. double? minRadius,
  11. double? maxRadius,
})

Implementation

CircleAvatar copyWith({
  Key? key,
  Widget? child,
  Color? backgroundColor,
  ImageProvider? backgroundImage,
  ImageProvider? foregroundImage,
  void Function(Object, StackTrace?)? onBackgroundImageError,
  void Function(Object, StackTrace?)? onForegroundImageError,
  Color? foregroundColor,
  double? radius,
  double? minRadius,
  double? maxRadius,
}) {
  return CircleAvatar(
    key: key ?? this.key,
    child: child ?? this.child,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    backgroundImage: backgroundImage ?? this.backgroundImage,
    foregroundImage: foregroundImage ?? this.foregroundImage,
    onBackgroundImageError: onBackgroundImageError ?? this.onBackgroundImageError,
    onForegroundImageError: onForegroundImageError ?? this.onForegroundImageError,
    foregroundColor: foregroundColor ?? this.foregroundColor,
    radius: radius ?? this.radius,
    minRadius: minRadius ?? this.minRadius,
    maxRadius: maxRadius ?? this.maxRadius,
  );
}