backoff function
Implementation
PollStrategy backoff(num startingThrottleInMsec, num backoffFactor) {
num currentThrottling = startingThrottleInMsec;
return (Principal canisterId, RequestId requestId, String status) {
var c = Completer();
Future.delayed(Duration(milliseconds: (currentThrottling).toInt()), () {
currentThrottling *= backoffFactor;
c.complete();
});
return c.future;
};
}