castInto<K> method

FormField<K> castInto<K>({
  1. required Maybe<K> combiner(
    1. T
    ),
})

A method to help casting a FormField from a type T into a type K.

Implementation

FormField<K> castInto<K>({
  required Maybe<K> Function(T) combiner,
}) =>
    FormField<K>(name: name, field: field.mapJust<K>(combiner));