imageProviderFromDataUri method Null safety

ImageProvider<Object>? imageProviderFromDataUri(
  1. String dataUri
)

Returns a MemoryImage.

Implementation

ImageProvider? imageProviderFromDataUri(String dataUri) {
  final bytes = bytesFromDataUri(dataUri);
  if (bytes == null) {
    return null;
  }

  return MemoryImage(bytes);
}