How to position the label inside the border rather than on the border
CodePudding user response:
Use label style and add a height property. If you add height less than 1 the label would be lowered
labelStyle: TextStyle(
height:0.7,
)
CodePudding user response:
height value increase the label will more inside the border. if height value negative the label will out side the border
TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Enter a search term',
labelStyle: TextStyle(
height: 3
)
),
),