firebase_storage_mocks 0.7.0 copy "firebase_storage_mocks: ^0.7.0" to clipboard
firebase_storage_mocks: ^0.7.0 copied to clipboard

Mocks for Firebase Storage. Use this package to write unit tests involving Firebase Storage.

Firebase Storage Mocks #

Mocks for Firebase Storage. Use this package to write unit tests involving Firebase Storage.

pub package

Usage #

A simple usage example: (assumes assets/someimage.png exists in project and is included in assets section of pubspec.yaml)

import 'package:firebase_storage_mocks/firebase_storage_mocks.dart';
import 'package:flutter/services.dart' show rootBundle;

main() async {
  final storage = MockFirebaseStorage();
  const filename = 'someimage.png';
  final storageRef = storage.ref().child(filename);
  final localImage = await rootBundle.load("assets/$filename");
  final task = await storageRef.putData(localImage.buffer.asUint8List());
  // Prints 'gs://some-bucket//someimage.png'.
  print(task.ref.fullPath);
}

Compatibility table #

firebase_storage firebase_storage_mocks
12.0.0 0.7.0
11.0.0 0.6.0
10.0.0 0.5.1

Features and bugs #

Please file feature requests and bugs at the issue tracker.

38
likes
150
points
14.1k
downloads

Publisher

verified publisherwafrat.com

Weekly Downloads

Mocks for Firebase Storage. Use this package to write unit tests involving Firebase Storage.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

firebase_storage, flutter

More

Packages that depend on firebase_storage_mocks