Como adicionar sombra ao TextFormField no Flutter

alexandrefreire

Alexandre Freire

Posted on August 14, 2020

Como adicionar sombra ao TextFormField no Flutter

Aprenda nesse tutorial como adicionar sombra ao TextFormField no Flutter utilizando o widget Material.

Você pode utilizar o TextFormFieldcom um Materialwidget e editar suas propriedades, como elevatione shadowColor.

Exemplo:

Material(
              elevation: 20.0,
              shadowColor: Colors.blue,
                          child: TextFormField(
                obscureText: true,
                autofocus: false,
                decoration: InputDecoration(
                    icon: new Icon(Icons.lock, color: Color(0xff224597)),
                    hintText: 'Password',
                    fillColor: Colors.white,
                    filled: true,
                    contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
                    enabledBorder: OutlineInputBorder(borderRadius:BorderRadius.circular(5.0),
                    borderSide: BorderSide(color: Colors.white, width: 3.0))
                ),
              ),
            )  
Enter fullscreen mode Exit fullscreen mode

Você vai conseguir algo parecido com a imagem abaixo.
Alt Text

Fonte: stackoverflow.com

💖 💪 🙅 🚩
alexandrefreire
Alexandre Freire

Posted on August 14, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024

How to Use KitOps with MLflow
beginners How to Use KitOps with MLflow

November 29, 2024

Modern C++ for LeetCode 🧑‍💻🚀
leetcode Modern C++ for LeetCode 🧑‍💻🚀

November 29, 2024