GroupService class

///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////

Constructors

GroupService.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createGroup(String userId, String name, {bool isPublic = false, List<String> members = const [], bool locationSharingEnabled = true}) Future<String>
//////////// //////////// Creates a new group in Firestore
deleteGroup(String groupId) Future<void>
Deletes a group
getGroup(String groupId) Future<Group?>
Gets a group by ID
getGroupByCode(String code) Future<Group?>
Gets a group by its public link code
getGroupMembers(String groupId) Future<List<String>>
Gets all members of a group
getLocationUpdates(String groupId) Stream<List<UserLocation>>
Gets real-time location updates for all users in a group
getUserGroups(String userId) Future<List<Group>>
Gets all groups a user is a member of
joinGroup(String userId, String groupId) Future<void>
//////////// //////////// Adds a user to a group
leaveGroup(String userId, String groupId) Future<void>
Removes a user from a group
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLocationSharingEnabled(String groupId, bool enabled) Future<void>
Enables or disables location sharing for a group
startSharingLocation(String groupId, String userId, GeoPoint location) Future<void>
//////////// //////////// Starts sharing a user's location with a group
stopSharingLocation(String groupId, String userId) Future<void>
Stops sharing a user's location with a group
toString() String
A string representation of this object.
inherited
updateGroup(String groupId, Map<String, dynamic> data) Future<void>
Updates group data
updateUserLocation(String groupId, String userId, GeoPoint location, {double? speed, double? heading, double? accuracy}) Future<void>
Updates a user's location in a group

Operators

operator ==(Object other) bool
The equality operator.
inherited