One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
suspend fun flowCombineFix() { | |
val sharedFlow = MutableSharedFlow<String>() | |
val stateFlow = MutableStateFlow<Int>(0) | |
combine( | |
// Emit default value on start | |
sharedFlow.onStart { emit("") }, | |
stateFlow | |
) { shared, state -> | |
"$shared $state" |
package com.vivek.githubapisample.api | |
import com.vivek.githubapisample.BuildConfig | |
import okhttp3.OkHttpClient | |
import okhttp3.logging.HttpLoggingInterceptor | |
import retrofit2.Retrofit | |
import retrofit2.converter.moshi.MoshiConverterFactory | |
/** | |
* This class will be responsible to provide all kind Retrofit Client for making networking calls. |
import androidx.annotation.StringRes | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.ReadOnlyComposable | |
import androidx.compose.ui.res.stringResource | |
import com.crinoid.humotron.R | |
import com.crinoid.humotron.data.common.AppException | |
import retrofit2.HttpException | |
import java.io.IOException | |
import kotlin.String |
import 'package:shared_preferences/shared_preferences.dart'; | |
/// Singleton helper class for storing and fetching persistent data | |
/// in KEY-VALUE pair. Read data in synchronous way | |
/// | |
/// For best practices, here we define all unique keys in integer | |
/// and handle default values | |
/// | |
/// Note: this utils require plugin to work | |
/// In 'pubspec.ymal' add this line in dependencies |