小编Mic*_*ael的帖子

如何在flutter中扩展textField看起来像一个文本区域

当我在landScape模式下点击textField时,我想在全屏模式下展开喜欢whatsapp

示例 gif 是什么

            TextFormField(
              keyboardType: TextInputType.number,
              decoration: InputDecoration(
                  prefixIcon: Padding(
                    padding: EdgeInsets.all(0.0),
                    child: Icon(Icons.person,
                        size: 40.0, color: Colors.white),
                  ),
                  hintText: "Input your opinion",
                  hintStyle: TextStyle(color: Colors.white30),
                  border: OutlineInputBorder(
                      borderRadius:
                      BorderRadius.all(new Radius.circular(25.0))),
                  labelStyle: TextStyle(color: Colors.white)),
              textAlign: TextAlign.center,
              style: TextStyle(
                color: Colors.white,
                fontSize: 25.0,
              ),
              controller: host,
              validator: (value) {
                if (value.isEmpty) {
                  return "Empty value";
                }
              },
            )
Run Code Online (Sandbox Code Playgroud)

android textfield dart flutter

42
推荐指数
6
解决办法
5万
查看次数

标签 统计

android ×1

dart ×1

flutter ×1

textfield ×1