toMap method
Implementation
@override
Map<String, dynamic> toMap() {
final dict = <String, dynamic>{
'type': 'geoTargeting', // Add type for Kotlin conversion
};
final storeIds = _parameters['storeIds'] as List<String>?;
if (storeIds != null && storeIds.isNotEmpty) {
dict['storeIds'] = storeIds;
dict['f.store_id'] = storeIds;
}
final networks = _parameters['networks'] as List<String>?;
if (networks != null && networks.isNotEmpty) {
dict['networks'] = networks;
dict['f.network'] = networks;
}
final city = _parameters['city'];
if (city != null) {
dict['city'] = city;
dict['f.city'] = city;
}
final state = _parameters['state'];
if (state != null) {
dict['state'] = state;
dict['f.state'] = state;
}
final country = _parameters['country'];
if (country != null) {
dict['country'] = country;
dict['f.country'] = country;
}
return dict;
}