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