79453388

Date: 2025-02-20 05:06:33
Score: 0.5
Natty:
Report link

All you had to do was to give padding to the label property by wrapping it by Padding Widget.

Full Code : -

Container(
        width: 270,
        decoration: BoxDecoration(
          color: const Color.fromARGB(255, 243, 250, 220),
          border: Border.all(color: Colors.green),
          borderRadius: BorderRadius.all(Radius.circular(25)),
        ),
        child: TextFormField(
          decoration: InputDecoration(
            border: InputBorder.none,
            label: Padding(
              padding: EdgeInsets.only(bottom: 5),
              child: Text('USERNAME OR EMAIL'),
            ),

            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: 5),
          ),
        ),
      )

Output :-

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ramji