firebase_database_repository 1.0.6 copy "firebase_database_repository: ^1.0.6" to clipboard
firebase_database_repository: ^1.0.6 copied to clipboard

A DatabaseAdapter for the firebase database as used by the database_repository package

example/README.md

void main() async {
    // You can find this in your firebase project settings
    final myFirebaseConfig = {
        "apiKey": "SECRET",
        "authDomain": "[PROJECT].firebaseapp.com",
        "projectId": "[PROJECT]",
        "storageBucket": "[PROJECT].appspot.com",
        "messagingSenderId": "Foo",
        "appId": "Bar"
    };

    // Initialize Firebase
    // The manual configuration is used here for easier understanding
    final myFirebaseApp = await Firebase.initializeApp(
        options: FirebaseOptions.fromMap(myFirebaseConfig),
    );

    final myDatabaseAdapter = FirebaseDatabaseAdapter(firebaseApp: myFirebaseApp)
    
    // Register a Database Adapter that you want to use.
    DatabaseAdapterRegistry.register(myDatabaseAdapter);

    final repository = DatabaseRepository.fromRegistry(serializer: mySerializer, name: 'firebase');
    
    // Now use some methods such as create() etc.
}
0
likes
120
pub points
0%
popularity

Publisher

verified publisherglassp.dev

A DatabaseAdapter for the firebase database as used by the database_repository package

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

cloud_firestore, database_repository, firebase_core, flutter, uuid

More

Packages that depend on firebase_database_repository