我想制作這樣的容器,但無法獲得我想要的結果。
下面是我的代碼,我嘗試像影像一樣制作,但我無法用分隔線分隔顏色
在此處輸入影像描述
Expanded(
child:
Container(
padding: EdgeInsets.only(left: 20,top: 5),
decoration: BoxDecoration(
border: Border.all(
color: Colors.black, width: 1.0),
borderRadius: const BorderRadius.all(
Radius.circular(32),
)),
height: 150,
width: 500,
child: Column(
children: [Container(
child:Column(
children: [Container(
child: Text("TOTAL: GGWP "
totalCart.toString() " ITEMS",style:
TextStyle(fontSize: 40,color: Colors.black,fontWeight: FontWeight.w400)),
), Text("TOTAL: GGWP "
totalCart.toString() " ITEMS",style:
TextStyle(fontSize: 40,color: Colors.black,fontWeight: FontWeight.w400)),],
),
)],
),
),
),
uj5u.com熱心網友回復:
我想這就是你想要的。
Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
border: Border.all(color: Colors.black, width: 2),
borderRadius: const BorderRadius.all(
Radius.circular(32),
)),
width: 200,
child: Column(
children: [
Container(
padding: EdgeInsets.only(left: 20, top: 5),
color: Colors.orange,
child: Text("TOTAL: GGWP " "---" " ITEMS",
style: TextStyle(fontSize: 24, color: Colors.black, fontWeight: FontWeight.w400)),
),
Padding(
padding: EdgeInsets.only(left: 20, top: 5),
child: Text("TOTAL: GGWP " "---" " ITEMS",
style: TextStyle(fontSize: 24, color: Colors.black, fontWeight: FontWeight.w400)),
),
],
),
),
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/535791.html
標籤:扑容器