cloud_firestore_database_wrapper 1.1.1 cloud_firestore_database_wrapper: ^1.1.1 copied to clipboard
A package that wraps cloud firestore. The idea is that future implementation will be database agnostic and a user can choose which one they want to use.
cloud_firestore_database_wrapper #
Getting Started #
instance = FirebaseFirestore.instance;
dataSource = FirestoreDataSource(instance);
final user = User(
uid: uid,
name: "Bob",
photoUrl: "url",
email: "example@example.com",
phoneNumber: "1234567890",
type: 3,
date: "12/14/2020",
score: 300,
userType: []);
await dataSource.create(path, id: user.uid, data: user.toJson());
User user = await dataSource.getSingleByRefId<User>(
path, originaluser.uid, User.fromJSON);
//TODO: Fill in these sections