getProvider method
Returns NetworkImage if URI starts with http otherwise uses IO to create File.
Implementation
@override
ImageProvider getProvider(String uri, {Map<String, String>? headers}) {
if (uri.startsWith('http')) {
return NetworkImage(uri, headers: headers);
} else {
return FileImage(File(uri));
}
}