Skip to content

Instantly share code, notes, and snippets.

View arthurgonzaga's full-sized avatar
🔥

Arthur Ribeiro arthurgonzaga

🔥
View GitHub Profile
@startuml
actor Gerente
actor Motoristas
actor Usuários
Gerente -[bold]- (Acessar\ninformações cadastrais)
Gerente -[bold]- (Gerenciar\neventos)
Gerente -[bold]- (Login\nna web)
Motoristas -[bold]- (Compartilhar\nlocalização)
@arthurgonzaga
arthurgonzaga / GetOrAwaitValue
Created August 25, 2021 15:05
LiveData Extension function very useful for testing
import androidx.annotation.VisibleForTesting
import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
fun <T> LiveData<T>.getOrAwaitValue(
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Paint
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp