fetch method
Obtain the latest configuration data from the cloud. The default interval is 12 hours. The cached data is returned within 12 hours.
Implementation
Future<void> fetch({int? intervalSeconds}) async {
try {
await _channel.invokeMethod('fetch',
<String, int?>{'intervalSeconds': intervalSeconds});
}
on PlatformException catch (e) {
int? code = int.tryParse(e.code);
int? throttleEndTime =
e.details != null ? e.details['throttleEndTime'] : null;
throw RemoteConfigException(
code: code,
message: e.message,
throttleEndTimeMillis: throttleEndTime);
}
on MissingPluginException catch(e){
throw RemoteConfigException(
code: 0x0c2a0001,
message: e.message,
throttleEndTimeMillis: 0);
}
}