Home > database >  Flutter how can i change floating label position?
Flutter how can i change floating label position?

Time:03-23

I have a simple login form. But i want to change floating label position. I dont want floating label go on border. For make it more clear : Its how i want :

Before Focus:

enter image description here

After Focus:

enter image description here

How can i make it ? Thanks for help!

CodePudding user response:

TextField(
                    style: Theme.of(context).textTheme.headline3,
                    keyboardType: TextInputType.number,
                    onChanged: (value) {
                    },
                    decoration: InputDecoration(
                      border: InputBorder.none,
                      fillColor: Colors.black12,
                      filled: true,
                      labelText: 'Enter here'
                    ),
                  ),
             

try this

  • Related