getImageProvider method
Implementation
ImageProvider? getImageProvider(String? urlOrAlias) {
if (urlOrAlias.isEmptyString) {
return null;
}
if (urlOrAlias.isUrl) {
return CachedImageProvider.imageProvider(url: urlOrAlias!);
} else if (urlOrAlias!.startsWith("packages/")) {
return AssetImageProvider.render(urlOrAlias, isProjectImage: true);
}
return null;
}