-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 Add some README for documenting samples
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Samples Projects | ||
|
||
Here is a list of sample projects that demonstrate how to use the Kotlin Picker library: | ||
|
||
- `sample-core`: A Kotlin Multiplatform project using Picker in a shared viewModel targeting Android, JVM, WASM, JS, iOS Swift, macOS Swift and iOS Compose. | ||
- `sample-compose`: A Compose Multiplatform project using Picker in a Composable targeting Android, iOS, JVM, WASM, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Sample Compose | ||
|
||
This sample project demonstrates the use of Kotlin Picker Compose. | ||
|
||
## 🌱 Important parts | ||
|
||
The important part of this sample is: | ||
- [App.kt](https://github.com/vinceglb/PickerKotlin/blob/main/samples/sample-compose/composeApp/src/commonMain/kotlin/App.kt) in the composeApp module where the file picker is used. | ||
|
||
## 🚀 Running the sample project | ||
|
||
By openning KotlinPicker in Android Studio or IntelliJ IDEA, you will be able to run the sample project on all platforms. | ||
|
||
```bash | ||
# Run on JVM | ||
./gradlew samples:sample-compose:composeApp:run | ||
|
||
# Run on WASM | ||
./gradlew samples:sample-compose:composeApp:wasmJsBrowserDevelopmentRun | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Sample Core | ||
|
||
This sample project demonstrates the use of Kotlin Picker Core in a shared viewModel targeting Android, JVM, WASM, JS, iOS Swift, macOS Swift and iOS Compose. | ||
|
||
## 🌱 Important parts | ||
|
||
The important parts of this sample are: | ||
|
||
- [MainViewModel.kt](https://github.com/vinceglb/PickerKotlin/blob/main/samples/sample-core/shared/src/commonMain/kotlin/io/github/vinceglb/sample/core/MainViewModel.kt) in the shared module. It's here where the file picker is used. | ||
- [App.kt](https://github.com/vinceglb/PickerKotlin/blob/main/samples/sample-core/composeApp/src/commonMain/kotlin/io/github/vinceglb/sample/core/compose/App.kt) in the composeApp module where the state is consumed and the viewModel is called. | ||
- [ContentView.swift](https://github.com/vinceglb/PickerKotlin/blob/main/samples/sample-core/appleApps/macOSApp/ContentView.swift) in the iOSApp and macOSApp modules where the state is consumed and the viewModel is called in Swift. | ||
- [MainActivity.kt](https://github.com/vinceglb/PickerKotlin/blob/main/samples/sample-core/composeApp/src/androidMain/kotlin/io/github/vinceglb/sample/core/compose/MainActivity.kt) where we initialize the Picker in Android. | ||
|
||
## 🚀 Running the sample project | ||
|
||
By openning KotlinPicker in Android Studio or IntelliJ IDEA, you will be able to run the sample project on all platforms. | ||
|
||
```bash | ||
# Run on JVM | ||
./gradlew samples:sample-core:composeApp:run | ||
|
||
# Run on WASM | ||
samples:sample-core:composeApp:wasmJsBrowserDevelopmentRun | ||
``` |