onSuccess method

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

Implementation

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