RestClientTranslationLoader constructor

RestClientTranslationLoader({
  1. Authorizer? authorizer,
  2. Client? client,
  3. Reporter? reporter,
  4. required Request request,
  5. int retryCount = 0,
  6. Duration retryDelay = const Duration(seconds: 1),
  7. DelayStrategy? retryDelayStrategy,
  8. Duration? timeout,
})

A more powerful version of the simple network factory. Tihs gives full control over the way the network call is executed. This stillrequires the response from the network call result in a JSON key / value map.

This is a blocking loader and will not resolve the Future until the translations are loaded. Wrap this in an AsyncTranslationLoader to avoid blocking the Translator on initialize, load, or reload.

Implementation

RestClientTranslationLoader({
  this.authorizer,
  Client? client,
  this.reporter,
  required this.request,
  this.retryCount = 0,
  this.retryDelay = const Duration(seconds: 1),
  this.retryDelayStrategy,
  this.timeout,
}) : client = client ?? Client();