fold<B> method

  1. @override
B fold<B>(
  1. B onOk(
    1. T value
    ),
  2. B onErr(
    1. E error
    )
)
override

Fold is used to handle both Ok and Err cases.

Implementation

@override
B fold<B>(B Function(T value) onOk, B Function(E error) onErr) =>
    onErr(error);