removeTags method
Removes a list of tags and saves the new array of tags. @param tags The keys of the tags that need to be removed.
Implementation
Future<void> removeTags(List<String> tags) async {
List<MBAudienceTag> newTags = (await _getTags()) ?? [];
for (String tag in tags) {
int index = newTags.indexWhere((t) => t.tag == tag);
if (index != -1) {
newTags.removeAt(index);
}
}
await _saveNewTags(newTags);
await MBAudienceManager.shared.updateMetadata();
}