Skip to content

Instantly share code, notes, and snippets.

@Composable
fun CardsGameSample() {
val colors = listOf(
Color.Red, Color.Green, Color.Blue, Color.Yellow, Color.Cyan
)
var cardCounter by remember {
mutableStateOf(0)
}
Column {
Row {
@Composable
fun Greeting(name: String) {
Column(Modifier.fillMaxSize()) {
Column(
Modifier
.fillMaxWidth()
.weight(1f)
.verticalScroll(
rememberScrollState()
)
package br.com.nglauber.jetpackcomposeplayground.screens
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
package br.com.nglauber.jetpackcomposeplayground.screens
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Text
import androidx.compose.runtime.*
package com.example.deletemenavigation
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.List
import androidx.compose.material.icons.filled.Settings
@nglauber
nglauber / MainScreen.kt
Created January 3, 2021 19:46
Bottom Navigation + Jetpack Navigation
package com.example.samplecomposenavigation
import android.os.Bundle
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.List
import androidx.compose.material.icons.filled.Settings
import androidx.compose.runtime.*
import androidx.compose.runtime.savedinstancestate.Saver
import androidx.compose.runtime.savedinstancestate.rememberSavedInstanceState
package com.example.demo_gdg_curitiba
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.core.drawShadow
import androidx.ui.foundation.Text
import androidx.ui.foundation.clickable
import androidx.ui.foundation.drawBackground
import androidx.ui.foundation.drawBorder
import androidx.ui.foundation.shape.corner.CircleShape
class StepCounter extends StatefulWidget {
int value;
final int minValue;
final int maxValue;
final Function(int) onValueChanged;
StepCounter(
{@required this.value,
@required this.onValueChanged,
this.minValue = 0,
package com.example.bookscompose.http
import com.google.gson.annotations.SerializedName
data class Book(
@SerializedName("titulo")
var title: String = "",
var category: String = "",
@SerializedName("autor")
var author: String = "",
import 'package:flutter/material.dart';
import './models/transaction.dart';
import './widgets/chart.dart';
import './widgets/transaction_list.dart';
import './widgets/new_transaction.dart';
void main() {
// Import this -> import 'package:flutter/services.dart';
// SystemChrome.setPreferredOrientations([
// DeviceOrientation.portraitUp,