Friendship class
Constructors
- Friendship({required String id, required String senderId, Profile? sender, required String receiverId, Profile? receiver, required FriendshipStatus status, required DateTime createdAt})
-
Friendship.fromJson(Map<
String, dynamic> json) -
factory
-
Friendship.fromReceivedRequestJson(Map<
String, dynamic> json, String connectedUserId) -
factory
-
Friendship.fromSentRequestJson(Map<
String, dynamic> json, String connectedUserId) -
factory
Properties
- createdAt → DateTime
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
- receiver ↔ Profile?
-
getter/setter pair
- receiverError ↔ ApiError?
-
getter/setter pair
- receiverId → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sender ↔ Profile?
-
getter/setter pair
- senderError ↔ ApiError?
-
getter/setter pair
- senderId → String
-
final
- status → FriendshipStatus
-
final
Methods
-
getOtherUser(
String connectedUserId) → Profile -
loadProfiles(
ApiBase api, String connectedUserId) → Future - Fetches the sender and receiver profiles from the API if they are not already loaded
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited