Flutter para bebés

Sin categoría

Flutter para bebés

Diseños

Colores

const primary = Color(0xFF50C2C9);
const secondary = Color(0xFF24D0C6);
const tertiary = Color(0xFF4A4A4A);
const background = Color(0xFFF5F5F5);

Recursos

Snippets de código

Theme

ThemeData(
        colorScheme: const ColorScheme.light(
          primary: primary,
          secondary: secondary,
          background: background,
        ),
        textTheme: Theme.of(context).textTheme.apply(
              bodyColor: tertiary,
              displayColor: tertiary,
            ),
      ),

Splash Image

Image.network(
                  'https://codigobase.es/wp-content/uploads/2021/12/splash-image.png',
                  fit: BoxFit.cover,
                  width: 180,
                  height: 168,
                ),

Splash Text

Text(
                  'Things To Do With Simple List',
                  style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600,),
                ),

Splash Button

ElevatedButton(
                  onPressed: () {},
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Empezar',
                      style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600,),
                    ),
                  ),
                ),

Task list Image

Image.network(
                        'https://codigobase.es/wp-content/uploads/2021/12/profile.png',
                        width: 114,
                      ),

Task list Text

Text(
                      'Welcome Arsalan Ahmed',
                      style: TextStyle(
                        fontSize: 18,
                        fontWeight: FontWeight.w600,
                        color: Colors.white,
                      ),
                    ),

Task list card

Card(
            elevation: 2,
            shape: const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(
                Radius.circular(20),
              ),
            ),
            child: Padding(
              padding: const EdgeInsets.all(15),
              child: Row(
                children: [
                  Icon(task.done
                      ? Icons.check_box_outlined
                      : Icons.check_box_outline_blank_rounded),
                  const SizedBox(width: 10),
                  Text(task.name),
                ],
              ),
            ),
          ),

Task list TextField

TextField(
                  decoration: InputDecoration(
                    label: const Text('New Task'),
                    contentPadding: const EdgeInsets.all(10),
                    fillColor: Colors.white,
                    filled: true,
                    border: OutlineInputBorder(
                      borderRadius: BorderRadius.circular(10)
                    ),
                  ),
                ),

Dismissible parameters

background: Container(
                              padding: const EdgeInsets.only(right: 10),
                              color: Colors.red.withOpacity(0.2),
                              alignment: Alignment.centerRight,
                              child: const Icon(Icons.delete),
                            ),
                            key: Key('task$index'),
                            onDismissed: (direction) {
                              setState(() {
                                tasks.removeAt(index);
                              });
                              ScaffoldMessenger.of(context).showSnackBar(
                                  SnackBar(
                                      content:
                                          Text('Task ${task.name} deleted')));
                            },

https://gist.github.com/ikicodedev/308ac827784e7aa38fee99e28ce860aa

Déjanos un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Suscríbete a nuestra Newsletter