once function

Implementation

PollPredicate<bool> once() {
  bool first = true;
  return (
    Principal canisterId,
    RequestId requestId,
    RequestStatusResponseStatus status,
  ) async {
    if (first) {
      first = false;
      return true;
    }
    return false;
  };
}