MCircleAvatar constructor

const MCircleAvatar({
  1. Key? key,
  2. String? source,
  3. String? foregroundSource,
  4. Widget? child,
  5. Color? backgroundColor,
  6. ImageProvider<Object>? backgroundImage,
  7. ImageProvider<Object>? foregroundImage,
  8. MImageErrorProviderBuilder? onBackgroundImageErrorBuilder,
  9. MImageErrorProviderBuilder? onForegroundImageErrorBuilder,
  10. Color? foregroundColor,
  11. double? radius,
  12. double? minRadius,
  13. double? maxRadius,
  14. String? placeholder,
  15. String? foregroundPlaceholder,
  16. VoidCallback? onTap,
  17. String? package,
  18. AssetBundle? bundle,
  19. double? diameter,
  20. BoxFit? fit,
  21. 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);