This is the goal This is what i made
I can't customize properly the behaviour of the label text
Container(
width: 270,
height: 40,
decoration: BoxDecoration(
color: const Color.fromARGB(255, 243, 250, 220),
borderRadius: BorderRadius.circular(20),
border: Border.all(color: Colors.green),
),
child: TextFormField(
controller: _emailController,
textAlign: TextAlign.left,
decoration: const InputDecoration(
labelText: 'USERNAME OR EMAIL',
floatingLabelBehavior: FloatingLabelBehavior.auto,
floatingLabelAlignment:
FloatingLabelAlignment.start,
border: InputBorder.none,
labelStyle: TextStyle(
fontSize: 10,
fontFamily: 'Montserrat',
fontWeight: FontWeight.normal,
letterSpacing: 0.4,
color: const Color.fromARGB(255, 88, 88, 88)),
contentPadding: EdgeInsets.symmetric(
horizontal: 20, vertical: 18),
),
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter your email';
}
return null;
},
),
),
Basically, I want the label text to move to the uppermost left of the textbox when i click it, so I can type the input without the label text disappearing ang obstructing the input
