flutter TextFormField

发布时间 2024-01-10 10:35:16作者: 吾爱吃鱼
   TextFormField(
     maxLength: 20,
     controller: controller.shippernameController,
     decoration: InputDecoration(
      counterText: '',//计数器的显示
      border: InputBorder.none,
      fillColor: Colors.white,
      filled: true,
      isCollapsed: true,
      contentPadding:
      const EdgeInsets.symmetric(horizontal: 15, vertical: 15),
      enabledBorder: OutlineInputBorder(
          borderSide:
          const BorderSide(color: Colors.white, width: 0)),
      focusedBorder: UnderlineInputBorder(
        borderSide: BorderSide(color: Colors.transparent),
      ),
      hintText: '请填写发货人姓名',
      hintStyle: inputstyle(),
      ),
      keyboardType: TextInputType.text,
    ),