Kodak-KMP is a Kotlin Multiplatform project that implements an image loading library from scratch using Jetpack Compose. This library supports multiple platforms, including Android, iOS, Desktop, and Web (Wasm). It offers efficient, asynchronous image loading with robust caching and memory management mechanisms.
- Android
- iOS
- Desktop
- Web (Wasm)
- Asynchronous Image Loading: Load images from a URL asynchronously using Ktor and Coroutines.
- Jetpack Compose Compatibility: Seamlessly integrates with Jetpack Compose for modern UI development.
- Image Placeholder: Displays placeholders for both loading and error states to enhance user experience.
- Caching Mechanism: Implements both memory and disk caching to optimize loading times and reduce redundant network calls.
- Memory Management: Efficiently manages memory by avoiding loading high-quality or raw images unnecessarily.
- Asynchronous Image Loading from URL: Fetch images from remote servers without blocking the main thread.
- Compatible with Jetpack Compose: Fully compatible with Jetpack Compose for all target platforms.
- Image Placeholder: Show placeholders during image loading and in case of loading errors.
- Caching Mechanism: Utilize both memory and disk caching strategies to store images.
- Memory Management: Optimize memory usage by preventing the loading of high-quality or raw images when not needed.
-
/composeApp
is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:commonMain
is for code that’s common for all targets.- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name.
For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app,
iosMain
would be the right folder for such calls.
-
/iosApp
contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
Learn more about Kotlin Multiplatform, Compose Multiplatform, Kotlin/Wasm…
We would appreciate your feedback on Compose/Web and Kotlin/Wasm in the public Slack channel #compose-web. If you face any issues, please report them on GitHub.
You can open the web application by running the :composeApp:wasmJsBrowserDevelopmentRun
Gradle task.
For a detailed explanation of the system design and implementation, please refer to the Medium article that covers all the essential concepts and decisions made during the development of Kodak-KMP.
This project is licensed under the MIT License. See the LICENSE file for more details.
##🙌 Contributions Contributions are welcome! Please open an issue or submit a pull request to contribute.
If you have any questions or feedback, feel free to reach out via social handles LinkedIn | Medium | Twitter | StackOverflow | CodeWars | Portfolio | Github | Instagram | Youtube