MCircleAvatar constructor
const
MCircleAvatar({
- Key? key,
- String? source,
- String? foregroundSource,
- Widget? child,
- Color? backgroundColor,
- ImageProvider<
Object> ? backgroundImage, - ImageProvider<
Object> ? foregroundImage, - MImageErrorProviderBuilder? onBackgroundImageErrorBuilder,
- MImageErrorProviderBuilder? onForegroundImageErrorBuilder,
- Color? foregroundColor,
- double? radius,
- double? minRadius,
- double? maxRadius,
- String? placeholder,
- String? foregroundPlaceholder,
- VoidCallback? onTap,
- String? package,
- AssetBundle? bundle,
- double? diameter,
- BoxFit? fit,
- BoxFit? errorFit,
Implementation
const MCircleAvatar({
super.key,
this.source,
this.foregroundSource,
this.child,
this.backgroundColor,
this.backgroundImage,
this.foregroundImage,
this.onBackgroundImageErrorBuilder,
this.onForegroundImageErrorBuilder,
this.foregroundColor,
double? radius,
this.minRadius,
this.maxRadius,
this.placeholder,
this.foregroundPlaceholder,
this.onTap,
this.package,
this.bundle,
double? diameter,
this.fit,
this.errorFit,
}) : assert(radius == null || diameter == null || (minRadius == null && maxRadius == null)),
assert(source != null || backgroundImage != null || onBackgroundImageErrorBuilder == null),
assert(foregroundImage != null || onForegroundImageErrorBuilder == null),
diameter = diameter ?? (radius != null ? radius * 2.0 : null);