How can I make rounded TextField in flutter?

前端 未结 5 605
予麋鹿
予麋鹿 2021-02-02 05:35

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 TextFie

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-02 05:54

    You can add rounded corners to a TextField within the decoration parameter of the 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),
    )
    

提交回复
热议问题