mod: lint

mod: tweaks

opt: publish page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-04 11:37:13 +08:00
parent 2cfad80214
commit caa58e9d7d
313 changed files with 2751 additions and 2789 deletions

View File

@@ -31,7 +31,7 @@ class LaterController extends MultiSelectController<Map, HotVideoItemModel> {
);
@override
onSelect(int index, [bool disableSelect = true]) {
void onSelect(int index, [bool disableSelect = true]) {
List<HotVideoItemModel> list = (loadingState.value as Success).response;
list[index].checked = !(list[index].checked ?? false);
baseCtr.checkedCount.value =
@@ -91,7 +91,7 @@ class LaterController extends MultiSelectController<Map, HotVideoItemModel> {
builder: (context) {
return AlertDialog(
title: const Text('提示'),
content: Text('即将移除该视频,确定是否移除'),
content: const Text('即将移除该视频,确定是否移除'),
actions: [
TextButton(
onPressed: Get.back,
@@ -114,7 +114,7 @@ class LaterController extends MultiSelectController<Map, HotVideoItemModel> {
}
SmartDialog.showToast(res['msg']);
},
child: Text('确认移除'),
child: const Text('确认移除'),
)
],
);
@@ -150,7 +150,7 @@ class LaterController extends MultiSelectController<Map, HotVideoItemModel> {
);
}
onDelChecked(BuildContext context) {
void onDelChecked(BuildContext context) {
showDialog(
context: context,
builder: (context) {
@@ -183,7 +183,7 @@ class LaterController extends MultiSelectController<Map, HotVideoItemModel> {
);
}
void _onDelete(List<HotVideoItemModel> result) async {
Future<void> _onDelete(List<HotVideoItemModel> result) async {
SmartDialog.showLoading(msg: '请求中');
List<int?> aids = result.map((item) => item.aid).toList();
dynamic res = await UserHttp.toViewDel(aids: aids);

View File

@@ -17,7 +17,7 @@ enum LaterViewType { all, toView, unfinished, viewed }
extension LaterViewTypeExt on LaterViewType {
int get type => index;
String get title => ['全部', '未看', '未看完', '已看完'][index];
String get title => const ['全部', '未看', '未看完', '已看完'][index];
Widget get page => LaterViewChildPage(laterViewType: this);
}
@@ -58,8 +58,9 @@ class _LaterPageState extends State<LaterPage>
@override
void dispose() {
_tabController.removeListener(listener);
_tabController.dispose();
_tabController
..removeListener(listener)
..dispose();
Get.delete<LaterBaseController>();
super.dispose();
}
@@ -156,7 +157,7 @@ class _LaterPageState extends State<LaterPage>
),
Material(
clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(20),
borderRadius: const BorderRadius.all(Radius.circular(20)),
child: Builder(
key: sortKey,
builder: (context) {
@@ -191,13 +192,13 @@ class _LaterPageState extends State<LaterPage>
),
),
itemBuilder: (BuildContext context) => [
PopupMenuItem(
const PopupMenuItem(
value: false,
child: const Text('最近添加'),
child: Text('最近添加'),
),
PopupMenuItem(
const PopupMenuItem(
value: true,
child: const Text('最早添加'),
child: Text('最早添加'),
),
],
);
@@ -206,7 +207,7 @@ class _LaterPageState extends State<LaterPage>
),
Material(
clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(20),
borderRadius: const BorderRadius.all(Radius.circular(20)),
child: PopupMenuButton(
tooltip: '清空',
child: Padding(
@@ -215,7 +216,7 @@ class _LaterPageState extends State<LaterPage>
child: Text.rich(
TextSpan(
children: [
TextSpan(
const TextSpan(
text: '清空',
),
WidgetSpan(
@@ -263,14 +264,14 @@ class _LaterPageState extends State<LaterPage>
actions: [
TextButton(
style: TextButton.styleFrom(
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
visualDensity: VisualDensity.compact,
),
onPressed: () => currCtr().handleSelect(true),
child: const Text('全选'),
),
TextButton(
style: TextButton.styleFrom(
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
visualDensity: VisualDensity.compact,
),
onPressed: () {
final ctr = currCtr();
@@ -291,7 +292,7 @@ class _LaterPageState extends State<LaterPage>
),
TextButton(
style: TextButton.styleFrom(
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
visualDensity: VisualDensity.compact,
),
onPressed: () {
final ctr = currCtr();
@@ -312,7 +313,7 @@ class _LaterPageState extends State<LaterPage>
),
TextButton(
style: TextButton.styleFrom(
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
visualDensity: VisualDensity.compact,
),
onPressed: () => currCtr().onDelChecked(context),
child: Text(