fold<T> method

  1. @override
T fold<T>(
  1. T onFailure(
    1. L l,
    2. StackTrace? s
    ),
  2. T onSuccess(
    1. R r
    )
)
override

Folds the Either into a single value.

If this is a Failure, the onFailure function is called with the value. If this is a Success, the onSuccess function is called with the value.

Implementation

@override
T fold<T>(T Function(L l, StackTrace? s) onFailure, T Function(R r) onSuccess) => onSuccess(value);