clearImportances method
Clears all the attributes: sets all of them to "not important".
Implementation
Future<void> clearImportances({final bool notifyListeners = true}) async {
if (attributeGroups != null) {
for (final AttributeGroup attributeGroup in attributeGroups!) {
if (attributeGroup.attributes != null) {
for (final Attribute attribute in attributeGroup.attributes!) {
await setImportance(
attribute.id!,
PreferenceImportance.ID_NOT_IMPORTANT,
notifyListeners: false,
);
}
}
}
}
if (notifyListeners) {
notify();
}
}