mock_cloud_firestore 0.0.20 mock_cloud_firestore: ^0.0.20 copied to clipboard
Easier way to mock cloud_firestore, without using `Firestore.channel.setMockMethodCallHandler`
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add mock_cloud_firestore
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
mock_cloud_firestore: ^0.0.20
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:mock_cloud_firestore/mock_cloud_firestore.dart';