我第一次面對這個問題,我沒有選擇如何去做。我閱讀了很多論壇,并沒有在任何地方找到這樣的東西。我需要按照圖片中的方式進行操作,我該怎么做?
這是結果示例:
在此處輸入影像描述
Padding(padding: const EdgeInsets.only(top: 15),
child: Row(
children: const [
CircleAvatar(
backgroundColor: Colors.white,
radius: 18,
child: CircleAvatar(
radius: 16,
backgroundImage: AssetImage('lib/assets/avatar-410658-028235png.png'),
),
),
CircleAvatar(
backgroundColor: Colors.white,
radius: 18,
child: CircleAvatar(
radius: 16,
backgroundImage: AssetImage('lib/assets/avatar-410658-028235png.png'),
),
),
CircleAvatar(
backgroundColor: Colors.white,
radius: 18,
child: CircleAvatar(
radius: 16,
backgroundImage: AssetImage('lib/assets/avatar-410658-028235png.png'),
),
),
CircleAvatar(
backgroundColor: Colors.white,
radius: 20,
child: CircleAvatar(
radius: 18,
backgroundColor: Colors.black,
child: Text('28', style: TextStyle(fontSize: 12.5, color: Colors.white ),),
)
),
Padding(padding: EdgeInsets.only(left: 70) ,
child: Text('6 Hours Ago', style: TextStyle(fontSize: 12.5),)
),
],
),
),
uj5u.com熱心網友回復:
使用堆疊小部件。在這里閱讀:
https://api.flutter.dev/flutter/widgets/Stack-class.html
uj5u.com熱心網友回復:
You need to wrap your CircleAvatar widget with align widget and set the widthFactor parameter to a double for example.
Padding(
padding: const EdgeInsets.only(top: 15),
child: Row(
children: const [
Align(
widthFactor: .7,
child: CircleAvatar(
backgroundColor: Colors.white,
radius: 18,
child: CircleAvatar(
radius: 16,
backgroundImage:
AssetImage('lib/assets/avatar-410658-028235png.png'),
),
),
),
Align(
widthFactor: .7,
child: CircleAvatar(
backgroundColor: Colors.white,
radius: 18,
child: CircleAvatar(
radius: 16,
backgroundImage:
AssetImage('lib/assets/avatar-410658-028235png.png'),
),
),
),
Align(
widthFactor: .7,
child: CircleAvatar(
backgroundColor: Colors.white,
radius: 18,
child: CircleAvatar(
radius: 16,
backgroundImage:
AssetImage('lib/assets/avatar-410658-028235png.png'),
),
),
),
Align(
widthFactor: .7,
child: CircleAvatar(
backgroundColor: Colors.white,
radius: 20,
child: CircleAvatar(
radius: 18,
backgroundColor: Colors.black,
child: Text(
'28',
style: TextStyle(fontSize: 12.5, color: Colors.white),
),
)),
),
Padding(
padding: EdgeInsets.only(left: 70),
child: Text(
'6 Hours Ago',
style: TextStyle(fontSize: 12.5),
)),
],
),
),
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/529385.html
標籤:扑镖颤振测试
上一篇:發生例外。_TypeError(型別'_InternalLinkedHashMap<String,dynamic>'不是型別'List<String&g
下一篇:顫動無法理解為什么它不回傳api
