flutter TextField 外边框颜色


Container(
                              child: TextField(
                                controller: activeCodeEditer,
                                keyboardType: TextInputType.number,
                                focusNode: _nodeText3,
//                                style: TextStyle(fontSize: 14, color: Color(0xff9e51ff)),
                                maxLength: 8,
                                decoration: InputDecoration(
                                  hintText: '请输入激活码',
                                  counterText: "",
//                                icon: Image.asset('assets/images/icons-login-mobile.png', height: 25),
                                  hintStyle: TextStyle(color: Color(0xff9e51ff)),
                                  contentPadding: EdgeInsets.only(left: 10,top: ScreenUtil().setHeight(10)),
                                  border: OutlineInputBorder(
                                      borderRadius: BorderRadius.circular(5.0),
                                      borderSide: BorderSide(color: Color(0xff9e51ff),), //这个不生效
                                  ),
                                  enabledBorder: OutlineInputBorder( //未选中时候的颜色
                                    borderRadius: BorderRadius.circular(5.0),
                                    borderSide: BorderSide(color: Color(0xff9e51ff),),
                                  ),
                                  focusedBorder: OutlineInputBorder( //选中时外边框颜色
                                    borderRadius: BorderRadius.circular(5.0),
                                    borderSide: BorderSide(color: Color(0xff9e51ff),),
                                  ),
//                                  focusedBorder: UnderlineInputBorder(  //选中时下边框颜色 
//                                    borderSide: BorderSide(color: Colors.red),
//                                  ),
                                ),
                              ),
                              width: ScreenUtil().setHeight(278),
                              height: ScreenUtil().setHeight(67),
                            )

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM