style(recommend): 按截图重做全部短剧筛选区

This commit is contained in:
Zhou Weidong committed 2026-10-22 20:49:54 +08:00
1 parent 3b9ff8a306
commit d79e200650
5 files changed
+62 -63

No files matched your search

@@ -144,7 +144,7 @@ class _AllDramasFilterGridState extends State<AllDramasFilterGrid> {
padding: const EdgeInsets.fromLTRB(
AppDimens.feedPageHorizontal,
0,
AppDimens.feedPageHorizontal,
AppDimens.allDramasFilterRight,
AppDimens.allDramasFilterToGridGap,
),
child: Column(
@@ -254,7 +254,9 @@ class _AllDramasFilterGridState extends State<AllDramasFilterGrid> {
child: Text(
label,
style: TextStyle(
color: selected ? AppColors.textPrimary : AppColors.textTabInactive,
color: selected
? AppColors.filterChipTextSelected
: AppColors.filterChipTextInactive,
fontSize: AppDimens.filterChipFont,
fontWeight: selected ? FontWeight.w600 : FontWeight.w400,
height: 1,
@@ -267,39 +269,41 @@ class _AllDramasFilterGridState extends State<AllDramasFilterGrid> {
Widget _sortRow(AppLocalizations l10n) {
return SizedBox(
key: const Key('all-filter-row-3'),
height: AppDimens.filterChipHeight,
height: AppDimens.allDramasFilterButton,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_sortOption(
_chip(
key: const Key('all-sort-hot'),
label: l10n.hot,
selected: !_newest,
onTap: () => setState(() => _newest = false),
),
const SizedBox(width: AppDimens.filterItemGap),
_sortOption(
_chip(
key: const Key('all-sort-new'),
label: l10n.newest,
selected: _newest,
onTap: () => setState(() => _newest = true),
),
const Spacer(),
SizedBox.square(
dimension: AppDimens.allDramasFilterIcon,
child: IconButton(
Material(
key: const Key('all-dramas-filter-page-button'),
color: AppColors.filterMenuButton,
shape: const CircleBorder(),
child: InkWell(
key: const Key('all-dramas-filter-page'),
tooltip: l10n.filter,
padding: EdgeInsets.zero,
constraints: const BoxConstraints.tightFor(
width: AppDimens.allDramasFilterIcon,
height: AppDimens.allDramasFilterIcon,
customBorder: const CircleBorder(),
onTap: widget.onOpenFilter,
child: const SizedBox.square(
dimension: AppDimens.allDramasFilterButton,
child: Icon(
Icons.filter_list_rounded,
size: AppDimens.allDramasFilterIcon,
color: AppColors.filterMenuIcon,
),
),
onPressed: widget.onOpenFilter,
color: AppColors.textPrimary,
iconSize: AppDimens.allDramasFilterIcon,
icon: const Icon(Icons.filter_list_rounded),
),
),
],
@@ -307,39 +311,6 @@ class _AllDramasFilterGridState extends State<AllDramasFilterGrid> {
);
}
Widget _sortOption({
required Key key,
required String label,
required bool selected,
required VoidCallback onTap,
}) {
return GestureDetector(
key: key,
behavior: HitTestBehavior.opaque,
onTap: onTap,
child: SizedBox(
height: AppDimens.filterChipHeight,
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: AppDimens.filterChipHorizontalPadding,
),
alignment: Alignment.center,
child: Text(
label,
style: TextStyle(
color: selected
? AppColors.textPrimary
: AppColors.textTabInactive,
fontSize: AppDimens.filterChipFont,
fontWeight: selected ? FontWeight.w700 : FontWeight.w400,
height: 1,
),
),
),
),
);
}
List<({String id, String label})> _availableGenres(AppLocalizations l10n) {
final definitions = [
(id: 'reversal', label: l10n.reversalFilter, terms: _reversalTerms),