Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -40,17 +40,17 @@ class SearchAllController
@override
Future<LoadingState<SearchAllData>> customGetData() => SearchHttp.searchAll(
keyword: keyword,
page: page,
order: order.value,
duration: searchType == SearchType.video ? duration.value : null,
tids: tids,
orderSort: orderSort,
userType: userType,
categoryId: categoryId,
pubBegin: pubBegin,
pubEnd: pubEnd,
);
keyword: keyword,
page: page,
order: order.value,
duration: searchType == SearchType.video ? duration.value : null,
tids: tids,
orderSort: orderSort,
userType: userType,
categoryId: categoryId,
pubBegin: pubBegin,
pubEnd: pubEnd,
);
void onPushDetail(dynamic resultList) {
try {

View File

@@ -52,44 +52,46 @@ class _SearchAllPanelState
.map(
(item) => switch (item) {
SearchVideoItemModel() => SizedBox(
height: 120,
child: VideoCardH(
videoItem: item,
),
height: 120,
child: VideoCardH(
videoItem: item,
),
List<SearchPgcItemModel>() => item.length == 1
? SizedBox(
height: 160,
child: SearchPgcItem(item: item.first),
)
: SizedBox(
height: Grid.smallCardWidth / 2 / 0.75 +
MediaQuery.textScalerOf(context).scale(60),
child: ListView.builder(
padding: const EdgeInsets.only(bottom: 7),
physics: const AlwaysScrollableScrollPhysics(),
scrollDirection: Axis.horizontal,
itemCount: item.length,
itemBuilder: (context, index) {
return Container(
width: Grid.smallCardWidth / 2,
margin: EdgeInsets.only(
left: StyleString.safeSpace,
right: index == item.length - 1
? StyleString.safeSpace
: 0,
),
child: PgcCardVSearch(item: item[index]),
);
},
),
List<SearchPgcItemModel>() =>
item.length == 1
? SizedBox(
height: 160,
child: SearchPgcItem(item: item.first),
)
: SizedBox(
height:
Grid.smallCardWidth / 2 / 0.75 +
MediaQuery.textScalerOf(context).scale(60),
child: ListView.builder(
padding: const EdgeInsets.only(bottom: 7),
physics: const AlwaysScrollableScrollPhysics(),
scrollDirection: Axis.horizontal,
itemCount: item.length,
itemBuilder: (context, index) {
return Container(
width: Grid.smallCardWidth / 2,
margin: EdgeInsets.only(
left: StyleString.safeSpace,
right: index == item.length - 1
? StyleString.safeSpace
: 0,
),
child: PgcCardVSearch(item: item[index]),
);
},
),
),
),
SearchUserItemModel() => Padding(
padding: const EdgeInsets.only(bottom: 5),
child: SearchUserItem(
item: item,
),
padding: const EdgeInsets.only(bottom: 5),
child: SearchUserItem(
item: item,
),
),
_ => const SizedBox.shrink(),
},
)

View File

@@ -31,25 +31,27 @@ class PgcCardVSearch extends StatelessWidget {
children: [
AspectRatio(
aspectRatio: 0.75,
child: LayoutBuilder(builder: (context, boxConstraints) {
final double maxWidth = boxConstraints.maxWidth;
final double maxHeight = boxConstraints.maxHeight;
return Stack(
clipBehavior: Clip.none,
children: [
NetworkImgLayer(
src: item.cover,
width: maxWidth,
height: maxHeight,
),
PBadge(
text: item.seasonTypeName,
right: 6,
top: 6,
),
],
);
}),
child: LayoutBuilder(
builder: (context, boxConstraints) {
final double maxWidth = boxConstraints.maxWidth;
final double maxHeight = boxConstraints.maxHeight;
return Stack(
clipBehavior: Clip.none,
children: [
NetworkImgLayer(
src: item.cover,
width: maxWidth,
height: maxHeight,
),
PBadge(
text: item.seasonTypeName,
right: 6,
top: 6,
),
],
);
},
),
),
Padding(
padding: const EdgeInsets.fromLTRB(4, 5, 0, 3),
@@ -62,7 +64,7 @@ class PgcCardVSearch extends StatelessWidget {
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
)
),
],
),
),