User constructor
- @JsonKey(name: 'userid') required int id,
- required String username,
- required String firstname,
- required String lastname,
- @Default('') String email,
- @Default(-1) @JsonKey(name: 'capabilities') int capabilitiesBitMask,
- @Default('') @JsonKey(name: 'theme') String themeName,
- @Default('') @JsonKey(name: 'lang') String language,
- @Default('') @JsonKey(name: 'profileimageurl') String profileImageUrl,
- @Default(-1) @JsonKey(name: 'planid') int planId,
- @Default('') @JsonKey(name: 'colorblindness') String colorBlindnessString,
- @Default(1) @JsonKey(name: 'displaytaskcount') int displayTaskCountInt,
- Vintage? vintage,
A user using the application.
Implementation
factory User({
/// The id of the user
@JsonKey(name: 'userid') required int id,
/// The username of the user
required String username,
/// The firstname of the user
required String firstname,
/// The lastname of the user
required String lastname,
/// The email address of the user
@Default('') String email,
/// A bitmask of the capabilities the user has
@Default(-1) @JsonKey(name: 'capabilities') int capabilitiesBitMask,
/// The name of the theme the user has selected
@Default('') @JsonKey(name: 'theme') String themeName,
/// The language the user has selected
@Default('') @JsonKey(name: 'lang') String language,
/// The url of the profile image
@Default('') @JsonKey(name: 'profileimageurl') String profileImageUrl,
/// The id of the plan the user is assigned to
@Default(-1) @JsonKey(name: 'planid') int planId,
/// The color blindness of the user as a string
@Default('') @JsonKey(name: 'colorblindness') String colorBlindnessString,
/// Whether to display the task count in the calendar view
@Default(1) @JsonKey(name: 'displaytaskcount') int displayTaskCountInt,
/// The vintage of the user
Vintage? vintage,
}) = _User;