loadingBuilder static method
Widget
loadingBuilder(
- BuildContext context,
- Widget child,
- ImageChunkEvent? loadingProgress,
- double size,
Implementation
static Widget loadingBuilder(
BuildContext context,
Widget child,
ImageChunkEvent? loadingProgress,
double size,
) {
if (loadingProgress == null) {
return child;
}
if (loadingProgress.expectedTotalBytes ==
loadingProgress.cumulativeBytesLoaded) {
return child;
} else {
return SizedBox(
width: size,
height: size,
child: const CircularProgressIndicator(),
);
}
}