问题
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: () {},
),
],
),
),
回答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
来源:https://stackoverflow.com/questions/59672179/flutter-for-web-text-cut-off-at-bottom