Mapper class

Annotation to mark a class as a Mapper.

Use this annotation to generate mapping extension methods for data classes.

Usage:

@Mapper(UserModel)
class User { ... }

This will generate a toUserModel() extension method on the User class.

Constructors

Mapper(Type target, {bool reverse = true})
Creates a Mapper annotation.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
reverse bool
Whether to generate the reverse mapping (Target -> Source).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Type
The target type to map to.
final

Methods

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