Hint Text alignment

135 views
Skip to first unread message

Johan Scheepers

unread,
Aug 14, 2021, 10:14:28 AM8/14/21
to Flutter Development (flutter-dev)
Hi All,


I have 3 containers that requires a input and wo is a double and the third a int.

When I add the hint text to the container, the alignment of the text vertical is not correct.

How can I align it vertically in the center?

The const for the first two.

'''.
const kTextFieldDecorationLat = InputDecoration(
filled: true,
fillColor: Colors.white,
hintText: 'Latitude',
hintStyle: TextStyle(
color: Colors.grey,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
borderSide: BorderSide.none,
),
);

const kTextFieldDecorationLon = InputDecoration(
filled: true,
fillColor: Colors.white,
//hintText: 'Longitude',
hintStyle: TextStyle(
color: Colors.grey,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
borderSide: BorderSide.none,
),
);
'''
The screen miss alignment when the hint is add.
hint.PNG




Reply all
Reply to author
Forward
0 new messages