FirebaseImage constructor

FirebaseImage(
  1. String location, {
  2. bool shouldCache = true,
  3. double scale = 1.0,
  4. int maxSizeBytes = 2500 * 1000,
  5. CacheRefreshStrategy cacheRefreshStrategy = CacheRefreshStrategy.BY_METADATA_DATE,
  6. FirebaseApp? firebaseApp,
})

Fetches, saves and returns an ImageProvider for any image in a readable Firebase Cloud Storeage bucket.

location The URI of the image, in the bucket, to be displayed shouldCache Default: True. Specified whether or not an image should be cached (optional) scale Default: 1.0. The scale to display the image at (optional) maxSizeBytes Default: 2.5MB. The maximum size in bytes to be allocated in the device's memory for the image (optional) cacheRefreshStrategy Default: BY_METADATA_DATE. Specifies the strategy in which to check if the cached version should be refreshed (optional) firebaseApp Default: the default Firebase app. Specifies a custom Firebase app to make the request to the bucket from (optional)

Implementation

FirebaseImage(
  String location, {
  this.shouldCache = true,
  this.scale = 1.0,
  this.maxSizeBytes = 2500 * 1000, // 2.5MB
  this.cacheRefreshStrategy = CacheRefreshStrategy.BY_METADATA_DATE,
  this.firebaseApp,
}) : _imageObject = FirebaseImageObject(
        bucket: _getBucket(location),
        remotePath: _getImagePath(location),
        reference: _getImageRef(location, firebaseApp),
      );