如何在flutter中制作圆形的TextField? [英] How can I make rounded TextField in flutter?

查看:419
本文介绍了如何在flutter中制作圆形的TextField?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS的材质设计不太好,尤其是 TextField .那么有什么办法可以创建自己的?还是有什么方法可以向TextField添加样式,使其看起来更圆滑?

Material Design for iOS doesn't look good, especially the TextField. So is there any way to create your own ? Or Is ther any way to add some styling to TextField so it will look rounded ?

推荐答案

您可以在TextField

new TextField(
  decoration: new InputDecoration(
      border: new OutlineInputBorder(
        borderRadius: const BorderRadius.all(
          const Radius.circular(10.0),
        ),
      ),
      filled: true,
      hintStyle: new TextStyle(color: Colors.grey[800]),
      hintText: "Type in your text",
      fillColor: Colors.white70),
)

这篇关于如何在flutter中制作圆形的TextField?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆