mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
mod: lint
mod: tweaks opt: publish page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -27,7 +27,7 @@ class FavArticleController extends CommonListController {
|
||||
Future<LoadingState> customGetData() =>
|
||||
UserHttp.favArticle(page: currentPage);
|
||||
|
||||
void onRemove(index, id) async {
|
||||
Future<void> onRemove(index, id) async {
|
||||
final res = await UserHttp.communityAction(opusId: id, action: 4);
|
||||
if (res['status']) {
|
||||
List list = (loadingState.value as Success).response;
|
||||
|
||||
@@ -50,7 +50,7 @@ class _FavNoteChildPageState extends State<FavNoteChildPage>
|
||||
child: Obx(
|
||||
() => AnimatedSlide(
|
||||
offset: _favNoteController.enableMultiSelect.value
|
||||
? Offset(0, -1)
|
||||
? const Offset(0, -1)
|
||||
: Offset.zero,
|
||||
duration: const Duration(milliseconds: 150),
|
||||
child: Container(
|
||||
@@ -91,20 +91,19 @@ class _FavNoteChildPageState extends State<FavNoteChildPage>
|
||||
_favNoteController.handleSelect(
|
||||
!_favNoteController.allSelected.value);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 14,
|
||||
bottom: 14,
|
||||
right: 12,
|
||||
),
|
||||
child: const Text('全选'),
|
||||
child: Text('全选'),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
FilledButton.tonal(
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity:
|
||||
VisualDensity(horizontal: -2, vertical: -2),
|
||||
visualDensity: VisualDensity.compact,
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
onPressed: () {
|
||||
|
||||
@@ -17,7 +17,7 @@ class FavNoteController
|
||||
}
|
||||
|
||||
@override
|
||||
onSelect(int index, [bool disableSelect = true]) {
|
||||
void onSelect(int index, [bool disableSelect = true]) {
|
||||
super.onSelect(index, false);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class FavNoteController
|
||||
: VideoHttp.noteList(page: currentPage);
|
||||
}
|
||||
|
||||
void onRemove() async {
|
||||
Future<void> onRemove() async {
|
||||
List<FavArticleModel> dataList = (loadingState.value as Success).response;
|
||||
Set<FavArticleModel> removeList =
|
||||
dataList.where((item) => item.checked == true).toSet();
|
||||
|
||||
@@ -45,7 +45,7 @@ class _FavNotePageState extends State<FavNotePage>
|
||||
const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
||||
indicator: BoxDecoration(
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelStyle: TabBarTheme.of(context)
|
||||
@@ -55,15 +55,15 @@ class _FavNotePageState extends State<FavNotePage>
|
||||
labelColor: theme.colorScheme.onSecondaryContainer,
|
||||
unselectedLabelColor: theme.colorScheme.outline,
|
||||
tabs: [
|
||||
Tab(text: '未发布笔记'),
|
||||
Tab(text: '公开笔记'),
|
||||
const Tab(text: '未发布笔记'),
|
||||
const Tab(text: '公开笔记'),
|
||||
],
|
||||
),
|
||||
),
|
||||
// TextButton(
|
||||
// style: TextButton.styleFrom(
|
||||
// foregroundColor: theme.colorScheme.onSurfaceVariant,
|
||||
// visualDensity: VisualDensity(horizontal: -2, vertical: -2),
|
||||
// visualDensity: const VisualDensity(horizontal: -2, vertical: -2),
|
||||
// tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
// ),
|
||||
// onPressed: () async {
|
||||
@@ -91,8 +91,8 @@ class _FavNotePageState extends State<FavNotePage>
|
||||
controller: _tabController,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
FavNoteChildPage(isPublish: false),
|
||||
FavNoteChildPage(isPublish: true),
|
||||
const FavNoteChildPage(isPublish: false),
|
||||
const FavNoteChildPage(isPublish: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -60,7 +60,7 @@ class FavNoteItem extends StatelessWidget {
|
||||
item.title ?? '',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
height: 1.4,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -57,7 +57,7 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
||||
child: Obx(
|
||||
() => AnimatedSlide(
|
||||
offset: _favPgcController.enableMultiSelect.value
|
||||
? Offset(0, -1)
|
||||
? const Offset(0, -1)
|
||||
: Offset.zero,
|
||||
duration: const Duration(milliseconds: 150),
|
||||
child: Container(
|
||||
@@ -98,13 +98,13 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
||||
_favPgcController.handleSelect(
|
||||
!_favPgcController.allSelected.value);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 14,
|
||||
bottom: 14,
|
||||
right: 12,
|
||||
),
|
||||
child: const Text('全选'),
|
||||
child: Text('全选'),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
|
||||
@@ -22,7 +22,7 @@ class FavPgcController
|
||||
}
|
||||
|
||||
@override
|
||||
onSelect(int index, [bool disableSelect = true]) {
|
||||
void onSelect(int index, [bool disableSelect = true]) {
|
||||
super.onSelect(index, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class _FavPgcPageState extends State<FavPgcPage>
|
||||
const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
||||
indicator: BoxDecoration(
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelStyle: TabBarTheme.of(context)
|
||||
@@ -66,7 +66,8 @@ class _FavPgcPageState extends State<FavPgcPage>
|
||||
// TextButton(
|
||||
// style: TextButton.styleFrom(
|
||||
// foregroundColor: theme.colorScheme.onSurfaceVariant,
|
||||
// visualDensity: VisualDensity(horizontal: -2, vertical: -2),
|
||||
// visualDensity:
|
||||
// const VisualDensity(horizontal: -2, vertical: -2),
|
||||
// tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
// ),
|
||||
// onPressed: () {},
|
||||
|
||||
@@ -89,7 +89,8 @@ class FavPgcItem extends StatelessWidget {
|
||||
width: constraints.maxHeight *
|
||||
StyleString.aspectRatio,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(4)),
|
||||
color: Colors.black.withOpacity(0.6),
|
||||
),
|
||||
child: SizedBox(
|
||||
|
||||
@@ -55,8 +55,9 @@ class _FavPageState extends State<FavPage> with SingleTickerProviderStateMixin {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_tabController.removeListener(listener);
|
||||
_tabController.dispose();
|
||||
_tabController
|
||||
..removeListener(listener)
|
||||
..dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user