This project is a Kotlin Multiplatform Mobile(KMM) demo that uses Compose to write a fully shared code between Android and Ios including UI.
Becuase UI is 100% shared across platforms(Zero code written on IOS project), we have some limitations, like: we don't have access to regular Android api's/libraries like: ViewModel, Navigation, Hilt, Toast....
This app will show a list of characters (Name and Image) of the television show Rick and Morty.
- Pagination by page number
- Pull to refresh.
- Loading item inside the list during the api request.
- Error item inside the list if api request failed that include a retry button.
- VersionCatalog to manage dependencies.
- Multiplatform resources.
Before you run this project, use the KDoctor tool to ensure that your development environment is configured correctly:
-
Install KDoctor with Homebrew:
brew install kdoctor
-
Run KDoctor in your terminal:
kdoctor
If everything is set up correctly, you'll see valid output:
Environment diagnose (to see all details, use -v option): [✓] Operation System [✓] Java [✓] Android Studio [✓] Xcode [✓] Cocoapods Conclusion: ✓ Your system is ready for Kotlin Multiplatform Mobile development!
Otherwise, KDoctor will highlight which parts of your setup still need to be configured and will suggest a way to fix them.
- Jetpack Compose: for UI.
- Coroutine: to request data from server on thread other than UI thread.
- Ktor: to make api calls.
- Kotlinx-Serialization: to deserialize api response.
- Compose ImageLoader: to load images from url.
- Koin: to inject dependencies (DI).
- Lifecycle to have Google's implementation of ViewModel.
- Project configurations is based on this template
- Kindly note that Compose Multiplatform is still in alpha, so it is subject to change and may require manual migration proceess when it is released.
If you have any questions or suggestion please contact me on malbdour92@gmail.com
Find me on LinkedIn: https://www.linkedin.com/in/mobidroid92/