首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Flutter : InputDecoration suffixIcon使用线条定位底部

Flutter : InputDecoration suffixIcon使用线条定位底部
EN

Stack Overflow用户
提问于 2020-09-18 12:55:32
回答 2查看 87关注 0票数 0

代码语言:javascript
运行
复制
InputDecoration(
    labelText: label,
    floatingLabelBehavior: null,
    hintText: hintText,
    isDense:true,
    suffixIcon: Padding(
      padding: const EdgeInsetsDirectional.only(end:0),
      child: Text("Currency",style: TextStyle(fontWeight: FontWeight.bold),),
    ),
    contentPadding: EdgeInsets.symmetric(vertical: 5),
  )

我尝试在输入行附近对齐Currency单词,我尝试使用填充,但看起来没有效果

注意:因为我需要它来显示即使它是非焦点的,所以我使用suffixIcon

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-09-18 13:06:36

最高高度可以工作

代码语言:javascript
运行
复制
  suffixIcon: Padding(
                padding: const EdgeInsetsDirectional.only(top: 30),
                //...
票数 1
EN

Stack Overflow用户

发布于 2020-09-18 13:04:25

代码语言:javascript
运行
复制
InputDecoration(
    labelText: label,
    floatingLabelBehavior: null,
    hintText: hintText,
    isDense:true,
    suffixText: "Currency",
    suffixStyle: TextStyle(fontWeight: FontWeight.bold),
    contentPadding: EdgeInsets.symmetric(vertical: 5),
  )
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63949550

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档