Repository<Data>.http constructor
Repository<Data>.http ({})
Exception thrown when the endpoint returns a unsuccessful status code.
Implementation
factory Repository.http({
required Uri endpoint,
Data Function(String json)? fromJson,
FutureOr<bool> Function(Exception exception)? shouldRetryCondition,
Duration? autoRefreshInterval,
String? tag,
bool resolveOnCreate = true,
String? name,
}) {
return HttpRepository<Data>(
name: name,
endpoint: endpoint,
fromJson: fromJson,
shouldRetryCondition: shouldRetryCondition,
tag: tag,
autoRefreshInterval: autoRefreshInterval,
resolveOnCreate: resolveOnCreate,
);
}