Lens<Whole extends Object?, Part extends Object?> constructor
const
Lens<Whole extends Object?, Part extends Object?> ({
- required Part get(
- Whole
- required Whole set(
- Whole,
- Part
Creates a lens with the given get and set functions.
Both functions are required. For this to be a valid lens, they should satisfy the lens laws (see Lens documentation).
Implementation
const Lens({required this.get, required this.set});