RestClientTranslationLoader constructor
RestClientTranslationLoader({})
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();