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
// Project | |
plugins { | |
alias(libs.plugins.ksp) apply false | |
alias(libs.plugins.hilt) apply false | |
} | |
// Module | |
plugins { | |
alias(libs.plugins.ksp) | |
alias(libs.plugins.hilt) |
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/material.dart'; | |
const double _kPanelHeaderCollapsedHeight = kMinInteractiveDimension; | |
class _SaltedKey<S, V> extends LocalKey { | |
const _SaltedKey(this.salt, this.value); | |
final S salt; | |
final V 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 androidx.compose.foundation.text.ClickableText | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.platform.LocalUriHandler | |
import androidx.compose.ui.text.SpanStyle | |
import androidx.compose.ui.text.buildAnnotatedString | |
import androidx.compose.ui.text.font.FontWeight | |
import androidx.compose.ui.text.style.TextDecoration | |
import androidx.compose.ui.unit.TextUnit |
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
object CountryFlags { | |
private val A = getEmojiByUnicode(0x1F1E6) | |
private val B = getEmojiByUnicode(0x1F1E7) | |
private val C = getEmojiByUnicode(0x1F1E8) | |
private val D = getEmojiByUnicode(0x1F1E9) | |
private val E = getEmojiByUnicode(0x1F1EA) | |
private val F = getEmojiByUnicode(0x1F1EB) | |
private val G = getEmojiByUnicode(0x1F1EC) | |
private val H = getEmojiByUnicode(0x1F1ED) | |
private val I = getEmojiByUnicode(0x1F1EE) |
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 'dart:convert'; | |
import 'dart:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
import '../../utils/constants.dart'; | |
import '../../utils/error/failure.dart'; | |
import '../../utils/extensions/extensions.dart'; | |
import '../../utils/injection_container.dart'; |
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 android.content.Context | |
import android.net.ConnectivityManager | |
import android.net.Network | |
import android.net.NetworkCapabilities | |
import android.net.NetworkRequest | |
import android.os.Bundle | |
import android.widget.TextView | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.ViewModelProvider |
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
/** | |
* Navigates only if this is safely possible; when this Fragment is still the current destination. | |
*/ | |
fun Fragment.navigateSafe( | |
@IdRes resId: Int, | |
args: Bundle? = null, | |
navOptions: NavOptions? = null, | |
navigatorExtras: Navigator.Extras? = null | |
) { | |
if (mayNavigate()) findNavController().navigate( |
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
public class CountryFlags { | |
private static String A = getEmojiByUnicode(0x1F1E6); | |
private static String B = getEmojiByUnicode(0x1F1E7); | |
private static String C = getEmojiByUnicode(0x1F1E8); | |
private static String D = getEmojiByUnicode(0x1F1E9); | |
private static String E = getEmojiByUnicode(0x1F1EA); | |
private static String F = getEmojiByUnicode(0x1F1EB); | |
private static String G = getEmojiByUnicode(0x1F1EC); | |
private static String H = getEmojiByUnicode(0x1F1ED); | |
private static String I = getEmojiByUnicode(0x1F1EE); |
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
fun <T> debounce( | |
waitMs: Long = 300L, | |
scope: CoroutineScope, | |
destinationFunction: (T) -> Unit | |
): (T) -> Unit { | |
var debounceJob: Job? = null | |
return { param: T -> | |
debounceJob?.cancel() | |
debounceJob = scope.launch { | |
delay(waitMs) |
NewerOlder