当textField未聚焦时如何实现labelText形状

时间:2020-04-21 13:43:51

标签: android flutter mobile flutter-layout

默认情况下,当您将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(),
            )
          ),

0 个答案:

没有答案