【问题标题】:Textfield height is not decreasing in flutter | Flutter文本字段高度在颤动中没有减少 |扑
【发布时间】:2021-01-23 10:42:47
【问题描述】:
                 Container(
                    height: 30,
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: TextField(
                        decoration: InputDecoration(
                          suffixIcon: Padding(
                            padding: const EdgeInsets.all(8.0),
                            child: IconButton(
                              icon: Icon(
                                Icons.search,
                              ),
                              onPressed: () {},
                            ),
                          ),
                          border: new OutlineInputBorder(
                            borderRadius: const BorderRadius.all(
                              const Radius.circular(30.0),
                            ),
                          ),
                          filled: true,
                          hintStyle: new TextStyle(
                            color: Colors.grey[500],
                          ),
                          hintText: "Search Here",
                          fillColor: Colors.white70,
                        ),
                      ),
                    ),
                  ),

我想减小文本字段的大小,用容器包裹它并给出高度不起作用。有什么办法可以减少文本字段的大小

【问题讨论】:

标签: flutter dart textfield


【解决方案1】:

容器(
宽度:100.0, 孩子:文本字段(
样式:文本样式( 字体大小:30.0, 高度:2.0,
) ) )

【讨论】:

    猜你喜欢
    • 2020-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-01
    相关资源
    最近更新 更多