Iso<A extends Object?, B extends Object?> constructor

const Iso<A extends Object?, B extends Object?>({
  1. required B to(
    1. A
    ),
  2. required A from(
    1. B
    ),
})

Creates an isomorphism with the given to and from transformations.

Both to and from are required. For this to represent a valid isomorphism, they must be proper inverses of each other.

Implementation

const Iso({required this.to, required this.from});