FriendList class

A class to manage friends. You can send friend requests to user ids. You are friends if both users sent each other friend requests.

Inheritance
Mixed-in types
  • PubSub

Constructors

FriendList(LocalityUser owner)

Properties

fps int
getter/setter pairinherited
friendRequests List<FriendRequest>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
owner ↔ LocalityUser
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeline ↔ Timeline
getter/setter pairinherited
waitingMessages Map<int, WaitingMessage>
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
executeQueue() → void
Optional: Execute queued notifications manually if needed
inherited
getTopic() String
Return the global topic of the PubSub. All observers of the same topic will receive the same events.
override
getWaitingMessages() List<WaitingMessage>
inherited
isFriendsWithThisUser(LocalityUser otherUser) bool
Check if that user sent us friend request and we also sent them one back.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Override notifyListeners to throttle the notifications
inherited
onReceive(LocalityEvent localityEvent) → void
React to events being thrown. Use switch case on the localityEvent.event
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
send(String event, Map<String, dynamic> payload) → WaitingMessage
Send an event with a payload to this PubSub. PubSub ensures each event will be received in onReceive exactly once. This will return a waiting message that gets resolved as soon as it has been received on the server. Use .addListener to wait for messages to resolve.
inherited
sendFriendRequestToThisUser(LocalityUser fromUser, LocalityUser toUser) → void
Send a friend request to this topic.
sentFriendRequestToUser(LocalityUser otherUser) bool
Check whether we sent a friend request to that user
toString() String
A string representation of this object.
inherited

Operators

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