Avatar.image constructor

const Avatar.image({
  1. Key? key,
  2. required ImageProvider<Object>? image,
  3. double size = 32.0,
  4. BorderRadius? borderRadius,
  5. Color? borderColor,
  6. double borderWidth = 1.0,
  7. VoidCallback? onTap,
  8. String? semanticLabel,
})

Factory for an image-based avatar.

Implementation

const Avatar.image({
  super.key,
  required this.image,
  this.size = 32.0,
  this.borderRadius,
  this.borderColor,
  this.borderWidth = 1.0,
  this.onTap,
  this.semanticLabel,
})  : type = AvatarType.image,
      imageUrl = null,
      initials = null,
      icon = null,
      iconWidget = null,
      backgroundColor = null,
      foregroundColor = null;