FancyAvatar constructor

const FancyAvatar({
  1. Key? key,
  2. required double radius,
  3. required Image userImage,
  4. Color? ringColor,
  5. Color? innerRingColor,
  6. Color? avatarBackgroundColor,
  7. Color? shadowColor,
  8. double ringWidth = 2.0,
  9. double spaceWidth = 3.0,
  10. double elevation = 8.0,
})

Creates a fancy looking avatar with a colorful ring around it.

The radius and userImage arguments must not be null. Additionally, radius must be non-negative.

If ringWidth, spaceWidth or elevation specified, must also be non-negative values.

If shadowColor property is specified, then elevation must no be null or 0.0

Implementation

const FancyAvatar(
    {Key? key,
    required this.radius,
    required this.userImage,
    this.ringColor,
    this.innerRingColor,
    this.avatarBackgroundColor,
    this.shadowColor,
    this.ringWidth = 2.0,
    this.spaceWidth = 3.0,
    this.elevation = 8.0})
    : assert(radius >= 0),
      assert(ringWidth >= 0),
      assert(spaceWidth >= 0),
      assert(elevation >= 0),
      assert(!(shadowColor != null && elevation == 0)),
      super(key: key);