dart_mappable library

Classes

CaseStyle Configuration
Used to transform fields to a specific case style.
ChainedHook Mapping Hooks
A MappingHook that will chain multiple other hooks.
CheckTypesHook Polymorphism Mapping Hooks
A MappingHook that allows to specify custom type checks for serialization polymorph subclasses of a class.
CopyWithBase<Result, In, Out> Copy-With
DateTimeMapper
EmptyToNullHook Mapping Hooks
A MappingHook that will change an empty string to null.
EnumMapper<T extends Enum> Custom Mappers
GenerateMethods Configuration
Collection of constants to indicate which methods and extensions to generate for a specific class.
IterableMapper<I extends Iterable> Custom Mappers
ListCopyWith<Result, Elem, Copy> Copy-With
Interface used for Lists in chained copyWith methods All methods return a new modified list and do not modify the original list.
MapCopyWith<Result, Key, Value, Copy> Copy-With
Interface used for Maps in chained copyWith methods All methods return a new modified map and do not modify the original map.
MapMapper<M extends Map> Custom Mappers
MappableClass Introduction Models Configuration Polymorphism Mapping Hooks Custom Mappers
Used to annotate a class in order to generate mapping code
MappableConstructor Models Configuration
Used to annotate a constructor to be chosen as the serialization function.
MappableEnum Enums
Used to annotate an enum in order to generate mapping code
MappableField Models Configuration Mapping Hooks
Used to annotate a parameter or field to overwrite the mapped key.
MappableLib Configuration Polymorphism Generics
Used to annotate a library to define default values.
MappableValue Enums
Used to annotate an enum value in order to define a custom encoded value.
MapperBase<T> Custom Mappers
MapperContainer Generics Mapper Container
MapperContainerBase
MapperElementBase<T> Custom Mappers
This class needs to be implemented by all mappers. It defaults to throwing unsupported exceptions for all methods.
MapperEquality
MappingHook Mapping Hooks
Extend this class to define a custom MappingHook for a class or field.
ObjectCopyWith<Result, In, Out> Copy-With
PrimitiveMapper<T>
PrimitiveMapperElement<T>
SerializableMapper<T, V>
SerializableMapperElement<T, V>
SimpleMapper<T> Custom Mappers
Interface to define custom mappers.
SimpleMapper1<T> Custom Mappers
Interface to define custom mappers for generic types with 1 argument.
SimpleMapper2<T> Custom Mappers
Interface to define custom mappers for generic types with 2 arguments.
UnescapeNewlinesHook Mapping Hooks
A MappingHook that will unescape all escaped newline characters in a string.
UnmappedPropertiesHook Mapping Hooks
A MappingHook to get all unmapped properties in a Map.

Enums

DiscoveryMode Generics
How to discover mappers when MappableLib.createLinkedContainer is true.
MapperMethod
Method indicator used for exceptions
MappingFlags
Collection of flags used for annotations
TextTransform Configuration
Text transformation applied to a single word.
ValuesMode Enums
The mode used for encoding the enum values. Can be ValuesMode.named to map each enum value to its name as String or ValuesMode.indexed to map each enum value to its index as int.

Typedefs

ItemCopyWith<Copy, Elem, Result> = Copy Function(Elem a, Then<Elem, Result> b)
SerializableDecoder1<T, V> = T Function<A>(V, A (Object?))
SerializableDecoder2<T, V> = T Function<A, B>(V, A (Object?), B (Object?))
SerializableEncoder1<T> = Object Function(Object? (dynamic)) Function(T)
SerializableEncoder2<T> = Object Function(Object? (dynamic), Object? (dynamic)) Function(T)
TypeFactory1 = Object? Function<A>(Object? f<V>())
TypeFactory2 = Object? Function<A, B>(Object? f<V>())

Exceptions / Errors

MapperException Mapper Container
General exception class used throughout the package