postRun method

  1. @override
FutureOr<void> postRun(
  1. TaskResult result
)
override

Action to run after a task associated with this RunCondition has run, whether successfully or not.

This method will not be called if the Dartle cache has been disabled.

Implementation

@override
FutureOr<void> postRun(TaskResult result) async {
  if (result.isSuccess) {
    await cache.cacheInvocation(result.invocation);
  } else {
    await cache.removeTaskInvocation(result.invocation.name);
  }
}