User class
User is used to contain all user data. It consists of three standard fields: firstName, lastName and image/imageUrl.
For additional data profileData can be used.
Constructors
- User({String? firstName, String? lastName, Uint8List? image, String? imageUrl, ProfileData? profileData})
-
User.fromMap(Map<
String, dynamic> data) -
factory
Properties
- displayName → String
-
The display name of the user, which is a combination of
the first name and the last name.
If the first name or the last name is null,
an empty string is used instead.
no setter
- firstName ↔ String?
-
The first name of the user.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- image ↔ Uint8List?
-
The image of the user, stored as Uint8List.
getter/setter pair
- imageUrl ↔ String?
-
The URL of the user's image.
getter/setter pair
- initials → String
-
The initials of the user, which are the first characters
of the first name and the last name.
If the first name or the last name is null or empty,
an empty string is used instead.
no setter
- lastName ↔ String?
-
The last name of the user.
getter/setter pair
- profileData ↔ ProfileData?
-
Additional profile data for the user.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited