getAllLocationData method
get all 'locationnotify' data shared with us
Implementation
Future<void> getAllLocationData() async {
var response = await atClientInstance.getKeys(
regex: '$locationKey',
);
if (response.isEmpty) {
return;
}
await Future.forEach(response, (dynamic key) async {
if ('@$key'.contains('cached')) {
var atKey = getAtKey(key);
AtValue? value = await getAtValueFromMainApp(atKey);
if (value != null) {
var tempKeyLocationModel =
KeyLocationModel(key: key, atKey: atKey, atValue: value);
allLocationNotifications.add(tempKeyLocationModel);
}
}
});
convertJsonToLocationModel();
filterData();
createHybridFromKeyLocationModel();
}