StreamUser class
Stream allows you to store user information and embed them inside activities or use them for personalization.
When stored in activities, users are automatically enriched by Stream.
Constructors
- StreamUser(UsersAPI _users, String id, {Token? userToken, String? secret})
-
Initializes a
UsersClient
session object
Properties
- createdAt → DateTime?
-
When the user was created.
no setter
-
data
→ Map<
String, Object?> ? -
User additional data.
no setter
- followersCount → int?
-
Number of users that follow this user.
no setter
- followingCount → int?
-
Number of users this user is following.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
User id
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- ref → String
-
Create a stream user ref
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - updatedAt → DateTime?
-
When the user was last updated.
no setter
Methods
-
create(
Map< String, Object?> data, {bool getOrCreate = false}) → Future<StreamUser> - Create a new user in stream
-
delete(
) → Future< void> - Delete the user
-
get(
{bool withFollowCounts = false}) → Future< StreamUser> - Get the user data
-
getOrCreate(
Map< String, Object?> data) → Future<StreamUser> - Get or Create a new user in stream
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
profile(
{bool withFollowCounts = true}) → Future< StreamUser> - Get the user profile, it includes the follow counts by default
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Map< String, Object?> data) → Future<StreamUser> - Update the user
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited