Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/skydoves/WhatIf
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Oct 17, 2024
2 parents a34a110 + aa55fe7 commit be22fca
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


<p align="center">
☔ Fluent Kotlin expressions for handling single if-else statements, nullable, collections, and boolean.
☔ Fluent Kotlin expressions for handling single if-else statements, nullable, collections, and boolean. This library supports Kotlin Multiplatform.
</p>
<br>

Expand Down Expand Up @@ -31,6 +31,18 @@ dependencies {
}
```

For Kotlin Multiplatform, add the dependency below to your module's `build.gradle.kts` file:

```kotlin
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.github.skydoves:whatif:1.2.0")
}
}
}
```

## Usage

WhatIf fully supports Kotlin Multiplatform, making it versatile for use in pure Kotlin modules as well as other platforms. You can leverage it in various use cases, including Jetpack Compose, where it helps streamline conditional logic. For instance, you can integrate `WhatIf` in Jetpack Compose to handle conditional rendering, as shown in the example below. This flexibility allows developers to maintain clean, readable code across different Kotlin Multiplatform projects.
Expand Down

0 comments on commit be22fca

Please sign in to comment.