This SampleApp is built with Compose multiplatform based on MVVM architecture, which covers
- Coroutines
- Navigation
- Flow
- Material3
- Koin
- Api Calling
- Network Image Loading
- Kotlin Serialization
MIN_Video.1.1.mp4
Open-source libraries Used in this Demo
- Kotlin based, Coroutines + Flow for asynchronous.
- Kotlin Serialization: Kotlin multiplatform / multi-format serialization.
- Compose multiplatform: a modern UI framework for Kotlin.
- Voyager: for navigation.
- Ktor: for making network requests.
- Koin: a pragmatic lightweight dependency injection framework.
- Material 3: Material 3 components
- MVVM: Project Architecture
- Image: Remote Image Loading
Other
- Logger: Kotlin multi platform logging
- Webview: for web url loading
- Bottomsheet
- Resources: (Use custom fonts, add images(png,xml), Use string resources with multi language)
for networking:
https://api.thecatapi.com/v1/images/search?limit=20
Voyager
For bottomTab navigation, screen navigation, bottomSheet Navigation follow below
Step:1
commonMain
// Multiplatform
// Navigator
implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion")
// BottomSheetNavigator
implementation("cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyagerVersion")
// TabNavigator
implementation("cafe.adriel.voyager:voyager-tab-navigator:$voyagerVersion")
// Transitions
implementation("cafe.adriel.voyager:voyager-transitions:$voyagerVersion")
Step:2
-> Core Logic
-> Usage
ImageLoader
api("io.github.qdsfdhvh:image-loader:1.6.7")
Example ImageView.kt
Ktor
commonMain
implementation("io.ktor:ktor-client-core:2.3.6")
implementation("io.ktor:ktor-client-content-negotiation:2.3.6")
implementation("io.ktor:ktor-client-logging:2.3.6")
api("io.ktor:ktor-serialization-kotlinx-json:2.3.6")
androidMain
implementation("io.ktor:ktor-client-android:2.3.3")
implementation("io.ktor:ktor-client-okhttp:2.3.3")
iOSMain
implementation("io.ktor:ktor-client-darwin:2.3.3")
For Api calling Follow
Serialization
commonMain
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
Koin
commonMain
implementation("io.insert-koin:koin-core:3.4.3")
implementation("io.insert-koin:koin-compose:1.0.4")
androidMain
implementation("io.insert-koin:koin-android:3.4.3")
String Resources
Follow StringRes.kt
CustomFont
Add font in commonMain -> resources (if not create)-> create font directory and add fonts
Drawable
Add font in commonMain -> resources (if not create)-> add images