UserInfo class
Represents user information retrieved from Frappe OAuth2 user info endpoint
Contains user profile data including ID, email, name, and additional Frappe-specific user information.
- Annotations
-
- @JsonSerializable.new()
Constructors
-
UserInfo({required String userId, required String email, required String fullName, String? firstName, String? lastName, String? profileImage, String? username, bool? emailVerified, String? locale, String? zoneinfo, DateTime? updatedAt, Map<
String, dynamic> additionalData = const {}}) -
const
-
UserInfo.fromJson(Map<
String, dynamic> json) -
Creates a UserInfo from JSON response
factory
Properties
-
additionalData
→ Map<
String, dynamic> -
Additional user data that might be specific to the Frappe instance
final
- displayName → String
-
Gets the user's display name (full name or username or email)
no setter
- email → String
-
User's email address
final
- emailVerified → bool?
-
Whether the user's email is verified
final
- firstName → String?
-
User's first name (if available)
final
- fullName → String
-
User's full name
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasProfileImage → bool
-
Checks if the user has a profile image
no setter
- initials → String
-
Gets the user's initials for avatar display
no setter
- lastName → String?
-
User's last name (if available)
final
- locale → String?
-
User's locale/language preference
final
- profileImage → String?
-
User's profile picture URL (if available)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- updatedAt → DateTime?
-
Timestamp when the user info was last updated
final
- userId → String
-
Unique user identifier in Frappe
final
- username → String?
-
User's preferred username
final
- zoneinfo → String?
-
User's timezone
final
Methods
-
copyWith(
{String? userId, String? email, String? fullName, String? firstName, String? lastName, String? profileImage, String? username, bool? emailVerified, String? locale, String? zoneinfo, DateTime? updatedAt, Map< String, dynamic> ? additionalData}) → UserInfo - Creates a copy of this UserInfo with updated fields
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts UserInfo to JSON
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override