可以不使用默認的appbar,自定義佈局

/*appBar: PreferredSize(
        child: Container(
          decoration: BoxDecoration(
              color: Color(0Xffd3dda5),
              borderRadius: BorderRadius.only(
                  bottomLeft: Radius.circular(20),
                  bottomRight: Radius.circular(20))),
          child: Container(
              margin: EdgeInsets.only(bottom: 5),
              width: double.infinity,
              height: width * 0.4,
              decoration: BoxDecoration(
                  image: DecorationImage(
                    image: AssetImage("images/ielts_top.png"),
                  ),
                  color: Color(0Xff9eba31),
                  borderRadius: BorderRadius.only(
                      bottomLeft: Radius.circular(20),
                      bottomRight: Radius.circular(20))),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Row(
                    children: <Widget>[
                      ImageIcon(AssetImage('images/personal_center.png'))
                    ],
                  ),
                  Container(
                    padding: EdgeInsets.only(left: 30),
                    child: Row(
                      children: <Widget>[
                        Container(
                          height: 45,
                          width: width*0.7,
                          decoration: BoxDecoration(
                            color: Colors.white,
                            borderRadius:BorderRadius.circular(30),//邊框
                          ),
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceAround,
                            children: <Widget>[
                              //Text('搜索補習年級詳情',style: TextStyle(color: Color(0Xffc7c7c8),fontSize: 18),),
                              Container(
                                width:width*0.5,
                                height: 100,
                                child: TextFormField(
                                  focusNode: _focusNode,
                                  maxLines: 1,
                                  onSaved: (value) { },
                                  //controller: phoneController,
                                  textAlign: TextAlign.left,
                                  //inputFormatters: [WhitelistingTextInputFormatter.digitsOnly,LengthLimitingTextInputFormatter(6)],
                                  decoration: InputDecoration(
                                    hintText: ('搜尋補習年級詳情'),
                                    contentPadding: EdgeInsets.only(top: -5,bottom: 0),
                                    hintStyle: TextStyle(
                                      color: Color(0Xffc7c7c8),
                                      fontSize: 20,
                                    ),
                                    alignLabelWithHint: true,
                                    border: OutlineInputBorder(borderSide: BorderSide.none),
                                  ),
                                ),
                              ),
                              Icon(Icons.search, color: Color(0Xff4d80c5),)
                            ],
                          ),
                        )
                      ],
                    ),
                  )
                ],
              )
          ),
        ),
        preferredSize: Size(double.infinity, width * 0.35),
      ),*/

 

posted on 2020-03-25 12:16  诉说静风  阅读(2795)  评论(0编辑  收藏  举报

Live2D
快把你的小爪子拿开!