Expanded(
                child:ConstrainedBox(
                        constraints: BoxConstraints(
                          maxHeight: 40,
                        ), 
                        child: TextField(
                          decoration: InputDecoration(
                            contentPadding: EdgeInsets.fromLTRB(10, 0, 10, 15),
                            fillColor: Color(0XFFFFF8F4),
                            filled: true,
                            enabledBorder: OutlineInputBorder(
                              /*边角*/
                              borderRadius: BorderRadius.all(
                                Radius.circular(5), //边角为5
                              ),
                              borderSide: BorderSide(
                                color: Colors.white, //边线颜色为白色
                                width: 1, //边线宽度为2
                              ),
                            ),
                            focusedBorder: OutlineInputBorder(
                                borderSide: BorderSide(
                                  color: Colors.white, //边框颜色为白色
                                  width: 1, //宽度为5
                                ),
                                borderRadius: BorderRadius.all(
                                  Radius.circular(5), //边角为30
                                ),
                            ),
                          ),
                        ),
                      ),
                      
                    ),
Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐