sendShareLocationToGroup method
Future<void>
sendShareLocationToGroup(
- List<AtContact> selectedContacts, {
- int? minutes,
})
Implementation
Future<void> sendShareLocationToGroup(List<AtContact> selectedContacts,
{int? minutes}) async {
await Future.forEach(selectedContacts, (AtContact selectedContact) async {
var _state = await sendShareLocationEvent(selectedContact.atSign!, false,
minutes: minutes);
if (_state == true) {
CustomToast().show(
'Share Location Request sent to ${selectedContact.atSign!}',
AtLocationNotificationListener().navKey.currentContext!);
} else if (_state == false) {
CustomToast().show(
'Something went wrong for ${selectedContact.atSign!}',
AtLocationNotificationListener().navKey.currentContext!,
bgColor: AllColors().RED);
}
});
}