Skip to content

Commit

Permalink
fix: 查看回复异常 issues #92
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Mar 30, 2024
1 parent 38ff9da commit 4070938
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions lib/components/topic/reply_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,29 @@ class _ReplySheetState extends State<ReplySheet> with TickerProviderStateMixin {
var i = widget.replyMemberList.indexOf(e);
print('104: ${widget.resultList[i]}');
// return Text(e);
return ListView.builder(
physics: const ClampingScrollPhysics(), //重要
itemCount: widget.resultList[i][e].length,
itemBuilder: (BuildContext context, int index) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: ReplyListItem(
reply: widget.resultList[i][e][index],
topicId: widget.topicId,
totalPage: widget.totalPage,
source: 'sheet',
),
);
// return Text('123');
},
);
return widget.resultList[i][e] != null
? ListView.builder(
physics: const ClampingScrollPhysics(), //重要
itemCount: widget.resultList[i][e]?.length,
itemBuilder: (BuildContext context, int index) {
return Container(
padding:
const EdgeInsets.symmetric(horizontal: 12),
child: ReplyListItem(
reply: widget.resultList[i][e][index],
topicId: widget.topicId,
totalPage: widget.totalPage,
source: 'sheet',
),
);
// return Text('123');
},
)
: const SizedBox(
child: Center(
child: Text('无回复内容'),
),
);
}).toList(),
),
),
Expand Down

0 comments on commit 4070938

Please sign in to comment.