ZdsAvatar constructor

const ZdsAvatar({
  1. Key? key,
  2. Image? image,
  3. String? initials,
  4. VoidCallback? onTap,
  5. double? size,
  6. TextStyle? textStyle,
  7. Color? backgroundColor,
})

Displays either initials or an image in an optionally tappable circular container. If given both initials and image, the avatar will always show image.

If size is not null it must be greater than 0.

Implementation

const ZdsAvatar({
  super.key,
  this.image,
  this.initials,
  this.onTap,
  this.size,
  this.textStyle,
  this.backgroundColor,
}) : assert(size != null ? size > 0 : size == null,
          'Size must be greater than 0',);