database_adapter_firestore_browser 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 62

Overview #

This is an adapter for the package database that connects it to Google Cloud Firestore.

This package works only in browsers. The package database_adapter_firestore_flutter can be used in Flutter.

Getting started #

1.Add dependency #

dependencies:
  database: any
  database_adapter_firestore_browser: any

2.Use it! #

import 'package:database/database.dart';
import 'package:database_adapter_firestore_browser/database_adapter_firestore_browser.dart';

Database getDatabase() {
  return FirestoreBrowser().database();
}

[0.2.0] - January 21, 2020 #

  • Initial release

example/example.dart

import 'package:database/database.dart';
import 'package:database_adapter_firestore_browser/database_adapter_firestore_browser.dart';

Database getDatabase() {
  return FirestoreBrowser.initialize(
    appId: 'Your application ID',
    apiKey: 'Your API key',
  ).database();
}

Use this package as a library

1. Depend on it

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


dependencies:
  database_adapter_firestore_browser: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


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

We analyzed this package on Feb 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
database ^0.3.0 0.3.0
firebase ^7.0.0 7.2.1
meta ^1.1.0 1.1.8
Transitive dependencies
async 2.4.0
built_collection 4.3.2
built_value 7.0.9
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.4
cryptography 0.1.2
csslib 0.16.1
fixnum 0.10.11
html 0.14.0+3
http 0.12.0+4
http_parser 3.1.3
js 0.6.1+1
matcher 0.12.6
path 1.6.4
petitparser 3.0.1
protobuf 1.0.1
quiver 2.1.2+1
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
universal_html 1.1.15
universal_io 0.8.6 1.0.1
xml 3.7.0
zone_local 0.1.2
Dev dependencies
pedantic ^1.8.0 1.9.0
test ^1.8.0
test_io ^0.1.0