clearSelectedGroupContacts method
Will show a dialog box, if yes is pressed, will clear the selectedGroupContacts
Implementation
void clearSelectedGroupContacts({required BuildContext context, Function? onYesTap}) {
if (selectedGroupContacts.isNotEmpty) {
shownConfirmationDialog(context, 'Selected contacts will not be added , confirm?', () {
selectedGroupContacts = [];
selectedContactsSink.add(selectedGroupContacts); // to update the UI
if (onYesTap != null) {
onYesTap();
}
});
} else {
if (onYesTap != null) {
onYesTap();
}
}
}