這是我第一次來這里,我遇到了一個小問題,即我想放在卡片頂部的影像無法正常作業,其余部分沒有顯示我使用的(堆疊和定位)我該怎么辦? ? 注意:我是初學者?? 這是代碼:
SizedBox(
width: 500,
height: 100,
child: Container(
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 10, vertical: 10),
child: Card(
color: Colors.grey.shade400,
child: Stack(children: [
Positioned(
bottom: 40,
left: 150,
child: CircleAvatar(
child: ClipOval(
child: Image.asset(
"assets/images/guy.jpg",
width: 100,
height: 100,
fit: BoxFit.cover,
),
),
backgroundColor: Colors.transparent,
radius: 50,
),
),
]),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
elevation: 10),
),
)),
這是輸出:

轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/359625.html
