User class

Represents a user on CivitAI.

Constructors

User({required int id, String? username, String? image, String? tier, String? status, bool? isModerator, DateTime? createdAt, String? displayName, UserFilePreferences? filePreferences, bool? banned})
Creates a new user instance.
const
User.fromJson(Map<String, dynamic> json)
Creates a user instance from a JSON map.
factory
User.fromMeJson(Map<String, dynamic> json)
Creates a user instance from a current user (me) JSON response.
factory

Properties

banned bool?
Whether the user is currently banned.
final
createdAt DateTime?
Date when the user was created.
final
displayName String?
User's display name.
final
filePreferences UserFilePreferences?
User's file preferences.
final
hashCode int
The hash code for this object.
no setterinherited
id int
Unique identifier for the user.
final
image String?
URL to the user's profile image.
final
isModerator bool?
Whether the user is a moderator.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status String?
User's status.
final
tier String?
User's subscription tier.
final
username String?
Username of the user.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this user to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited