Notifier constructor

Notifier(
  1. ColorizeLogger _logger,
  2. Variables _variables, {
  3. Dio? client,
})

Creates a notifier bound to a logger and a variable resolver.

All three timeouts are bounded on purpose: notifications are delivered after the last job, so an unroutable webhook host would otherwise hold the run open for the operating system's TCP timeout with nothing left to do.

Implementation

Notifier(this._logger, this._variables, {Dio? client})
    : _dio = client ??
          Dio(
            BaseOptions(
              connectTimeout: _timeout,
              sendTimeout: _timeout,
              receiveTimeout: _timeout,
            ),
          );