📖
AppKickstarter docs
  • Get Started
    • Get started
    • Initialize third parties
    • Project organization
    • Application initialization
  • Tech things
    • Multi modules Architecture
    • Dependency injection
    • Library management
    • Secrets and Build Config
    • Backend as an implementation detail
  • Tutorials
    • Add a login page
    • Add a screen with tab bars
    • Add a settings screen
    • Display an In-App Changelog for a new published version
    • Update localizations
    • Update theme
    • Customize onboarding
    • Setup your paywall
    • Setup your first notifications
    • Format dates and save on database
    • Using a Different Backend Instead of Firebase
    • Make an infinite list with pagination
  • Features
    • Onboarding
    • Authentication
    • Firebase support
    • Offline support
    • Monetization
    • Whats new feature
    • Navigation in AppKickstarter
    • Theme
    • UI Kit
    • Dates management
    • Platform specific
    • Offline cache
    • Translations
    • Analytics
    • User management
    • Logger
    • Platform utilities
    • Maps and locations
    • Secured AI Backend Proxy
    • Settings
    • Application monitoring
    • Notifications
  • UI Kit
    • Adaptive
    • Advanced Components
    • Animated Components
    • Badges
    • Buttons
    • Cards
    • Containers
    • Dialogs
    • EmptyStates
    • Icons
    • Images
    • Lists
    • Modals
    • Tabs
    • Texts
    • Text fields
    • Toasts
    • Toggles
  • Other
    • Known issues
Powered by GitBook
On this page
  • Save Profile Picture
  • Control the remote storage

Was this helpful?

  1. Features

User management

data class User(
    val uid: String,
    val name: String,
    val email: String,
    val picture: FileUrl?,
)
val saveProfilePicture = SaveProfilePicture(args) // args are injected thanks to Koin
saveProfilePicture(byteArray)

Save Profile Picture

Imagine you want to create a ProfileScreen that save picture profile selected via gallery ou camera to the local file system and remote storage:

class ProfileScreenModel(
    private val saveProfilePicture: SaveProfilePicture,
): ScreenModel {
    fun saveProfilePicture(byteArray) {
        this.saveProfilePicture(byteArray)
    }
}

SaveProfilePicture saves in local file system the image then tries to send it to the remote storage.

Control the remote storage

suspend fun putFileAt(localFile: LocalFile, location: String): FileUrl

PreviousAnalyticsNextLogger

Last updated 1 year ago

Was this helpful?