firebase_compute 0.1.2

  • Readme
  • Changelog
  • Installing
  • 6

firebase_compute #

Build Status

Library for doing reactive computations with firebase.

Usage #

A simple, yet powerful usage example!

Given a Firebase instance containing events in a calendar, the following code will print the next appointment.

import 'package:firebase_compute/firebase_compute.dart';
import 'package:firebase_dart/firebase_dart.dart';
import 'dart:async';

main() async {
  var ref = new Firebase("");

  var data = new DynamicReference(ref); // create a reactive version of a firebase reference

      .child("calendar").child("events")    // reference the subtree at /calendar/events
      .orderByChild("startTime").limitToFirst(1) // order by child startTime and limit to first result
      .startAt(new  // start at the current time
      .firstChild() // move to the first child
      .asStream().forEach((v)=>print("your next appointment is at ${v["startTime"]}: ${v["description"]}"));

    "startTime": new Duration(hours: 4)).toIso8601String(),
    "description": "hairdresser"
  });  // will print "your next appointment is at ... : hairdresser"

  await new Future.delayed(new Duration(seconds: 2));

    "startTime": new Duration(seconds: 10)).toIso8601String(),
    "description": "doctor"
  });  // will print "your next appointment is at ... : doctor"

  // after 10 seconds will print "your next appointment is at ... : hairdresser"


Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.1.0 #

  • Initial version

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  firebase_compute: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:firebase_compute/firebase_compute.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <2.0.0