1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| Widget buildPsw() { return Container( alignment: Alignment.centerLeft, padding: EdgeInsets.only(left: ScreenUtil().setHeight(20)), height: ScreenUtil().setHeight(90), decoration: BoxDecoration( color: Colours.white, borderRadius: BorderRadius.circular(ScreenUtil().setHeight(60)), border: Border.all(color: Color(0xffffd300))), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Expanded( child: TextField( controller: pswEditer, keyboardType: TextInputType.visiblePassword, focusNode: _nodeText1, maxLength: 16, style: TextStyle( fontSize: ScreenUtil().setSp(28), color: Colours.darkGray), decoration: InputDecoration( hintText: '请填写密码', counterText: "", hintStyle: TextStyle(color: Colours.gray), border: InputBorder.none, isDense: true, contentPadding: EdgeInsets.zero, ), inputFormatters: [ WhitelistingTextInputFormatter( RegExp("[^\u4e00-\u9fa5]")), LengthLimitingTextInputFormatter(16), ], obscureText: !isCanSee), ), IconButton( iconSize: ScreenUtil().setHeight(20), icon: Image.asset( Utils.getImgPath(isCanSee?'see':"nosee")), onPressed: () { setState(() { isCanSee = !isCanSee; }); })
], ), ); }
|