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

@@ -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: () {

View File

@@ -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();

View File

@@ -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),
],
),
),

View File

@@ -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,