I hereby claim:
- I am marcellogalhardo on github.
- I am marcellogalhardo (https://keybase.io/marcellogalhardo) on keybase.
- I have a public key ASADlX8nIcOyMW-1xcRa1aQnEzHnGEQ5IQ_2j6rNq13sjAo
To claim this, I am signing this object:
| import java.io.Serializable | |
| import kotlin.contracts.ExperimentalContracts | |
| import kotlin.contracts.InvocationKind | |
| import kotlin.contracts.contract | |
| /** | |
| * A discriminated union that encapsulates a successful outcome with a value of type [T] | |
| * or a failure with an arbitrary [Throwable] exception. | |
| */ | |
| public sealed class Result<out T> : Serializable { |
| package dev.marcellogalhardo.lifecycle | |
| import android.app.Activity | |
| import androidx.lifecycle.Lifecycle | |
| import androidx.lifecycle.LifecycleCoroutineScope | |
| import androidx.lifecycle.LifecycleOwner | |
| import kotlinx.coroutines.CoroutineScope | |
| import kotlinx.coroutines.Job | |
| import kotlinx.coroutines.channels.Channel | |
| import kotlinx.coroutines.flow.Flow |
| package com.marcellogalhardo.viewmodel.factory | |
| import androidx.fragment.app.viewModels | |
| import androidx.lifecycle.ViewModel | |
| import androidx.lifecycle.ViewModelProvider | |
| import javax.inject.Inject | |
| import javax.inject.Provider | |
| /** | |
| * A [ViewModelProvider.Factory] that can hold a ViewModel [producer] function |
| package com.marcellogalhardo.weak | |
| import java.lang.ref.WeakReference | |
| import kotlin.properties.ReadWriteProperty | |
| import kotlin.reflect.KProperty | |
| /** | |
| * Creates a new instance of the [WeakDelegate] for better Kotlin | |
| * syntax using the [referent] parameter as an initial reference. | |
| * |
| package com.marcellogalhardo.AutoClearedValue | |
| import androidx.fragment.app.Fragment | |
| import androidx.lifecycle.DefaultLifecycleObserver | |
| import androidx.lifecycle.LifecycleOwner | |
| import androidx.lifecycle.observe | |
| import kotlin.properties.ReadOnlyProperty | |
| import kotlin.properties.ReadWriteProperty | |
| import kotlin.reflect.KProperty |
| interface SavedStateViewModelFactory { | |
| fun <T : ViewModel?> create(key: String, modelClass: Class<T>, handle: SavedStateHandle): T | |
| } | |
| private fun SavedStateViewModelFactory.asViewModelProviderFactory( | |
| owner: SavedStateRegistryOwner | |
| ): ViewModelProvider.Factory { | |
| return object : AbstractSavedStateViewModelFactory(owner, owner.arguments) { | |
| override fun <T : ViewModel?> create(key: String, modelClass: Class<T>, handle: SavedStateHandle): T { | |
| return this@asViewModelProviderFactory.create(key, modelClass, handle) |
| package com.marcellogalhardo.coordinator | |
| import androidx.fragment.app.Fragment | |
| import androidx.fragment.app.FragmentFactory | |
| import androidx.fragment.app.FragmentManager | |
| import androidx.lifecycle.AbstractSavedStateViewModelFactory | |
| import androidx.lifecycle.DefaultLifecycleObserver | |
| import androidx.lifecycle.HasDefaultViewModelProviderFactory | |
| import androidx.lifecycle.LifecycleOwner | |
| import androidx.lifecycle.SavedStateHandle |
| @Scope | |
| @Retention(AnnotationRetention.RUNTIME) | |
| annotation class ActivityScope |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * The [Lce] interface and its subclasses are a form of container | |
| * to help handling with loading, data fetch, and error handling | |
| * on Streams. This class was designed as an Immutable object that contains | |
| * the data and status of each Stream operation. | |
| */ | |
| interface Lce<T> { | |
| fun getData(): T? |