ProfileImage constructor

ProfileImage({
  1. Key? key,
  2. ImageProvider<Object>? image,
  3. String? firstName,
  4. String? lastName,
  5. Color? backgroundColor,
  6. Color? foregroundColor,
  7. double? radius,
  8. double? minRadius,
  9. double? maxRadius,
  10. TextStyle? style,
})

Show an CircleAvatar with the given image.

If image in null firstName and/or lastName will be used to generate initials to be show in the CircleAvatar.

Atleast on of image, firstName or lastName should not be null.

Implementation

ProfileImage({
  Key? key,
  this.image,
  this.firstName,
  this.lastName,
  this.backgroundColor,
  this.foregroundColor,
  this.radius,
  this.minRadius,
  this.maxRadius,
  this.style,
})  : assert(firstName != null || lastName != null || image != null),
      super(key: key);