首页3个tab视频快速切换index边界问题修复
This commit is contained in:
parent
2ba610ca7f
commit
6291dbc55d
@ -1294,10 +1294,16 @@ class _AttentionModuleState extends State<AttentionModule> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||
Text(
|
||||
'@${videoList[videoModuleController.videoPlayIndex.value]['nickname'] ?? '未知'}',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||
) else
|
||||
Text(
|
||||
'@未知',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||
),
|
||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final text = videoList[videoModuleController.videoPlayIndex.value]['title'] ?? '未知';
|
||||
@ -1348,7 +1354,8 @@ class _AttentionModuleState extends State<AttentionModule> {
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)else
|
||||
SizedBox()
|
||||
],
|
||||
)),
|
||||
Positioned(
|
||||
|
@ -1299,10 +1299,18 @@ class _FriendModuleState extends State<FriendModule> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||
Text(
|
||||
'@${videoList[videoModuleController.videoPlayIndex.value]['nickname'] ?? '未知'}',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||
)
|
||||
else
|
||||
Text(
|
||||
'@未知',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||
),
|
||||
// 对下面的 LayoutBuilder 也需要同样的检查
|
||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final text = videoList[videoModuleController.videoPlayIndex.value]['title'] ?? '未知';
|
||||
@ -1353,7 +1361,8 @@ class _FriendModuleState extends State<FriendModule> {
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)else
|
||||
SizedBox()
|
||||
],
|
||||
)),
|
||||
Positioned(
|
||||
|
@ -1300,10 +1300,16 @@ class _RecommendModuleState extends State<RecommendModule> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||
Text(
|
||||
'@${videoList[videoModuleController.videoPlayIndex.value]['nickname'] ?? '未知'}',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||
) else
|
||||
Text(
|
||||
'@未知',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||
),
|
||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final text = videoList[videoModuleController.videoPlayIndex.value]['title'] ?? '未知';
|
||||
@ -1353,7 +1359,8 @@ class _RecommendModuleState extends State<RecommendModule> {
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)else
|
||||
SizedBox()
|
||||
],
|
||||
)),
|
||||
Positioned(
|
||||
|
Loading…
x
Reference in New Issue
Block a user