默认情况下,当您将OutlineBorder类传递给InputDecoration并同时传递labelText时,当textField被聚焦时,您将获得此形状-> (shape)。当textField不聚焦时,如何实现相同的形状。
TextFormField(
decoration: InputDecoration(
labelText: "Enter Email",
fillColor: Colors.white,
border: OutlineInputBorder2(
borderRadius: BorderRadius.circular(25.0),
borderSide: BorderSide(),
),
enabledBorder: OutlineInputBorder2(
borderRadius: BorderRadius.circular(25.0),
borderSide: BorderSide(),
),
focusedBorder: OutlineInputBorder2(
borderRadius: BorderRadius.circular(25.0),
borderSide: BorderSide(),
)
),