Lens<S, T> class

Annotations
  • @immutable

Constructors

Lens(Getter<S, T> get, Updater<S, T> update)
const

Properties

get Getter<S, T>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
update Updater<S, T>
final

Methods

map(T f(T), S s) → S
Return a copy of s where the field of this lenses focus has been transformed by applying f
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
of(S s) FocusedLens<S, T>
Focus this lens on a specific instance of S
then<Q>(Lens<T, Q> lens) Lens<S, Q>
Chain two lenses together.
thenWithContext<Q>(Lens<T, Q> lensMaker(S context)) Lens<S, Q>
Chain two lenses together.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator >>(Lens<T, dynamic> lens) Lens<S, dynamic>
The same as then but not type safe.