Group class

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

Constructors

Group.new({String? id, required String name, required String createdBy, List<String>? members, bool isPublic = false, String? publicLinkCode, Timestamp? createdAt, bool locationSharingEnabled = true})
//////////// ////////////
Group.fromMap(Map<String, dynamic> map, String id)
//////////// //////////// Creates a Group from a Firestore document map
factory

Properties

createdAt Timestamp
final
createdBy String
final
hashCode int
The hash code for this object.
no setterinherited
id String?
//////////// ////////////
final
isPublic bool
final
locationSharingEnabled bool
final
memberCount int
Gets member count
no setter
members List<String>
final
name String
final
publicLinkCode String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addMember(String userId) Group
//////////// //////////// Adds a member to the group
copyWith({String? name, List<String>? members, bool? isPublic, String? publicLinkCode, bool? locationSharingEnabled}) Group
Creates a copy of this Group with optional parameter updates
isCreator(String userId) bool
Checks if a user is the creator of the group
isMember(String userId) bool
//////////// //////////// Checks if a user is a member of the group
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMember(String userId) Group
Removes a member from the group
rename(String newName) Group
Changes the group name
setLocationSharing(bool enabled) Group
Sets location sharing as enabled or disabled
setPublic(bool isPublic, {String? publicLinkCode}) Group
//////////// //////////// Sets the group as public or private
toMap() Map<String, dynamic>
//////////// //////////// Converts Group to a map for Firestore
toString() String
A string representation of this object.
inherited

Operators

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