我怎样才能在颤振中制作带有边框半径的文本字段???

Pul*_*aid 2 flutter flutter-layout

我想在颤振中向此文本字段添加边框半径。我的代码是

 new Container(
            padding: const EdgeInsets.only(bottom: 10.0, top: 20.0),
            child: new Opacity(
                opacity: 0.7,
                child: new TextField(
                  style: new TextStyle(
                      fontSize: 18.0,
                      height: 1.1,
                      color: Colors.white,
                      fontFamily: 'Akrobat-Bold'),
                  decoration: InputDecoration(
                      filled: true,
                      fillColor: const Color(0xFF808285),
                      hintStyle: TextStyle(
                          color: Colors.white, fontFamily: 'Akrobat-Bold'),
                      border: InputBorder.none,
                      hintText: 'User ID'),
                )),
          ),
Run Code Online (Sandbox Code Playgroud)

提前致谢。

Rao*_*che 10

你可以使用OutlineInputBorder

TextField(
  decoration: InputDecoration(
    border: UnderlineInputBorder(
    borderRadius:BorderRadius.circular(5.0)),
    hintText: 'Please enter a search term'
  ),
);
Run Code Online (Sandbox Code Playgroud)