execute<T> method

T execute<T>(
  1. T error(
    1. E
    ),
  2. T response(
    1. R
    )
)

Implementation

T execute<T>(T Function(E) error, T Function(R) response) => switch (this) {
  Error(:final value) => error(value),
  Success(:final value) => response(value),
};