DataLocalFunctionalCodec<T> class final

A codec composed from application-provided encode and decode functions.

Implemented types

Constructors

DataLocalFunctionalCodec({required Map<String, Object?> encode(T value), required T decode(Map<String, Object?> data), DataLocalDocumentValidator validator = const DataLocalDocumentValidator()})
Creates a functional codec with optional document validator.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(Map<String, Object?> data) → T
Converts a stored document data map into an application value.
override
encode(T value) Map<String, Object?>
Converts value into a validated document map.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited