With web flutter my text is cut at the bottom when I display text I tried to put padding but it doesn't work.
this problem this product everywhere even on the TextField
new Container(
width: menuRightWidthDesktop,
height: getSize == 0 ? heightHeaderDesktop : getSize == 1 ? heightHeaderTablette : heightHeaderMobile,
color: Colors.red,
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
new GestureDetector(
child: new Container(
color: Colors.indigoAccent,
child: new Text("Surfeur >"),
),
onTap: () {},
),
new GestureDetector(
child: new Text("Photographe >", ),
onTap: () {},
),
],
),
),
I've been having the same issue and solved it by increasing the height property of the text by a small value
Text("Surfeur >",
style: TextStyle(
height: 1.1,
),
),
There is a new pull request https://github.com/flutter/engine/pull/13929
experimental implementation of text measurement that's based on Canvas2d
You can use the following command
flutter run -d web-server --release --dart-define=FLUTTER_WEB_USE_EXPERIMENTAL_CANVAS_TEXT=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With