This file contains hidden or 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
| @Preview | |
| @Composable | |
| fun ImageCaptureView(onImageCaptured: (Path?) -> Unit, onClose: () -> Unit = {}) { | |
| val scope = rememberCoroutineScope() | |
| val callback = remember { | |
| object : CameraCallback() { | |
| override fun onCaptureImage(image: Path?, error: String?) { | |
| showToast("Image Captured $image") | |
| onImageCaptured(image) |
This file contains hidden or 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
| package com.codingwitharul.bill_it.common.auth | |
| import androidx.compose.runtime.Composable | |
| import com.codingwitharul.bill_it.common.auth.GoogleAuthenticator | |
| expect class GoogleAuthProvider { | |
| @Composable | |
| fun getUiProvider(): GoogleAuthenticator |
This file contains hidden or 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
| package com.codingwitharul.bill_it.common.auth | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.ui.platform.LocalContext | |
| import androidx.credentials.CredentialManager | |
| import com.google.firebase.auth.FirebaseAuth | |
| actual class GoogleAuthProvider(val credentialManager: CredentialManager) { | |
| @Composable | |
| actual fun getUiProvider(): GoogleAuthenticator { |
This file contains hidden or 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
| package com.codingwitharul.bill_it.common.auth | |
| import androidx.compose.runtime.Composable | |
| actual class GoogleAuthProvider() { | |
| @Composable | |
| actual fun getUiProvider(): GoogleAuthenticator = GoogleAuthenticator() | |
| actual suspend fun signOut() { |
This file contains hidden or 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
| package com.codingwitharul.bill_it.common.auth | |
| import androidx.compose.runtime.Composable | |
| actual class GoogleAuthProvider(val oauth: GoogleOAuthDesktop) { | |
| @Composable | |
| actual fun getUiProvider(): GoogleAuthenticator { | |
| return GoogleAuthenticator(oauth) | |
| } |
This file contains hidden or 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
| package com.codingwitharul.bill_it.common.auth | |
| import com.codingwitharul.bill_it.common.model.GoogleUser | |
| import com.codingwitharul.bill_it.data.networking.ApiClientHelper | |
| import com.codingwitharul.bill_it.utils.toThrowable | |
| import io.ktor.http.* | |
| import io.ktor.server.cio.* | |
| import io.ktor.server.engine.* | |
| import io.ktor.client.request.* | |
| import io.ktor.client.statement.* |
OlderNewer