getImageProvider method
Returns a way to display the image, either locally or from the server.
Implementation
ImageProvider? getImageProvider() {
final File? file = getImage();
if (file != null) {
return FileImage(file);
}
if (url != null) {
if (imageField == ImageField.FRONT) {
return CachedNetworkImageProvider(url!);
}
return NetworkImage(url!);
}
return null;
}