Profile

data class Profile(val userName: String = String(), val profilePictureUri: String? = null)

Domain model representing a user's profile information in the application's data layer.

This model represents authenticated user profile data, primarily sourced from Firebase Auth and cached locally in DataStore via UserDataPreferences. Unlike dev.atick.data.model.home.Jetpack, this model doesn't use Room database storage; instead, it relies on DataStore for lightweight preference-based caching.

Profile data flow:

  • Firebase Auth provides initial profile data (name, photo) after sign-in

  • dev.atick.data.repository.profile.ProfileRepository observes Firebase Auth state

  • Profile is cached in DataStore for offline access and quick app startup

  • UI layer observes profile via dev.atick.feature.profile.ui.ProfileViewModel

Mapping extensions are provided for layer conversion:

Usage context:

  • Displayed in profile screen showing user name and avatar

  • Used in settings screen to show current user information

  • Updated when user changes profile via Firebase Auth methods

  • Cached locally for offline display and fast app startup

See also

DataStore preferences model for local caching

Subset of preferences specifically for profile data

Repository providing profile operations

dev.atick.feature.profile.ui.ProfileViewModel

ViewModel consuming profile data

Constructors

Link copied to clipboard
constructor(userName: String = String(), profilePictureUri: String? = null)

Properties

Link copied to clipboard

Optional URI string pointing to the user's profile picture.

Link copied to clipboard

Display name of the authenticated user (default: empty string).

Functions

Link copied to clipboard

Extension function to convert Profile to PreferencesUserProfile.