imageProviderFromFileUri method Null safety

ImageProvider<Object>? imageProviderFromFileUri(
  1. String url
)

Returns a FileImage.

Implementation

ImageProvider? imageProviderFromFileUri(String url) {
  final filePath = Uri.parse(url).toFilePath();
  if (filePath.isEmpty) {
    return null;
  }

  return fileImageProvider(filePath);
}