Skip to content

Instantly share code, notes, and snippets.

View dimsuz's full-sized avatar

Dmitry Suzdalev dimsuz

View GitHub Profile
@dimsuz
dimsuz / example.kt
Last active February 4, 2022 11:03
enum class TaskState { Idle, Running }
interface Task {
val state: Flow<TaskState>
val results: Flow<Result<Int, Throwable>>
fun start()
}
@Composable
package ru.kode.appyxplayground
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.Button
import androidx.compose.material.MaterialTheme