FeatureHubConfig constructor
FeatureHubConfig(
- String host,
- List<
String> _apiKeys, - ClientFeatureRepository _repository, {
- int timeout = 360,
Implementation
FeatureHubConfig(String host, this._apiKeys, this._repository, { int timeout = 360 })
: _api = FeatureServiceApi(ApiClient(basePath: host)),
_timeoutInSeconds = timeout,
_cacheTimeout = DateTime.now().subtract(Duration(seconds: 1)) // allow for immediate polling
{
if (_apiKeys.any((key) => key.contains('*'))) {
throw Exception(
'You are using a client evaluated API Key in Dart and this is not supported.');
}
_repository.clientContext.registerChangeHandler((header) async {
xFeatureHubHeader = header;
});
}