mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 19:51:11 +08:00
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/models/common/fav_order_type.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/data.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/media.dart';
|
||||
import 'package:PiliPlus/pages/common/common_search_page.dart';
|
||||
@@ -24,6 +25,29 @@ class _FavSearchPageState extends CommonSearchPageState<FavSearchPage,
|
||||
tag: Utils.generateRandomString(8),
|
||||
);
|
||||
|
||||
@override
|
||||
List<Widget>? get extraActions => [
|
||||
Obx(
|
||||
() {
|
||||
return PopupMenuButton<FavOrderType>(
|
||||
icon: const Icon(Icons.sort),
|
||||
requestFocus: false,
|
||||
initialValue: controller.order.value,
|
||||
tooltip: '排序方式',
|
||||
onSelected: (value) => controller
|
||||
..order.value = value
|
||||
..onReload(),
|
||||
itemBuilder: (context) => FavOrderType.values
|
||||
.map((e) => PopupMenuItem(
|
||||
value: e,
|
||||
child: Text(e.label),
|
||||
))
|
||||
.toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
Widget buildList(List<FavDetailItemModel> list) {
|
||||
return SliverGrid(
|
||||
|
||||
Reference in New Issue
Block a user