opt: more linter (#1765)

* opt: more linter

* fix [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2025-12-07 23:46:42 +08:00
committed by GitHub
parent 3787f99d35
commit 773bdafec3
22 changed files with 55 additions and 49 deletions

View File

@@ -62,9 +62,9 @@ class _FavNotePageState extends State<FavNotePage>
const TextStyle(fontSize: 14),
labelColor: theme.colorScheme.onSecondaryContainer,
unselectedLabelColor: theme.colorScheme.outline,
tabs: [
const Tab(text: '未发布笔记'),
const Tab(text: '公开笔记'),
tabs: const [
Tab(text: '未发布笔记'),
Tab(text: '公开笔记'),
],
onTap: (index) {
try {
@@ -105,9 +105,9 @@ class _FavNotePageState extends State<FavNotePage>
child: TabBarView(
controller: _tabController,
physics: const NeverScrollableScrollPhysics(),
children: [
const FavNoteChildPage(isPublish: false),
const FavNoteChildPage(isPublish: true),
children: const [
FavNoteChildPage(isPublish: false),
FavNoteChildPage(isPublish: true),
],
),
),

View File

@@ -216,7 +216,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
itemCount: newTags.length,
),
),
response != null && response.isNotEmpty == true
response != null && response.isNotEmpty
? SliverGrid.builder(
gridDelegate: gridDelegate,
itemBuilder: (context, index) {

View File

@@ -290,9 +290,7 @@ class _MemberHomeState extends State<MemberHome>
child: Padding(
padding: const EdgeInsets.only(left: 10),
child: Icon(
visible == true
? Icons.visibility
: Icons.visibility_off,
visible ? Icons.visibility : Icons.visibility_off,
size: 17,
color: color,
),

View File

@@ -47,7 +47,7 @@ class VideoCardHMemberVideo extends StatelessWidget {
onSecondaryTap: Utils.isMobile ? null : onLongPress,
onTap:
onTap ??
() async {
() {
final isPgc = videoItem.isPgc == true;
final isPugv = videoItem.isPugv == true;
if ((isPgc || isPugv) && videoItem.uri?.isNotEmpty == true) {

View File

@@ -59,7 +59,7 @@ class _PopularSeriesPageState extends State<PopularSeriesPage> with GridMixin {
return gridSkeleton;
case Success<List<HotVideoItemModel>?>(:var response):
Widget sliver;
if (response != null && response.isNotEmpty == true) {
if (response != null && response.isNotEmpty) {
sliver = SliverGrid.builder(
gridDelegate: gridDelegate,
itemCount: response.length,

View File

@@ -115,7 +115,7 @@ SettingsModel getBanwordModel({
),
TextButton(
child: const Text('保存'),
onPressed: () async {
onPressed: () {
Get.back();
setState();
onChanged(RegExp(banWord, caseSensitive: false));

View File

@@ -21,9 +21,7 @@ class _RecommendSettingState extends State<RecommendSetting> {
final theme = Theme.of(context);
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: widget.showAppBar == false
? null
: AppBar(title: const Text('推荐流设置')),
appBar: widget.showAppBar ? AppBar(title: const Text('推荐流设置')) : null,
body: ListView(
padding: EdgeInsets.only(
left: showAppBar ? padding.left : 0,

View File

@@ -1719,7 +1719,7 @@ class VideoDetailController extends GetxController
}
// interactive video
if (isStein != true) {
if (!isStein) {
graphVersion = null;
}
steinEdgeInfo = null;

View File

@@ -581,7 +581,7 @@ class UgcIntroController extends CommonIntroController with ReloadMixin {
(e) =>
e.cid ==
(skipPart
? videoDetail.isPageReversed == true
? videoDetail.isPageReversed
? videoDetail.pages!.last.cid
: videoDetail.pages!.first.cid
: this.cid.value),
@@ -663,7 +663,7 @@ class UgcIntroController extends CommonIntroController with ReloadMixin {
(e) =>
e.cid ==
(skipPart
? videoDetail.isPageReversed == true
? videoDetail.isPageReversed
? videoDetail.pages!.last.cid
: videoDetail.pages!.first.cid
: this.cid.value),

View File

@@ -714,7 +714,7 @@ class ReplyItemGrpc extends StatelessWidget {
spanChildren.add(
WidgetSpan(
child: NetworkImgLayer(
src: emote.hasGifUrl() == true ? emote.gifUrl : emote.url,
src: emote.hasGifUrl() ? emote.gifUrl : emote.url,
type: ImageType.emote,
width: size,
height: size,

View File

@@ -15,7 +15,7 @@ class ReplySearchChildController
@override
List<SearchItem>? getDataList(SearchItemReply response) {
if (response.cursor.hasNext == false) {
if (!response.cursor.hasNext) {
isEnd = true;
}
return response.items;

View File

@@ -63,9 +63,9 @@ class _ReplySearchPageState extends State<ReplySearchPage> {
children: [
TabBar(
controller: _controller.tabController,
tabs: [
const Tab(text: '视频'),
const Tab(text: '专栏'),
tabs: const [
Tab(text: '视频'),
Tab(text: '专栏'),
],
onTap: (index) {
if (!_controller.tabController.indexIsChanging) {

View File

@@ -64,7 +64,7 @@ class WebDav {
Future<void> backup() async {
if (_client == null) {
final res = await init();
if (res.first == false) {
if (!res.first) {
SmartDialog.showToast('备份失败,请检查配置: ${res.second}');
return;
}
@@ -86,7 +86,7 @@ class WebDav {
Future<void> restore() async {
if (_client == null) {
final res = await init();
if (res.first == false) {
if (!res.first) {
SmartDialog.showToast('恢复失败,请检查配置: ${res.second}');
return;
}

View File

@@ -31,7 +31,7 @@ class WhisperSecController
@override
List<Session>? getDataList(SessionSecondaryReply response) {
if (response.paginationParams.hasMore == false) {
if (!response.paginationParams.hasMore) {
isEnd = true;
}
offset = response.paginationParams.offsets;