built_firebase 1.1.0
built_firebase: ^1.1.0 copied to clipboard
Serializers and built values for services inherent to firebase ( cloud firestore | messaging )
built_firebase #
Firebase Firestore #
Provides a SerializerPlugin to convert the data json received from cloud_firestore
with types (GeoPoint and TimeStamp) into common types such as DateTime and a built value of type GeoPoint
final serializers = (Serializers().toBuilder()
..applyPlugin(StandardJsonPlugin())
..applyPlugin(FirestoreSerializerPlugin())
).build();
final myDataType = serializers.deserialize(myDoc.data());
Firebase Messaging #
Provides a built value for messages received by the firebase_messaging package
BasicMessagePayloadorMessagePayloadNotificationPayload
Common features #
LocaleSerializer
Serializer for the Local type of dart
ByPassSerializer
Serializer for the specified type. Specifically, it does not serialize and deserialize the specified type
final serializers = (Serializers().toBuilder()..addSerializer(ByPassSerializer<TimeStamp>())).build();