getConfig method
Implementation
Future<DataTrackingConfig> getConfig() async {
final configString = await _getConfigStringFromNative();
if (configString == null) {
final _config = DataTrackingConfig().._tracker = this;
return _config;
}
final config = jsonDecode(configString) as Map<String, dynamic>;
final defaultTracker = config[_defaultTrackerName] as Map<String, dynamic>;
final collectLocation = defaultTracker[_collectLocationKey] as bool? ??
_DataConfigDefaults.collectLocation;
final collectAaid = defaultTracker[_collectAaidKey] as bool? ??
_DataConfigDefaults.collectAaid;
final collectIdfa = defaultTracker[_collectIdfaKey] as bool? ??
_DataConfigDefaults.collectIdfa;
return DataTrackingConfig(
collectLocation: collectLocation,
collectAaid: collectAaid,
collectIdfa: collectIdfa)
.._tracker = this;
}