opt: search page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-17 10:32:42 +08:00
parent 5959288491
commit a99fc8fa72
5 changed files with 184 additions and 197 deletions

View File

@@ -25,36 +25,30 @@ class _HistorySearchPageState
@override
Widget buildList(List<HisListItem> list) {
return CustomScrollView(
physics: const AlwaysScrollableScrollPhysics(),
controller: controller.scrollController,
slivers: [
SliverPadding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).padding.bottom + 80,
),
sliver: SliverGrid(
gridDelegate: Grid.videoCardHDelegate(context, minHeight: 110),
delegate: SliverChildBuilderDelegate(
childCount: list.length,
(context, index) {
if (index == list.length - 1) {
controller.onLoadMore();
}
final item = list[index];
return HistoryItem(
videoItem: item,
ctr: controller,
onChoose: null,
onDelete: (kid, business) {
controller.onDelHistory(index, kid, business);
},
);
return SliverPadding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).padding.bottom + 80,
),
sliver: SliverGrid(
gridDelegate: Grid.videoCardHDelegate(context, minHeight: 110),
delegate: SliverChildBuilderDelegate(
childCount: list.length,
(context, index) {
if (index == list.length - 1) {
controller.onLoadMore();
}
final item = list[index];
return HistoryItem(
videoItem: item,
ctr: controller,
onChoose: null,
onDelete: (kid, business) {
controller.onDelHistory(index, kid, business);
},
),
),
);
},
),
],
),
);
}
}