UserProfiles class
Business logic for handling user profiles
Constructors
- UserProfiles({UserProfileConfig config = const UserProfileConfig()})
-
Creates a new UserProfiles instance.
const
Properties
- admin → UserProfilesAdmin
-
Collection of admin-related functions.
final
- config → UserProfileConfig
-
The user profile configuration.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
changeFullName(
Session session, UuidValue authUserId, String? newFullName, {Transaction? transaction}) → Future< UserProfileModel> - Updates a profile's full name.
-
changeUserName(
Session session, UuidValue authUserId, String? newUserName, {Transaction? transaction}) → Future< UserProfileModel> - Updates a profiles's user name.
-
createUserProfile(
Session session, UuidValue authUserId, UserProfileData userProfile, {Transaction? transaction, UserImageSource? imageSource}) → Future< UserProfileModel> - Creates a new user profile and stores it in the database.
-
deleteProfileForUser(
Session session, UuidValue authUserId, {Transaction? transaction}) → Future< void> -
Remove the user profile, incl. images, for the given
authUserId. -
findUserProfileByUserId(
Session session, UuidValue authUserId, {Transaction? transaction}) → Future< UserProfileModel> -
Find a user profile by the
AuthUser's ID. -
maybeFindUserProfileByUserId(
Session session, UuidValue authUserId, {Transaction? transaction}) → Future< UserProfileModel?> -
Looks for a user profile by the
AuthUser's ID. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeUserImage(
Session session, UuidValue authUserId, {Transaction? transaction}) → Future< UserProfileModel> - Removes a user's image, setting it to null.
-
setDefaultUserImage(
Session session, UuidValue authUserId, {Transaction? transaction}) → Future< UserProfileModel> - Sets a user's image to the default image for that user.
-
setUserImageFromBytes(
Session session, UuidValue authUserId, Uint8List imageBytes, {Transaction? transaction}) → Future< UserProfileModel> - Sets a user's image from image data.
-
setUserImageFromUrl(
Session session, UuidValue authUserId, Uri url, {Transaction? transaction}) → Future< UserProfileModel> -
Sets a user's image from the provided
url. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited