Avatar.network constructor

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

Factory for a network image avatar.

Implementation

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