User class
- Annotations
-
- @freezed
Constructors
-
User({@JsonKey(name: 'id') String? userId, @JsonKey(name: 'username') String? username, @JsonKey(name: 'avatar') String? avatar, @JsonKey(name: 'name') String? name, @JsonKey(name: 'firstName') String? firstName, @JsonKey(name: 'lastName') String? lastName, @JsonKey(name: 'dateOfBirth') String? dateOfBirth, @JsonKey(name: 'gender', fromJson: genderFromJson, toJson: genderToJson) Gender? gender, @JsonKey(name: 'active', defaultValue: false) bool? active, @JsonKey(name: 'contacts') Contact? primaryContact, @JsonKey(name: 'secondaryContacts') List<
Contact?> ? secondaryContacts, @JsonKey(name: 'languages') List<String> ? languages, @JsonKey(name: 'termsAccepted', defaultValue: false) bool? termsAccepted, @JsonKey(name: 'hasSetPin', defaultValue: false) bool? hasSetPin, @JsonKey(name: 'hasSetSecurityQuestions', defaultValue: false) bool? hasSetSecurityQuestions, @JsonKey(name: 'hasSetNickname', defaultValue: false) bool? hasSetNickname, @JsonKey(name: 'isPhoneVerified', defaultValue: false) bool? isPhoneVerified, @JsonKey(name: 'currentOrganizationID') String? currentOrganizationID, @JsonKey(name: 'currentProgramID') String? currentProgramID, @JsonKey(name: 'pinChangeRequired', defaultValue: false) bool? pinChangeRequired, @JsonKey(name: 'pinUpdateRequired', defaultValue: false) bool? pinUpdateRequired, @JsonKey(name: 'suspended', defaultValue: false) bool? suspended, String? streamToken}) -
factory
-
User.fromJson(Map<
String, dynamic> json) -
factory
- User.initial()
-
factory
Properties
- active → bool?
-
no setterinherited
- avatar → String?
-
no setterinherited
-
copyWith
→ $UserCopyWith<
User> -
no setterinherited
- currentOrganizationID → String?
-
no setterinherited
- currentProgramID → String?
-
no setterinherited
- dateOfBirth → String?
-
no setterinherited
- firstName → String?
-
no setterinherited
- gender → Gender?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSetNickname → bool?
-
no setterinherited
- hasSetPin → bool?
-
no setterinherited
- hasSetSecurityQuestions → bool?
-
no setterinherited
- isPhoneVerified → bool?
-
no setterinherited
-
languages
→ List<
String> ? -
no setterinherited
- lastName → String?
-
no setterinherited
- name → String?
-
no setterinherited
- pinChangeRequired → bool?
-
Whether this user needs to change their PIN
no setterinherited
- pinUpdateRequired → bool?
-
Used to indicate that the user's PIN has been reset by someone else
no setterinherited
- primaryContact → Contact?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secondaryContacts
→ List<
Contact?> ? -
no setterinherited
- streamToken → String?
-
no setterinherited
- suspended → bool?
-
no setterinherited
- termsAccepted → bool?
-
no setterinherited
- userId → String?
-
no setterinherited
- username → String?
-
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited