onSuccess method

Future<NEResult<T>> onSuccess(
  1. FutureOr action(
    1. T
    )
)

Implementation

Future<NEResult<T>> onSuccess(FutureOr Function(T) action) {
  return then<NEResult<T>>((value) async {
    if (value.isSuccess()) {
      await action(value.nonNullData);
    }
    return value;
  });
}