Added docs for the providers
This commit is contained in:
parent
a0ac18464e
commit
96d9e06ffc
3 changed files with 7 additions and 2 deletions
|
|
@ -6,9 +6,14 @@ import 'package:uuid/uuid.dart';
|
||||||
export 'package:firebase_storage/firebase_storage.dart'
|
export 'package:firebase_storage/firebase_storage.dart'
|
||||||
show StorageUploadTask, StorageTaskSnapshot;
|
show StorageUploadTask, StorageTaskSnapshot;
|
||||||
|
|
||||||
|
/// A connection to the firebase sotrage bucket.
|
||||||
class FirebaseStorageProvider {
|
class FirebaseStorageProvider {
|
||||||
|
/// The reference to the root path of the storage bucket.
|
||||||
final StorageReference _storage;
|
final StorageReference _storage;
|
||||||
|
|
||||||
|
/// An instance of a uuid generator.
|
||||||
final Uuid _uuid;
|
final Uuid _uuid;
|
||||||
|
|
||||||
// [FirebaseStorage] and [Uuid] instances can be injected for testing purposes.
|
// [FirebaseStorage] and [Uuid] instances can be injected for testing purposes.
|
||||||
// Don't remove.
|
// Don't remove.
|
||||||
FirebaseStorageProvider([StorageReference storage, Uuid uuid])
|
FirebaseStorageProvider([StorageReference storage, Uuid uuid])
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class FirestoreProvider {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new instance of a user in Firestore.
|
/// Creates a new user in Firestore.
|
||||||
Future<void> createUser(UserModel user, String uid) async {
|
Future<void> createUser(UserModel user, String uid) async {
|
||||||
try {
|
try {
|
||||||
final dataMap = user.toFirestoreMap();
|
final dataMap = user.toFirestoreMap();
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import 'package:rxdart/rxdart.dart';
|
||||||
|
|
||||||
export 'package:firebase_auth/firebase_auth.dart' show FirebaseUser;
|
export 'package:firebase_auth/firebase_auth.dart' show FirebaseUser;
|
||||||
|
|
||||||
/// A Google authentication provider.
|
/// Google authentication provider.
|
||||||
///
|
///
|
||||||
/// Connects to both Google and Firebase to authenticate a user.
|
/// Connects to both Google and Firebase to authenticate a user.
|
||||||
class GoogleSignInProvider {
|
class GoogleSignInProvider {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue