mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
feat: del note
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/fav/note/child_view.dart';
|
||||
import 'package:PiliPlus/pages/fav/note/controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class FavNotePage extends StatefulWidget {
|
||||
const FavNotePage({super.key});
|
||||
@@ -65,7 +68,21 @@ class _FavNotePageState extends State<FavNotePage>
|
||||
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
onPressed: () {},
|
||||
onPressed: () async {
|
||||
final favNoteController = Get.find<FavNoteController>(
|
||||
tag: _tabController.index == 0 ? 'false' : 'true');
|
||||
if (favNoteController.enableMultiSelect.value) {
|
||||
favNoteController.onDisable();
|
||||
} else {
|
||||
if (favNoteController.loadingState.value is Success &&
|
||||
((favNoteController.loadingState.value as Success)
|
||||
.response as List?)
|
||||
?.isNotEmpty ==
|
||||
true) {
|
||||
favNoteController.enableMultiSelect.value = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
child: const Text('管理'),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
|
||||
Reference in New Issue
Block a user