toMap method
Implementation
@override
Map<String, dynamic> toMap() {
final dict = <String, dynamic>{
'type': 'customLabelTargeting', // Add type for Kotlin conversion
};
final customLabel0 = _parameters['customLabel0'] as List<String>?;
if (customLabel0 != null && customLabel0.isNotEmpty) {
dict['customLabel0'] = customLabel0;
dict['f.custom_label_0'] = customLabel0;
}
final customLabel1 = _parameters['customLabel1'] as List<String>?;
if (customLabel1 != null && customLabel1.isNotEmpty) {
dict['customLabel1'] = customLabel1;
dict['f.custom_label_1'] = customLabel1;
}
final customLabel2 = _parameters['customLabel2'] as List<String>?;
if (customLabel2 != null && customLabel2.isNotEmpty) {
dict['customLabel2'] = customLabel2;
dict['f.custom_label_2'] = customLabel2;
}
final customLabel3 = _parameters['customLabel3'] as List<String>?;
if (customLabel3 != null && customLabel3.isNotEmpty) {
dict['customLabel3'] = customLabel3;
dict['f.custom_label_3'] = customLabel3;
}
final customLabel4 = _parameters['customLabel4'] as List<String>?;
if (customLabel4 != null && customLabel4.isNotEmpty) {
dict['customLabel4'] = customLabel4;
dict['f.custom_label_4'] = customLabel4;
}
return dict;
}