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
import 'package:flutter/material.dart'; | |
abstract class FieldRenderer { | |
Widget render(FormField field); | |
} | |
class FieldRendererFactory { | |
static FieldRenderer? getRenderer(String type) { | |
switch (type) { | |
case "input": |
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
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.Row | |
import androidx.compose.material3.Text | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Alignment | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.graphics.ColorFilter | |
import androidx.compose.ui.graphics.DefaultAlpha |
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
plugins { | |
libs.plugins.apply { | |
alias(android.application) apply false | |
alias(kotlin.parcelize) apply false | |
alias(android.library) apply false | |
alias(kotlin.android) apply false | |
alias(hilt.android) apply false | |
alias(kotliner) apply false | |
alias(detekt) apply false | |
alias(ksp) apply false |
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
@Composable | |
fun ContactList( | |
contacts: List<Contact>, | |
comparator: Comparator<Contact>, | |
modifier: Modifier = Modifier | |
) { | |
LazyColumn(modifier) { | |
// DON’T DO THIS | |
items(contacts.sortedWith(comparator)) { contact -> | |
// ... |
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.sanaebadi.foursquare.presentaion.util | |
import android.content.Context | |
import android.content.Context.CONNECTIVITY_SERVICE | |
import android.content.Intent | |
import android.content.pm.PackageManager | |
import android.net.ConnectivityManager | |
import android.net.Uri | |
import android.os.Build | |
import android.provider.Settings |