typed_firestore 0.4.2

  • Readme
  • Changelog
  • Installing
  • 65

typed_firestore #

Typed firestore entity.

Usage #


abstract class Car extends DocData implements Built<Car, CarBuilder> {
  static Serializer<Car> get serializer => _$carSerializer;

  String get title;

  @nullable
  String get nullableField;

  Car._();

  factory Car([updates(CarBuilder b)]) = _$Car;
}

@SerializersFor(const [
  Car,
])
Serializers serializers = _$serializers;


final firestore = new TypedFirestore(
  Firestore.instance,
  (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(),
);

final CollRef<Car> cars = firestore.collection<Car>('cars');


[0.4.2] - 2020-01-05 #

  • Removed duplicate.

[0.4.1] - 2020-01-28 #

  • Extract Data and DocData as a separate package (not a file in lib).

[0.4.0] - 2020-01-28 #

  • Updated cloud_firestore
  • Export Data and DocData from separate lib to support sharing models with server.

[0.3.4] - 2019-08-01 #

  • All types now implements hashCode and ==.

[0.3.3] - 2019-08-27 #

  • .mapList can now changes type.

[0.3.2] - 2019-08-09 #

  • Added DocRef<T>.parent

[0.3.1] - 2019-08-08 #

  • Added collectionGroup

[0.3.0] - 2019-08-04 #

  • TypedQuery<D>

  • .getDocs(): Added source.

  • .snapshots(): Added includeMetadataChanges.

  • DocRef<D>

    • .get(): Added source.
    • .snapshots(): Added includeMetadataChanges.

[0.2.2] - 2019-07-31 #

  • TypedQuery.map
  • TypedQuery.mapList

[0.2.1] - 2019-07-31 #

  • Array-contains query

[0.2.0+1] - 2019-07-10 #

  • Fixed a bug.

[0.2.0] - 2019-07-10 #

  • Bumped version of cloud_firestore.

[0.1.1] - 2019-05-16 #

startAt, startBefore, endAt, endBefore

[0.0.3] - 2019-03-24 #

Support non-existent docs.

[0.0.1] - 2018-09-24 #

  • First release.

Use this package as a library

1. Depend on it

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


dependencies:
  typed_firestore: ^0.4.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:typed_firestore/typed_firestore.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
42
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:typed_firestore/typed_firestore.dart, package:typed_firestore/src/typed_firestore.dart, package:cloud_firestore/cloud_firestore.dart] that declares support for platforms: android, ios, macos, web

Package does not support Flutter platform windows

Because of import path [package:typed_firestore/typed_firestore.dart, package:typed_firestore/src/typed_firestore.dart, package:cloud_firestore/cloud_firestore.dart] that declares support for platforms: android, ios, macos, web

Package not compatible with SDK dart

because of import path [typed_firestore] that is in a package requiring null.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and typed_firestore.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.54 <3.0.0
built_value ^7.0.8 7.1.0
cloud_firestore ^0.13.0+1 0.13.7
flutter 0.0.0
quiver ^2.0.0 2.1.3
typed_fb_data ^0.0.1 0.0.1
Transitive dependencies
built_collection 4.3.2
charcode 1.1.3
cloud_firestore_platform_interface 1.1.2
cloud_firestore_web 0.1.1+2
collection 1.14.12 1.14.13
firebase 7.3.0
firebase_core 0.4.5
firebase_core_platform_interface 1.0.4
firebase_core_web 0.1.1+2
fixnum 0.10.11
flutter_web_plugins 0.0.0
http 0.12.1
http_parser 3.1.4
js 0.6.2
matcher 0.12.8
meta 1.1.8
path 1.7.0
pedantic 1.9.0 1.9.1
plugin_platform_interface 1.0.2
sky_engine 0.0.99
source_span 1.7.0
stack_trace 1.9.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test