ProfileImage constructor

ProfileImage({
  1. Key? key,
  2. required String imageSource,
  3. String? fallbackName,
  4. double? radius,
  5. TextStyle? textStyle,
  6. Color? backgroundColor,
  7. String? placeholder,
})

Implementation

ProfileImage({
  Key? key,
  required this.imageSource,
  this.fallbackName,
  this.radius,
  this.textStyle,
  this.backgroundColor,
  this.placeholder,
}) : super(key: key) {
  if (fallbackName == null && placeholder == null) {
    throw ArgumentError(
      'ProfileImage requires at least one fallback: either fallbackName or placeholder must be provided.',
    );
  }
}