firestore_serialized 0.1.3

  • README.md
  • Installing
  • Versions
  • 54

firestore_serialized

Thin layer on top of Firestore to serialize/deserialize document's data.

Quickstart

TypedFirestore.instance.register<User>(User.fromJson, User.toJson);

Then use the Typed... alternatives from original firestore types.

final user = TypedFirestore.instance.collection<User>("users").document("john");
final snapshot = await user.get();
print(snapshot.value.lastname);

Roadmap

  • Transactions
  • Batches

Use this package as a library

1. Depend on it

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


dependencies:
  firestore_serialized: ^0.1.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:firestore_serialized/firestore_serialized.dart';
  
Version Uploaded Documentation Archive
0.1.3 Dec 25, 2018 Go to the documentation of firestore_serialized 0.1.3 Download firestore_serialized 0.1.3 archive
0.1.2 Dec 25, 2018 Go to the documentation of firestore_serialized 0.1.2 Download firestore_serialized 0.1.2 archive
0.1.1 Dec 18, 2018 Go to the documentation of firestore_serialized 0.1.1 Download firestore_serialized 0.1.1 archive
0.1.0 Dec 17, 2018 Go to the documentation of firestore_serialized 0.1.0 Download firestore_serialized 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
23
Health:
Code health derived from static analysis. [more]
96
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
54
Learn more about scoring.

We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10
  • Flutter: 1.1.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/document.dart. (-2.48 points)

Analysis of lib/src/document.dart reported 5 hints:

line 36 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 47 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 55 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 61 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 74 col 3: The class 'Stream' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Fix lib/src/collection.dart. (-1 points)

Analysis of lib/src/collection.dart reported 2 hints:

line 3 col 8: Unused import: 'package:firestore_serialized/src/firestore.dart'.

line 43 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Fix lib/src/query.dart. (-1 points)

Analysis of lib/src/query.dart reported 2 hints:

line 15 col 3: The class 'Stream' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 20 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/firestore_serialized.dart (Run flutter format to format lib/firestore_serialized.dart.)
  • lib/src/document_change.dart (Run flutter format to format lib/src/document_change.dart.)
  • lib/src/firestore.dart (Run flutter format to format lib/src/firestore.dart.)
  • lib/src/query_snapshot.dart (Run flutter format to format lib/src/query_snapshot.dart.)

Maintenance issues and suggestions

Maintain CHANGELOG.md. (-20 points)

Changelog entries help clients to follow the progress in your code.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use firestore_serialized.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cloud_firestore ^0.8.2+3 0.8.2+3
flutter 0.0.0
meta ^1.1.6 1.1.6 1.1.7
Transitive dependencies
collection 1.14.11
firebase_core 0.2.5+1
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8