Polling constructor

Polling(
  1. BramblClient client,
  2. String txId, {
  3. int limit = 100,
  4. int timeout = 30,
})

Setup short polling

Throws ShortPollingException if limit is less than 1 or greater than 100 or timeout is greater than 50.

Implementation

Polling(this.client, this.txId, {this.limit = 100, this.timeout = 30}) {
  if (limit > 100 || limit < 1) {
    throw ShortPollingException('Limit must be between 1 and 100');
  }
  if (timeout > maxTimeout) {
    throw ShortPollingException(
        'Timeout may not be greater than $maxTimeout');
  }
}