MasterLocationService class
Methods
-
createHybridFromLocationDataModel()
→ void
-
Creates HybridModels from LocationDataModel and updates the allReceivedUsersSink
-
deleteReceivedData(String atsign)
→ void
-
Deletes received data for a given atsign
-
getAllLocationData()
→ Future<void>
-
get all 'location-notify' data shared with us
-
getAtValue(AtKey key)
→ Future
-
Retrieves the value of an AtKey from the AtClient instance
-
getHybridModel(String atsign, {String? id})
→ HybridModel?
-
// Explanation:
/ locationReceivedData will contain locationDataModel for atsigns
{'atsign': locationDataModel}
And for each user (atsign) we will store their HybridModel in _allReceivedUsersList
{'atsign': HybridModel}
when we want the location of a user we will query in the _locationReceivedData map
with the atsign and event/p2p id
if the atsign is present
then we will look into locationSharingFor value of the _locationReceivedData
'atsign'
if the event/p2p id is present in locationSharingFor value
and DateTime.now() is between from and to of the locationSharingFor value
then we will return the HybridModel of the atsign in _allReceivedUsersList
Retrieves the HybridModel for a given Atsign and optional id
-
getImageOfAtsignNew(String? atsign)
→ Future<Uint8List?>
-
Retrieves the image of an atsign from the contact details
-
init(String currentAtSignFromApp, AtClient atClientInstanceFromApp, {Function? newGetAtValueFromMainApp})
→ Future<void>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateHybridList(LocationDataModel _newUser)
→ void
-
Updates the hybrid list with a new user or updates an existing user