errorBuilder method

Widget errorBuilder(
  1. BuildContext context,
  2. dynamic __,
  3. dynamic ___
)

Implementation

Widget errorBuilder(BuildContext context, __, ___) {
  if (errorWidget != null) {
    return errorWidget!(context, __, ___);
  }
  final error = Container(
    width: width,
    height: height,
    color: Colors.grey,
    child: const Center(
      child: Text(
        'Image not found',
        textAlign: TextAlign.center,
      ),
    ),
  );

  if (circle) {
    return CircleWidget(child: error);
  }

  return ClipRRect(
    borderRadius: BorderRadius.circular(radius),
    child: error,
  );
}