ModAvatar constructor

const ModAvatar({
  1. Key? key,
  2. String? text,
  3. IconData? icon,
  4. String? imageUrl,
  5. ModAvatarShape shape = ModAvatarShape.circle,
  6. ModAvatarSize? size = ModAvatarSize.md,
  7. double? customSize,
  8. Color backgroundColor = Colors.blue,
  9. Color textColor = Colors.white,
})

Implementation

const ModAvatar({
  super.key,
  this.text,
  this.icon,
  this.imageUrl,
  this.shape = ModAvatarShape.circle,
  this.size = ModAvatarSize.md,
  this.customSize,
  this.backgroundColor = Colors.blue,
  this.textColor = Colors.white,
}) : assert(text != null || icon != null || imageUrl != null,
          'At least one of text, icon or imageUrl must be provided');