This file contains hidden or 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
@Preview | |
@Composable | |
private fun DashedDividerPreview() { | |
DashedDivider( | |
color = Color.Black, | |
thickness = 1.dp, | |
modifier = Modifier | |
.fillMaxWidth() | |
.padding(16.dp) | |
) |
This file contains hidden or 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
1. hiltvm (applicable in top-level) | |
@dagger.hilt.android.lifecycle.HiltViewModel | |
class $NAME$ @javax.inject.Inject constructor( | |
$PARAM$ | |
) : androidx.lifecycle.ViewModel() { | |
$END$ | |
} | |
2. vmstatefunc (applicable in class) | |
private val _$NAME$ = androidx.compose.runtime.mutableStateOf<$TYPE$>($INITIAL_VALUE$) |
This file contains hidden or 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
$ awk -v ORS='\\n' '1' karnov-review.2019-01-21.private-key.pem | pbcopy |
This file contains hidden or 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
package com.trendyol.inventorycenterapi.helper | |
import com.trendyol.inventorycenterapi.domain.inventory.CurrencyCode | |
import java.lang.reflect.* | |
import java.time.Instant | |
import kotlin.random.Random | |
import kotlin.reflect.full.createType | |
import kotlin.reflect.KClass | |
import kotlin.reflect.KType | |
import kotlin.reflect.KTypeProjection |
This file contains hidden or 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
import org.junit.jupiter.api.Test | |
import kotlin.random.Random | |
import kotlin.reflect.KClass | |
import kotlin.reflect.KType | |
import kotlin.reflect.KTypeParameter | |
import kotlin.test.assertEquals | |
import kotlin.test.assertTrue | |
// Take getKType from https://gist.github.com/udalov/bb6f398c2e643ee69586356fdd67e9b1 |
This file contains hidden or 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
import com.google.android.gms.common.GoogleApiAvailability | |
import com.google.android.gms.tasks.Task | |
import splitties.init.appCtx | |
import kotlin.coroutines.experimental.suspendCoroutine | |
val googleApiAvailability = GoogleApiAvailability.getInstance()!! | |
inline val playServicesAvailability get() = googleApiAvailability.isGooglePlayServicesAvailable(appCtx) | |
@JvmName("awaitVoid") | |
suspend fun Task<Void>.await() = suspendCoroutine<Unit> { continuation -> |