getImageProvider method

ImageProvider<Object>? getImageProvider(
  1. String? urlOrAlias
)

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;
}