fix(recommend): 更正筛选按钮所属页面
This commit is contained in:
1 parent
bf20e44b85
commit
13d70fcef2
10 files changed
+124
-107
No files matched your search
@@ -24,12 +24,10 @@ class AllDramasFilterGrid extends StatefulWidget {
|
||||
super.key,
|
||||
required this.feedController,
|
||||
required this.onOpenDrama,
|
||||
required this.onOpenFilter,
|
||||
});
|
||||
|
||||
final HomeFeedController feedController;
|
||||
final ValueChanged<Drama> onOpenDrama;
|
||||
final VoidCallback onOpenFilter;
|
||||
|
||||
@override
|
||||
State<AllDramasFilterGrid> createState() => _AllDramasFilterGridState();
|
||||
@@ -295,49 +293,21 @@ class _AllDramasFilterGridState extends State<AllDramasFilterGrid> {
|
||||
Widget _sortRow(AppLocalizations l10n) {
|
||||
return _filterRow(
|
||||
row: 3,
|
||||
height: AppDimens.allDramasFilterButton,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: _horizontalChipScroll(
|
||||
scrollKey: const Key('all-filter-scroll-3'),
|
||||
chips: [
|
||||
_chip(
|
||||
key: const Key('all-sort-hot'),
|
||||
label: l10n.hot,
|
||||
selected: !_newest,
|
||||
onTap: () => setState(() => _newest = false),
|
||||
),
|
||||
const SizedBox(width: AppDimens.filterItemGap),
|
||||
_chip(
|
||||
key: const Key('all-sort-new'),
|
||||
label: l10n.newest,
|
||||
selected: _newest,
|
||||
onTap: () => setState(() => _newest = true),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: _horizontalChipScroll(
|
||||
scrollKey: const Key('all-filter-scroll-3'),
|
||||
chips: [
|
||||
_chip(
|
||||
key: const Key('all-sort-hot'),
|
||||
label: l10n.hot,
|
||||
selected: !_newest,
|
||||
onTap: () => setState(() => _newest = false),
|
||||
),
|
||||
const SizedBox(width: AppDimens.filterItemGap),
|
||||
Material(
|
||||
key: const Key('all-dramas-filter-page-button'),
|
||||
color: AppColors.filterMenuButton,
|
||||
shape: const CircleBorder(),
|
||||
child: InkWell(
|
||||
key: const Key('all-dramas-filter-page'),
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
_chip(
|
||||
key: const Key('all-sort-new'),
|
||||
label: l10n.newest,
|
||||
selected: _newest,
|
||||
onTap: () => setState(() => _newest = true),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user