sendRequestLocationToGroup method
Sends request location to selectedContacts
.
Implementation
Future<void> sendRequestLocationToGroup(
List<AtContact> selectedContacts) async {
await Future.forEach(selectedContacts, (AtContact selectedContact) async {
var _state = await sendRequestLocationEvent(
selectedContact.atSign!,
);
if (_state == true) {
CustomToast().show(
'Location Request sent to ${selectedContact.atSign!}',
AtLocationNotificationListener().navKey.currentContext!,
isSuccess: true);
} else if (_state == false) {
CustomToast().show(
'Something went wrong for ${selectedContact.atSign!}',
AtLocationNotificationListener().navKey.currentContext!,
isError: true);
}
});
}