[英]Flutter how to make container like below with divider line
我想制作這樣的容器,但無法獲得我想要的結果。
下面是我的代碼,我嘗試像圖像一樣制作,但我無法用分隔線分隔顏色
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)),],
),
)],
),
),
),
我想這就是你想要的。
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)),
),
],
),
),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.