firestorm 0.2.1 copy "firestorm: ^0.2.1" to clipboard
firestorm: ^0.2.1 copied to clipboard

A data access API and ODM tool for Firebase's Firestore and Realtime Database

example/example.dart

/// This example shows basic usage of Firestorm:
/// - Defining a data entity annotated with @FirestormObject (see commented code below).
/// - Generating code using the Firestorm code generator.
/// - Initializing Firestorm with Firebase.
/// - Registering classes
/// - Using Firestorm to perform CRUD operations on the data entity.

/*

import 'package:firestorm/firestorm.dart';

@FirestormObject()
class Person {

  String id;
  String firstname;
  String lastname;
  int age;
  double height;
  bool isEmployed;
  List<String> friends;

  Person(this.id, this.firstname, this.lastname, this.age, this.height,
      this.isEmployed, this.friends);

}

 */

import 'package:firestorm/firestorm.dart';
import 'package:firestorm/fs/fs.dart';
import 'package:firestorm/rdb/rdb.dart';
import 'package:flutter/widgets.dart';

main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await FS.init(); // Initialize Firestore if used.
  await RDB.init(); // Initialize Realtime database if used.
  //registerClasses(); // To be generated by running `dart pub run build_runner build`

  runApp(Container()); //Run your Flutter app here...
}
2
likes
0
points
198
downloads

Publisher

verified publisherraylabz.com

Weekly Downloads

A data access API and ODM tool for Firebase's Firestore and Realtime Database

Homepage
Repository (GitHub)
View/report issues

Topics

#firebase #orm #odm #firestore #database

Documentation

Documentation

Funding

Consider supporting this project:

buymeacoffee.com

License

unknown (license)

Dependencies

analyzer, build, cloud_firestore, colorful_text, firebase_core, firebase_database, flutter, glob, source_gen, uuid

More

Packages that depend on firestorm