This file contains 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
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.PaddingValues | |
import androidx.compose.foundation.layout.aspectRatio | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.lazy.grid.GridCells | |
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid | |
import androidx.compose.foundation.lazy.grid.items | |
import androidx.compose.foundation.shape.RoundedCornerShape |
This file contains 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
private suspend fun <T> exponentialRetry( | |
maxTries: Int = Int.MAX_VALUE, | |
initialDelay: Long = Long.MAX_VALUE, | |
retryFactor: Int = Int.MAX_VALUE, | |
block: suspend () -> T | |
): T? { | |
var currentDelay = initialDelay | |
var retryAttempt = 1 | |
do { | |
runCatching { |
This file contains 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
/* | |
* Copyright 2023 Lyrebird Studio | |
*/ | |
package com.lyrebirdstudio.facelab.ui.photoedit | |
import android.graphics.Matrix | |
import androidx.activity.compose.BackHandler | |
import androidx.compose.animation.AnimatedVisibility | |
import androidx.compose.animation.AnimatedVisibilityScope | |
import androidx.compose.animation.EnterTransition |
This file contains 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
class BindingAdapterInitializer @Inject constructor( | |
private val bindingAdapter: GenericBindingAdapter | |
) : ApplicationInitializer { | |
override fun invoke(context: Context) { | |
DataBindingUtil.setDefaultComponent(object : DataBindingComponent { | |
override fun getGenericBindingAdapter() = bindingAdapter | |
}) | |
} | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<DatePicker | |
android:id="@+id/datePicker" |
This file contains 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 tr.com.bisu.app.core.presentation.base.extension | |
import android.content.BroadcastReceiver | |
import android.content.Context | |
import android.content.Intent | |
import android.content.IntentFilter | |
import android.os.Build | |
import android.widget.DatePicker | |
import android.widget.TimePicker | |
import androidx.annotation.CheckResult |
This file contains 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
import org.json.JSONException | |
import org.json.JSONObject | |
@Throws(JSONException::class) | |
fun jsonOf(vararg pairs: Pair<String, Any?>) = JSONObject().apply { | |
for ((key, value) in pairs) { | |
when (value) { | |
is Boolean -> put(key, value) | |
is Double -> put(key, value) | |
is Int -> put(key, value) |
This file contains 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
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:provider/provider.dart'; | |
import 'package:provider/single_child_widget.dart'; | |
typedef Build<T> = Widget Function(BuildContext context, T value, Widget child); | |
/// A [ChangeNotifierProvider] wrapper for consuming [T] value immediately. | |
/// | |
/// ## Creating a [ChangeNotifierProviderBuilder] |
This file contains 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
class Response { | |
List<Data> data; | |
Response({this.data}); | |
Response.fromJson(Map<String, dynamic> json) { | |
if (json['data'] != null) { | |
data = new List<Data>(); | |
json['data'].forEach((v) { | |
data.add(new Data.fromJson(v)); |