网页 flutter : text cut off at bottom

标签 flutter dart flutter-web

使用 web flutter,当我显示文本时,我的文本在底部被剪切,我试图放置填充,但它不起作用。

这个问题这个产品无处不在,甚至在 TextField 上

enter image description here

    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: () {},
          ),
        ],
      ),
    ),

最佳答案

我一直有同样的问题,并通过增加 解决了它高度 文本属性由一个小值

Text("Surfeur >",
  style: TextStyle(
    height: 1.1,
  ),
),

关于网页 flutter : text cut off at bottom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59672179/

相关文章:

flutter - 崩溃报告。你能帮我解决这个崩溃吗?

android - 来自/root/.pub-cache/hosted/pub.dartlang.org 包的 Flutter 调试编译错误

dart - 当我只设置一次时,我的变量会自动更新。为什么会这样?

dart - 从 double 转换为 int 时如何避免使用 'as'?

flutter - 子列通过stretch时可拖动的反馈消失了怎么办

Firebase Hosting - Flutter Web App 托管额外的 .html 页面

android - 如何在flutter中将ImageCache保存到磁盘?

web-deployment - 404 无法加载资源将 Flutter Web 应用程序部署到 GitHub 页面

flutter - 如何在 Flutter/Dart 中导入特定于平台的依赖项? (结合网络与Android/iOS)

flutter - 在哪里放置 Provider 来访问数据的问题