inqvine_core_firebase 2.0.2 copy "inqvine_core_firebase: ^2.0.2" to clipboard
inqvine_core_firebase: ^2.0.2 copied to clipboard

Seemless integration with common Firebase components for Inqvine Core

inqvine_core_firebase #

Seemless integration with common Firebase services.

Platform Support

Android iOS MacOS Web Windows Linux
✔️ ✔️ ✔️ ✔️

Getting Started

First, follow the tutorial here to configure you project to use Firebase.
https://codelabs.developers.google.com/codelabs/flutter-firebase#0

Next, in your [main.dart] after calling [inqvine.registerInqvineServices], call [inqvineFirebase.registerInqvineFirebaseServices] to register all services in your locator.

Configuration

*) To use [InqvineAuthService.loginWithEmailAndPassword], you will have to enable this auth provider in Firebase.
*) To use [InqvineAdminService], you will need to enable cloud_firestore and create a document with a users uid in a collection called admin_users

Inqvine Admin Service Rules

To enable the [InqvineAdminService], add the following to your firestore.rules file.

function isAdminUser() {
    return isLoggedIn() && exists(/databases/$(database)/documents/admin_users/$(request.auth.uid));
}

match /admin_users/{document} {
    allow read: if isAdminUser() || request.resource.data.name == request.auth.uid;
    allow write: if false;
}

Inqvine System Service Rules

To enable the [InqvineSystemService], add the following to your firestore.rules file.

match /system_status/{document} {
    allow read: if true;
    allow write: if false;
}

Inqvine Auth Service

*) logout (Disconnect from Firebase and set the current user to null) *) loginWithEmailAndPassword (Authenticate a user using their email and password) *) signUpWithEmailPassword (Create a user using their email and password)

Inqvine Admin Service

*) isAdmin (Whether or not a record for the user exists in the admin_user collection)

Inqvine System Service

*) applicationStatus (The current status of the system) *) downtimeBuilder (A widget builder to build an overlay when the application is offline if your base scaffold is wrapped in [InqvineDowntimeOverlay])

0
likes
120
pub points
12%
popularity

Publisher

unverified uploader

Seemless integration with common Firebase components for Inqvine Core

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

cloud_firestore, firebase_auth, firebase_core, firebase_messaging, fixnum, flutter, inqvine_core_main, protobuf

More

Packages that depend on inqvine_core_firebase