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
syntax enable | |
colorscheme elflord | |
set expandtab | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set paste | |
set number | |
let mapleader = "\<Space>" |
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
plugins { | |
id 'org.jetbrains.kotlin.jvm' version '1.3.41' | |
} | |
group 'CoroutinesPlayground' | |
version '1.0-SNAPSHOT' | |
repositories { | |
mavenCentral() | |
} |
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
@BindingAdapter("onTextChanged") | |
fun onTextChanged(inputText: InputText, block: (String) -> Unit) { | |
inputText.addTextChangedListener(object : TextWatcher { | |
override fun onTextChanged(CharSequence s, int start, int before, int count) { | |
block(s.toString()) | |
} | |
}) | |
} |
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
// Variable Heights | |
package com.mattkula.layouts | |
import androidx.compose.animation.core.Animatable | |
import androidx.compose.animation.core.tween | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Box |
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
data class Grouping( | |
val groups: List<Group>, | |
) | |
data class Group( | |
val standings: List<Standings>, | |
) | |
data class Standings( |
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
object CancellableScope | |
interface CancellableUseCase { | |
context(CancellableScope) | |
suspend operator fun invoke(): Result | |
} | |
suspend fun <T> Flow<T>.collectLatestSafe(action: suspend context(CancellableScope) (value: T) -> Unit) { | |
collectLatest { item -> | |
with(CancellableScope) { |
OlderNewer