diff --git a/analysis_options.yaml b/analysis_options.yaml index 4a70d7be5..861749662 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -12,7 +12,7 @@ include: package:flutter_lints/flutter.yaml analyzer: exclude: - lib/grpc/bilibili/** - - lib/grpc/google/** + # - lib/grpc/google/** # - lib/common/widgets/flutter/** formatter: diff --git a/lib/common/widgets/custom_tooltip.dart b/lib/common/widgets/custom_tooltip.dart index 8e0c19cd0..17dec22f0 100644 --- a/lib/common/widgets/custom_tooltip.dart +++ b/lib/common/widgets/custom_tooltip.dart @@ -121,7 +121,7 @@ class CustomTooltipState extends State final _CustomTooltipOverlay overlayChild = _CustomTooltipOverlay( verticalOffset: box.size.height / 2, - horizontslOffset: box.size.width / 2, + horizontalOffset: box.size.width / 2, type: widget.type, animation: _overlayAnimation, target: target, @@ -175,7 +175,7 @@ class CustomTooltipState extends State class _CustomTooltipOverlay extends StatelessWidget { const _CustomTooltipOverlay({ required this.verticalOffset, - required this.horizontslOffset, + required this.horizontalOffset, required this.type, required this.animation, required this.target, @@ -185,7 +185,7 @@ class _CustomTooltipOverlay extends StatelessWidget { }); final double verticalOffset; - final double horizontslOffset; + final double horizontalOffset; final TooltipType type; final Animation animation; final Offset target; @@ -200,7 +200,7 @@ class _CustomTooltipOverlay extends StatelessWidget { type: type, target: target, verticalOffset: verticalOffset, - horizontslOffset: horizontslOffset, + horizontslOffset: horizontalOffset, preferBelow: false, ), children: [ diff --git a/lib/common/widgets/flutter/text_field/controller.dart b/lib/common/widgets/flutter/text_field/controller.dart index f743e3b51..34edad9c2 100644 --- a/lib/common/widgets/flutter/text_field/controller.dart +++ b/lib/common/widgets/flutter/text_field/controller.dart @@ -902,10 +902,10 @@ class RichTextEditingController extends TextEditingController { // emoji tap if (offset == range.start) { if (e.emote != null) { - final cloestOffset = textPainter.getClosestGlyphForOffset(localPos); - if (cloestOffset != null) { - final offsetRect = cloestOffset.graphemeClusterLayoutBounds; - final offsetRange = cloestOffset.graphemeClusterCodeUnitRange; + final closestOffset = textPainter.getClosestGlyphForOffset(localPos); + if (closestOffset != null) { + final offsetRect = closestOffset.graphemeClusterLayoutBounds; + final offsetRange = closestOffset.graphemeClusterCodeUnitRange; if (lastTapDownPosition.dx > offsetRect.right) { return offsetRange.end; } else { diff --git a/lib/http/init.dart b/lib/http/init.dart index 85f43bb99..f700af408 100644 --- a/lib/http/init.dart +++ b/lib/http/init.dart @@ -22,7 +22,7 @@ import 'package:flutter/foundation.dart' show kDebugMode; class Request { static const _gzipDecoder = GZipDecoder(); - static const _brotilDecoder = BrotliDecoder(); + static const _brotliDecoder = BrotliDecoder(); static final Request _instance = Request._internal(); static late AccountManager accountManager; @@ -55,8 +55,8 @@ class Request { static Future buvidActive(Account account) async { // 这样线程不安全, 但仍按预期进行 - if (account.activited) return; - account.activited = true; + if (account.activated) return; + account.activated = true; try { // final html = await Request().get(Api.dynamicSpmPrefix, // options: Options(extra: {'account': account})); @@ -274,7 +274,7 @@ class Request { Map> headers, ) => switch (headers['content-encoding']?.firstOrNull) { 'gzip' => _gzipDecoder.decodeBytes(responseBytes), - 'br' => _brotilDecoder.convert(responseBytes), + 'br' => _brotliDecoder.convert(responseBytes), _ => responseBytes, }; diff --git a/lib/models/user/danmaku_rule.dart b/lib/models/user/danmaku_rule.dart index 6f0beb085..b09b1ff44 100644 --- a/lib/models/user/danmaku_rule.dart +++ b/lib/models/user/danmaku_rule.dart @@ -15,7 +15,7 @@ class RuleFilter { count ?? dmFilterString.length + dmRegExp.length + dmUid.length; } - RuleFilter.fromRuleTypeEntires(List> rules) { + RuleFilter.fromRuleTypeEntries(List> rules) { dmFilterString = rules[0].map((e) => e.filter).toList(); dmRegExp = rules[1] diff --git a/lib/models_new/download/download_info.dart b/lib/models_new/download/download_info.dart index d7a497fac..a6185cd79 100644 --- a/lib/models_new/download/download_info.dart +++ b/lib/models_new/download/download_info.dart @@ -9,7 +9,7 @@ class DownloadPageInfo with MultiSelectData { String cover; int sortKey; final int? seasonType; - final List entrys; + final List entries; DownloadPageInfo({ required this.pageId, @@ -18,6 +18,6 @@ class DownloadPageInfo with MultiSelectData { required this.cover, required this.sortKey, this.seasonType, - required this.entrys, + required this.entries, }); } diff --git a/lib/pages/about/view.dart b/lib/pages/about/view.dart index 1ddce877a..8d0c46752 100644 --- a/lib/pages/about/view.dart +++ b/lib/pages/about/view.dart @@ -239,7 +239,7 @@ Commit Hash: ${BuildConfig.commitHash}''', ListTile( title: const Text('导入/导出登录信息'), leading: const Icon(Icons.import_export_outlined), - onTap: () => showInportExportDialog( + onTap: () => showImportExportDialog( context, title: '登录信息', toJson: () => Utils.jsonEncoder.convert(Accounts.account.toMap()), @@ -261,7 +261,7 @@ Commit Hash: ${BuildConfig.commitHash}''', title: const Text('导入/导出设置'), dense: false, leading: const Icon(Icons.import_export_outlined), - onTap: () => showInportExportDialog( + onTap: () => showImportExportDialog( context, title: '设置', label: GStorage.setting.name, @@ -319,7 +319,7 @@ Commit Hash: ${BuildConfig.commitHash}''', } } -Future showInportExportDialog( +Future showImportExportDialog( BuildContext context, { required String title, String? label, diff --git a/lib/pages/article/view.dart b/lib/pages/article/view.dart index 94bbb2019..14c80cbc8 100644 --- a/lib/pages/article/view.dart +++ b/lib/pages/article/view.dart @@ -511,14 +511,14 @@ class _ArticlePageState extends CommonDynPageState { required String text, required DynamicStat? stat, required VoidCallback onPressed, - IconData? activitedIcon, + IconData? activatedIcon, }) { final status = stat?.status == true; final color = status ? primary : outline; return TextButton.icon( onPressed: onPressed, icon: Icon( - status ? activitedIcon : icon, + status ? activatedIcon : icon, size: 16, color: color, ), @@ -625,7 +625,7 @@ class _ArticlePageState extends CommonDynPageState { Expanded( child: textIconButton( icon: FontAwesomeIcons.star, - activitedIcon: FontAwesomeIcons.solidStar, + activatedIcon: FontAwesomeIcons.solidStar, text: '收藏', stat: stats.favorite, onPressed: controller.onFav, @@ -634,7 +634,7 @@ class _ArticlePageState extends CommonDynPageState { Expanded( child: textIconButton( icon: FontAwesomeIcons.thumbsUp, - activitedIcon: FontAwesomeIcons.solidThumbsUp, + activatedIcon: FontAwesomeIcons.solidThumbsUp, text: '点赞', stat: stats.like, onPressed: controller.onLike, diff --git a/lib/pages/common/common_intro_controller.dart b/lib/pages/common/common_intro_controller.dart index c24e14d99..7a3260a30 100644 --- a/lib/pages/common/common_intro_controller.dart +++ b/lib/pages/common/common_intro_controller.dart @@ -92,7 +92,7 @@ abstract class CommonIntroController extends GetxController } } - void canelTimer() { + void cancelTimer() { timer?.cancel(); timer = null; } @@ -114,7 +114,7 @@ abstract class CommonIntroController extends GetxController @override void onClose() { - canelTimer(); + cancelTimer(); super.onClose(); } diff --git a/lib/pages/danmaku/dnamaku_model.dart b/lib/pages/danmaku/danmaku_model.dart similarity index 100% rename from lib/pages/danmaku/dnamaku_model.dart rename to lib/pages/danmaku/danmaku_model.dart diff --git a/lib/pages/danmaku/view.dart b/lib/pages/danmaku/view.dart index 171d40d68..57e453a58 100644 --- a/lib/pages/danmaku/view.dart +++ b/lib/pages/danmaku/view.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:PiliPlus/grpc/bilibili/community/service/dm/v1.pb.dart'; import 'package:PiliPlus/pages/danmaku/controller.dart'; -import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart'; +import 'package:PiliPlus/pages/danmaku/danmaku_model.dart'; import 'package:PiliPlus/plugin/pl_player/controller.dart'; import 'package:PiliPlus/plugin/pl_player/models/play_status.dart'; import 'package:PiliPlus/utils/danmaku_utils.dart'; diff --git a/lib/pages/danmaku_block/view.dart b/lib/pages/danmaku_block/view.dart index b9fe14473..da5e6a0d0 100644 --- a/lib/pages/danmaku_block/view.dart +++ b/lib/pages/danmaku_block/view.dart @@ -34,7 +34,7 @@ class _DanmakuBlockPageState extends State { @override void dispose() { - final ruleFilter = RuleFilter.fromRuleTypeEntires(_controller.rules); + final ruleFilter = RuleFilter.fromRuleTypeEntries(_controller.rules); plPlayerController.filters = ruleFilter; GStorage.localCache.put(LocalCacheKey.danmakuFilterRules, ruleFilter); super.dispose(); diff --git a/lib/pages/download/controller.dart b/lib/pages/download/controller.dart index bce178f5e..ae8bf0265 100644 --- a/lib/pages/download/controller.dart +++ b/lib/pages/download/controller.dart @@ -52,7 +52,7 @@ class DownloadPageController extends GetxController ..cover = entry.cover ..sortKey = aSortKey; } - page.entrys.add(entry); + page.entries.add(entry); } else { list.add( DownloadPageInfo( @@ -62,7 +62,7 @@ class DownloadPageController extends GetxController cover: entry.cover, sortKey: entry.sortKey, seasonType: entry.ep?.seasonType, - entrys: [entry], + entries: [entry], ), ); } @@ -82,7 +82,7 @@ class DownloadPageController extends GetxController final watchProgress = GStorage.watchProgress; for (var page in allChecked) { await watchProgress.deleteAll( - page.entrys.map((e) => e.cid.toString()), + page.entries.map((e) => e.cid.toString()), ); await _downloadService.deletePage( pageDirPath: page.dirPath, diff --git a/lib/pages/download/detail/view.dart b/lib/pages/download/detail/view.dart index bb487fa4c..d0e1cec29 100644 --- a/lib/pages/download/detail/view.dart +++ b/lib/pages/download/detail/view.dart @@ -70,7 +70,7 @@ class _DownloadDetailPageState extends State final list = _controller.pages .firstWhereOrNull((e) => e.pageId == widget.pageId) - ?.entrys + ?.entries ?..sort((a, b) => a.sortKey.compareTo(b.sortKey)); if (list != null) { _downloadItems.value = list; diff --git a/lib/pages/download/view.dart b/lib/pages/download/view.dart index 0aeb176f5..2df5d58b9 100644 --- a/lib/pages/download/view.dart +++ b/lib/pages/download/view.dart @@ -68,7 +68,7 @@ class _DownloadPageState extends State { _controller.handleSelect(); final list = []; for (var page in allChecked) { - list.addAll(page.entrys); + list.addAll(page.entries); } final res = await Future.wait( list.map( @@ -181,8 +181,8 @@ class _DownloadPageState extends State { ), itemBuilder: (context, index) { final item = _controller.pages[index]; - if (item.entrys.length == 1) { - final entry = item.entrys.first; + if (item.entries.length == 1) { + final entry = item.entries.first; return DetailItem( entry: entry, progress: _progress, @@ -249,7 +249,7 @@ class _DownloadPageState extends State { title: '确定删除?', onConfirm: () async { await GStorage.watchProgress.deleteAll( - pageInfo.entrys.map((e) => e.cid.toString()), + pageInfo.entries.map((e) => e.cid.toString()), ); _downloadService.deletePage( pageDirPath: pageInfo.dirPath, @@ -267,7 +267,7 @@ class _DownloadPageState extends State { onTap: () async { Get.back(); final res = await Future.wait( - pageInfo.entrys.map( + pageInfo.entries.map( (e) => _downloadService.downloadDanmaku( entry: e, isUpdate: true, @@ -291,7 +291,7 @@ class _DownloadPageState extends State { ); }, ); - final first = pageInfo.entrys.first; + final first = pageInfo.entries.first; return Material( type: MaterialType.transparency, child: InkWell( @@ -332,7 +332,7 @@ class _DownloadPageState extends State { ), ), PBadge( - text: '${pageInfo.entrys.length}个视频', + text: '${pageInfo.entries.length}个视频', right: 6.0, bottom: 6.0, isBold: false, @@ -391,7 +391,7 @@ class _DownloadPageState extends State { ) else const Spacer(), - pageInfo.entrys.first.moreBtn(theme), + pageInfo.entries.first.moreBtn(theme), ], ), ], diff --git a/lib/pages/dynamics/widgets/vote.dart b/lib/pages/dynamics/widgets/vote.dart index b41148b05..491964497 100644 --- a/lib/pages/dynamics/widgets/vote.dart +++ b/lib/pages/dynamics/widgets/vote.dart @@ -93,7 +93,7 @@ class _VotePanelState extends State { ), ), if (_enabled) ...[ - _checkBoxs, + _checkBoxes, Padding( padding: const EdgeInsets.only(top: 8), child: Obx( @@ -182,7 +182,7 @@ class _VotePanelState extends State { return child; } - Widget get _checkBoxs => Row( + Widget get _checkBoxes => Row( spacing: 16, children: [ CheckBoxText( diff --git a/lib/pages/dynamics_detail/view.dart b/lib/pages/dynamics_detail/view.dart index 1636e60d5..0057b5af7 100644 --- a/lib/pages/dynamics_detail/view.dart +++ b/lib/pages/dynamics_detail/view.dart @@ -219,14 +219,14 @@ class _DynamicDetailPageState extends CommonDynPageState { required String text, required DynamicStat? stat, required VoidCallback onPressed, - IconData? activitedIcon, + IconData? activatedIcon, }) { final status = stat?.status == true; final color = status ? primary : outline; return TextButton.icon( onPressed: onPressed, icon: Icon( - status ? activitedIcon : icon, + status ? activatedIcon : icon, size: 16, color: color, ), @@ -309,7 +309,7 @@ class _DynamicDetailPageState extends CommonDynPageState { builder: (context) { return textIconButton( icon: FontAwesomeIcons.thumbsUp, - activitedIcon: FontAwesomeIcons.solidThumbsUp, + activatedIcon: FontAwesomeIcons.solidThumbsUp, text: '点赞', stat: moduleStat?.like, onPressed: () => RequestUtils.onLikeDynamic( diff --git a/lib/pages/dynamics_repost/view.dart b/lib/pages/dynamics_repost/view.dart index 347531baf..2c05275ee 100644 --- a/lib/pages/dynamics_repost/view.dart +++ b/lib/pages/dynamics_repost/view.dart @@ -110,7 +110,7 @@ class _RepostPanelState extends CommonRichTextPubPageState { buildPanelContainer(theme, Colors.transparent), ] else ...[ ..._buildEditPanel(theme), - ..._biuldDismiss(theme), + ..._buildDismiss(theme), ], ], ); @@ -347,7 +347,7 @@ class _RepostPanelState extends CommonRichTextPubPageState { ), ); - List _biuldDismiss(ThemeData theme) => [ + List _buildDismiss(ThemeData theme) => [ const SizedBox(height: 10), Divider( height: 1, diff --git a/lib/pages/episode_panel/view.dart b/lib/pages/episode_panel/view.dart index 415c202ed..08e3c6210 100644 --- a/lib/pages/episode_panel/view.dart +++ b/lib/pages/episode_panel/view.dart @@ -195,7 +195,7 @@ class _EpisodePanelState extends State Widget buildPage(ThemeData theme) { final isMulti = widget.type == EpisodeType.season && widget.list.length > 1; - Widget tabbar() => TabBar( + Widget tabBar() => TabBar( controller: _tabController, padding: const EdgeInsets.only(right: 60), isScrollable: true, @@ -213,7 +213,7 @@ class _EpisodePanelState extends State mainAxisSize: MainAxisSize.min, children: [ _buildToolbar(theme), - tabbar(), + tabBar(), ], ), children: List.generate( @@ -234,7 +234,7 @@ class _EpisodePanelState extends State children: [ _buildToolbar(theme), if (isMulti) ...[ - tabbar(), + tabBar(), Expanded( child: tabBarView( controller: _tabController, diff --git a/lib/pages/live_area_detail/controller.dart b/lib/pages/live_area_detail/controller.dart index c86a38203..0585eeb28 100644 --- a/lib/pages/live_area_detail/controller.dart +++ b/lib/pages/live_area_detail/controller.dart @@ -5,9 +5,9 @@ import 'package:PiliPlus/http/loading_state.dart'; import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart'; import 'package:PiliPlus/pages/common/common_list_controller.dart'; -class LiveAreaDatailController +class LiveAreaDetailController extends CommonListController?, AreaItem> { - LiveAreaDatailController(this.areaId, this.parentAreaId); + LiveAreaDetailController(this.areaId, this.parentAreaId); final dynamic areaId; final dynamic parentAreaId; diff --git a/lib/pages/live_area_detail/view.dart b/lib/pages/live_area_detail/view.dart index f3c30df0a..adcdd61a3 100644 --- a/lib/pages/live_area_detail/view.dart +++ b/lib/pages/live_area_detail/view.dart @@ -29,7 +29,7 @@ class LiveAreaDetailPage extends StatefulWidget { class _LiveAreaDetailPageState extends State { late final _controller = Get.put( - LiveAreaDatailController(widget.areaId?.toString(), widget.parentAreaId), + LiveAreaDetailController(widget.areaId?.toString(), widget.parentAreaId), ); @override diff --git a/lib/pages/live_room/controller.dart b/lib/pages/live_room/controller.dart index f00b04599..c1df7807c 100644 --- a/lib/pages/live_room/controller.dart +++ b/lib/pages/live_room/controller.dart @@ -12,7 +12,7 @@ import 'package:PiliPlus/models_new/live/live_dm_info/data.dart'; import 'package:PiliPlus/models_new/live/live_room_info_h5/data.dart'; import 'package:PiliPlus/models_new/live/live_room_play_info/codec.dart'; import 'package:PiliPlus/models_new/live/live_superchat/item.dart'; -import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart'; +import 'package:PiliPlus/pages/danmaku/danmaku_model.dart'; import 'package:PiliPlus/pages/live_room/send_danmaku/view.dart'; import 'package:PiliPlus/pages/video/widgets/header_control.dart'; import 'package:PiliPlus/plugin/pl_player/controller.dart'; diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index 5b84ac888..b0310754b 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -10,7 +10,7 @@ import 'package:PiliPlus/common/widgets/scroll_physics.dart'; import 'package:PiliPlus/models/common/image_type.dart'; import 'package:PiliPlus/models_new/live/live_room_info_h5/data.dart'; import 'package:PiliPlus/models_new/live/live_superchat/item.dart'; -import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart'; +import 'package:PiliPlus/pages/danmaku/danmaku_model.dart'; import 'package:PiliPlus/pages/live_room/controller.dart'; import 'package:PiliPlus/pages/live_room/superchat/superchat_card.dart'; import 'package:PiliPlus/pages/live_room/superchat/superchat_panel.dart'; @@ -657,8 +657,8 @@ class _LiveRoomPageState extends State Widget _buildBodyH(bool isFullScreen) { double videoWidth = clampDouble(maxHeight / maxWidth * 1.08, 0.56, 0.7) * maxWidth; - final rigthWidth = min(400.0, maxWidth - videoWidth - padding.horizontal); - videoWidth = maxWidth - rigthWidth - padding.horizontal; + final rightWidth = min(400.0, maxWidth - videoWidth - padding.horizontal); + videoWidth = maxWidth - rightWidth - padding.horizontal; final videoHeight = maxHeight - padding.top; final width = isFullScreen ? maxWidth : videoWidth; final height = isFullScreen ? maxHeight - padding.top : videoHeight; @@ -682,7 +682,7 @@ class _LiveRoomPageState extends State Offstage( offstage: isFullScreen, child: SizedBox( - width: rigthWidth, + width: rightWidth, height: videoHeight, child: _buildBottomWidget, ), diff --git a/lib/pages/login_devices/view.dart b/lib/pages/login_devices/view.dart index 81e786a83..17d690408 100644 --- a/lib/pages/login_devices/view.dart +++ b/lib/pages/login_devices/view.dart @@ -12,10 +12,10 @@ class LoginDevicesPage extends StatefulWidget { const LoginDevicesPage({super.key}); @override - State createState() => LloginDevicesPageState(); + State createState() => LoginDevicesPageState(); } -class LloginDevicesPageState extends State { +class LoginDevicesPageState extends State { final _controller = Get.put(LoginDevicesController()); @override diff --git a/lib/pages/member_upower_rank/view.dart b/lib/pages/member_upower_rank/view.dart index 70cb11743..d237f1b4e 100644 --- a/lib/pages/member_upower_rank/view.dart +++ b/lib/pages/member_upower_rank/view.dart @@ -58,7 +58,7 @@ class _UpowerRankPageState extends State SliverPadding( padding: EdgeInsets.only(bottom: padding.bottom + 100), sliver: Obx( - () => _bilidBody(theme, _controller.loadingState.value), + () => _buildBody(theme, _controller.loadingState.value), ), ), ], @@ -169,7 +169,7 @@ class _UpowerRankPageState extends State } } - Widget _bilidBody( + Widget _buildBody( ThemeData theme, LoadingState?> loadingState, ) { diff --git a/lib/pages/mine/controller.dart b/lib/pages/mine/controller.dart index 7f1721ff2..00f51b227 100644 --- a/lib/pages/mine/controller.dart +++ b/lib/pages/mine/controller.dart @@ -23,7 +23,7 @@ class MineController extends CommonDataController { AccountService accountService = Get.find(); - int? favFoldercount; + int? favFolderCount; // 用户信息 头像、昵称、lv Rx userInfo = UserInfoData().obs; @@ -135,7 +135,7 @@ class MineController @override bool customHandleResponse(bool isRefresh, Success response) { - favFoldercount = response.response.count; + favFolderCount = response.response.count; loadingState.value = response; return true; } diff --git a/lib/pages/mine/view.dart b/lib/pages/mine/view.dart index 72a95e979..f7f989222 100644 --- a/lib/pages/mine/view.dart +++ b/lib/pages/mine/view.dart @@ -224,7 +224,7 @@ class _MediaPageState extends CommonPageState fontSize: theme.textTheme.titleMedium!.fontSize, fontWeight: FontWeight.bold, ); - final lebelStyle = theme.textTheme.labelMedium!.copyWith( + final labelStyle = theme.textTheme.labelMedium!.copyWith( color: theme.colorScheme.outline, ); final coinLabelStyle = TextStyle( @@ -378,21 +378,21 @@ class _MediaPageState extends CommonPageState count: userStat.dynamicCount, countStyle: style, name: '动态', - lebelStyle: lebelStyle, + labelStyle: labelStyle, onTap: () => controller.push('memberDynamics'), ), _btn( count: userStat.following, countStyle: style, name: '关注', - lebelStyle: lebelStyle, + labelStyle: labelStyle, onTap: () => controller.push('follow'), ), _btn( count: userStat.follower, countStyle: style, name: '粉丝', - lebelStyle: lebelStyle, + labelStyle: labelStyle, onTap: () => controller.push('fan'), ), ], @@ -406,7 +406,7 @@ class _MediaPageState extends CommonPageState required int? count, required TextStyle countStyle, required String name, - required TextStyle? lebelStyle, + required TextStyle? labelStyle, required VoidCallback onTap, }) { return Flexible( @@ -428,7 +428,7 @@ class _MediaPageState extends CommonPageState const SizedBox(height: 4), Text( name, - style: lebelStyle, + style: labelStyle, ), ], ), @@ -465,9 +465,9 @@ class _MediaPageState extends CommonPageState fontWeight: FontWeight.bold, ), ), - if (controller.favFoldercount != null) + if (controller.favFolderCount != null) TextSpan( - text: "${controller.favFoldercount} ", + text: "${controller.favFolderCount} ", style: TextStyle( fontSize: theme.textTheme.titleSmall!.fontSize, color: secondary, @@ -508,7 +508,7 @@ class _MediaPageState extends CommonPageState if (favFolderList == null || favFolderList.isEmpty) { return const SizedBox.shrink(); } - bool flag = (controller.favFoldercount ?? 0) > favFolderList.length; + bool flag = (controller.favFolderCount ?? 0) > favFolderList.length; return SizedBox( height: 200, child: ListView.separated( diff --git a/lib/pages/music/video/view.dart b/lib/pages/music/video/view.dart index 2646ea1d3..bf30da966 100644 --- a/lib/pages/music/video/view.dart +++ b/lib/pages/music/video/view.dart @@ -11,14 +11,14 @@ import 'package:PiliPlus/utils/grid.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; -class MusicRecommandPage extends StatefulWidget { - const MusicRecommandPage({super.key}); +class MusicRecommendPage extends StatefulWidget { + const MusicRecommendPage({super.key}); @override - State createState() => _MusicRecommandPageState(); + State createState() => _MusicRecommendPageState(); } -class _MusicRecommandPageState extends State +class _MusicRecommendPageState extends State with GridMixin { late final MusicRecommendController _controller = Get.putOrFind( MusicRecommendController.new, diff --git a/lib/pages/music/view.dart b/lib/pages/music/view.dart index d2d29f5e9..0a09c1e0a 100644 --- a/lib/pages/music/view.dart +++ b/lib/pages/music/view.dart @@ -208,13 +208,13 @@ class _MusicDetailPageState extends CommonDynPageState { int? count, bool status = false, required VoidCallback onPressed, - IconData? activitedIcon, + IconData? activatedIcon, }) { final color = status ? theme.colorScheme.primary : outline; return TextButton.icon( onPressed: onPressed, icon: Icon( - status ? activitedIcon : icon, + status ? activatedIcon : icon, size: 16, color: color, ), @@ -298,7 +298,7 @@ class _MusicDetailPageState extends CommonDynPageState { child: Builder( builder: (context) => textIconButton( icon: FontAwesomeIcons.thumbsUp, - activitedIcon: FontAwesomeIcons.solidThumbsUp, + activatedIcon: FontAwesomeIcons.solidThumbsUp, text: '点赞', count: item.wishCount, status: item.wishListen ?? false, @@ -568,7 +568,7 @@ class _MusicDetailPageState extends CommonDynPageState { '使用稿件量', theme, () => Get.to( - const MusicRecommandPage(), + const MusicRecommendPage(), arguments: (id: controller.musicId, item: item), ), ), diff --git a/lib/pages/pgc_index/widgets/pgc_card_v_pgc_index.dart b/lib/pages/pgc_index/widgets/pgc_card_v_pgc_index.dart index a6ceec9b2..4fdd0d5d9 100644 --- a/lib/pages/pgc_index/widgets/pgc_card_v_pgc_index.dart +++ b/lib/pages/pgc_index/widgets/pgc_card_v_pgc_index.dart @@ -67,14 +67,14 @@ class PgcCardVPgcIndex extends StatelessWidget { }, ), ), - conetent(context), + content(context), ], ), ), ); } - Widget conetent(BuildContext context) { + Widget content(BuildContext context) { final theme = Theme.of(context); return Expanded( child: Padding( diff --git a/lib/pages/search/view.dart b/lib/pages/search/view.dart index 62baec836..aa41346eb 100644 --- a/lib/pages/search/view.dart +++ b/lib/pages/search/view.dart @@ -4,7 +4,7 @@ import 'package:PiliPlus/common/widgets/disabled_icon.dart'; import 'package:PiliPlus/common/widgets/loading_widget/loading_widget.dart'; import 'package:PiliPlus/http/loading_state.dart'; import 'package:PiliPlus/models_new/search/search_rcmd/data.dart'; -import 'package:PiliPlus/pages/about/view.dart' show showInportExportDialog; +import 'package:PiliPlus/pages/about/view.dart' show showImportExportDialog; import 'package:PiliPlus/pages/search/controller.dart'; import 'package:PiliPlus/pages/search/widgets/hot_keyword.dart'; import 'package:PiliPlus/pages/search/widgets/search_text.dart'; @@ -331,7 +331,7 @@ class _SearchPageState extends State { ); }, ), - _exportHsitory(theme), + _exportHistory(theme), const Spacer(), SizedBox( height: 34, @@ -381,7 +381,7 @@ class _SearchPageState extends State { ); } - Widget _exportHsitory(ThemeData theme) => SizedBox( + Widget _exportHistory(ThemeData theme) => SizedBox( width: 34, height: 34, child: IconButton( @@ -392,7 +392,7 @@ class _SearchPageState extends State { color: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.8), ), style: IconButton.styleFrom(padding: EdgeInsets.zero), - onPressed: () => showInportExportDialog( + onPressed: () => showImportExportDialog( context, title: '历史记录', toJson: () => jsonEncode(_searchController.historyList), diff --git a/lib/pages/setting/models/extra_settings.dart b/lib/pages/setting/models/extra_settings.dart index 6117e371b..9616f16d3 100644 --- a/lib/pages/setting/models/extra_settings.dart +++ b/lib/pages/setting/models/extra_settings.dart @@ -270,14 +270,14 @@ List get extraSettings => [ settingsType: SettingsType.sw1tch, title: '默认展开视频简介', leading: Icon(Icons.expand_more), - setKey: SettingBoxKey.alwaysExapndIntroPanel, + setKey: SettingBoxKey.alwaysExpandIntroPanel, defaultVal: false, ), const SettingsModel( settingsType: SettingsType.sw1tch, title: '横屏自动展开视频简介', leading: Icon(Icons.expand_more), - setKey: SettingBoxKey.exapndIntroPanelH, + setKey: SettingBoxKey.expandIntroPanelH, defaultVal: false, ), const SettingsModel( diff --git a/lib/pages/sponsor_block/view.dart b/lib/pages/sponsor_block/view.dart index 7b7404b3e..f5711cfe5 100644 --- a/lib/pages/sponsor_block/view.dart +++ b/lib/pages/sponsor_block/view.dart @@ -133,7 +133,7 @@ class _SponsorBlockPageState extends State { }, ); - Widget _aboudItem(TextStyle titleStyle, TextStyle subTitleStyle) => ListTile( + Widget _aboutItem(TextStyle titleStyle, TextStyle subTitleStyle) => ListTile( dense: true, title: Text('关于空降助手', style: titleStyle), subtitle: Text(_url, style: subTitleStyle), @@ -521,7 +521,7 @@ class _SponsorBlockPageState extends State { child: _blockServerItem(theme, titleStyle, subTitleStyle), ), dividerL, - SliverToBoxAdapter(child: _aboudItem(titleStyle, subTitleStyle)), + SliverToBoxAdapter(child: _aboutItem(titleStyle, subTitleStyle)), dividerL, SliverToBoxAdapter( child: SizedBox( diff --git a/lib/pages/video/controller.dart b/lib/pages/video/controller.dart index 5b8a67d7b..8b4571df2 100644 --- a/lib/pages/video/controller.dart +++ b/lib/pages/video/controller.dart @@ -224,7 +224,7 @@ class VideoDetailController extends GetxController this.videoHeight = minVideoHeight; animationController.forward(from: 1); } else if (currentHeight < minVideoHeightPrecise) { - // expande + // expand isExpanding = true; animationController.forward(from: currentHeight / minVideoHeight); this.videoHeight = minVideoHeight; @@ -1729,7 +1729,7 @@ class VideoDetailController extends GetxController late final Rx>?> dmTrend = Rx>?>(null); - late final RxBool showDmTreandChart = true.obs; + late final RxBool showDmTrendChart = true.obs; Future _getDmTrend() async { dmTrend.value = LoadingState>.loading(); diff --git a/lib/pages/video/download_panel/view.dart b/lib/pages/video/download_panel/view.dart index ce85c14da..63940a8e4 100644 --- a/lib/pages/video/download_panel/view.dart +++ b/lib/pages/video/download_panel/view.dart @@ -50,7 +50,7 @@ class DownloadPanel extends StatefulWidget { final VideoDetailController videoDetailController; final String heroTag; final UgcIntroController? ugcIntroController; - final Set cidSet; + final Set cidSet; @override State createState() => _DownloadPanelState(); @@ -226,7 +226,7 @@ class _DownloadPanelState extends State { if (cidSet.contains(cid)) { if (kDebugMode) { - SmartDialog.showToast('downloded'); + SmartDialog.showToast('downloaded'); } return false; } diff --git a/lib/pages/video/introduction/local/controller.dart b/lib/pages/video/introduction/local/controller.dart index c963cc8f5..7afff6d30 100644 --- a/lib/pages/video/introduction/local/controller.dart +++ b/lib/pages/video/introduction/local/controller.dart @@ -54,7 +54,7 @@ class LocalIntroController extends CommonIntroController { final controller = Get.find(); final list = []; for (final e in controller.pages) { - final items = e.entrys..sort((a, b) => a.sortKey.compareTo(b.sortKey)); + final items = e.entries..sort((a, b) => a.sortKey.compareTo(b.sortKey)); final completed = items.where((e) => e.isCompleted); list.addAllIf(completed.isNotEmpty, completed); if (completed.length == 1) { diff --git a/lib/pages/video/introduction/pgc/view.dart b/lib/pages/video/introduction/pgc/view.dart index f0bef6670..82cd30c70 100644 --- a/lib/pages/video/introduction/pgc/view.dart +++ b/lib/pages/video/introduction/pgc/view.dart @@ -91,12 +91,12 @@ class _PgcIntroPageState extends State { ), ); if (!introController.isPgc) { - final breif = _buildBreif(item); - if (breif != null) { + final brief = _buildBrief(item); + if (brief != null) { sliver = SliverMainAxisGroup( slivers: [ sliver, - breif, + brief, ], ); } @@ -109,7 +109,7 @@ class _PgcIntroPageState extends State { ); } - Widget? _buildBreif(PgcInfoModel item) { + Widget? _buildBrief(PgcInfoModel item) { final img = item.brief?.img; if (img != null && img.isNotEmpty) { final maxWidth = widget.maxWidth - 24; diff --git a/lib/pages/video/introduction/ugc/controller.dart b/lib/pages/video/introduction/ugc/controller.dart index 00e56334c..605b986e1 100644 --- a/lib/pages/video/introduction/ugc/controller.dart +++ b/lib/pages/video/introduction/ugc/controller.dart @@ -68,11 +68,11 @@ class UgcIntroController extends CommonIntroController with ReloadMixin { @override void onInit() { super.onInit(); - bool alwaysExapndIntroPanel = Pref.alwaysExapndIntroPanel; + bool alwaysExpandIntroPanel = Pref.alwaysExpandIntroPanel; expandableCtr = ExpandableController( - initialExpanded: alwaysExapndIntroPanel, + initialExpanded: alwaysExpandIntroPanel, ); - if (!alwaysExapndIntroPanel && Pref.exapndIntroPanelH) { + if (!alwaysExpandIntroPanel && Pref.expandIntroPanelH) { WidgetsBinding.instance.addPostFrameCallback((_) { if (!expandableCtr.expanded && Get.context!.isLandscape) { expandableCtr.toggle(); diff --git a/lib/pages/video/introduction/ugc/widgets/page.dart b/lib/pages/video/introduction/ugc/widgets/page.dart index a77136103..26e297912 100644 --- a/lib/pages/video/introduction/ugc/widgets/page.dart +++ b/lib/pages/video/introduction/ugc/widgets/page.dart @@ -31,7 +31,7 @@ class PagesPanel extends StatefulWidget { final Function? showEpisodes; final UgcIntroController ugcIntroController; - final Set? cidSet; + final Set? cidSet; final bool Function(Part part)? onDownload; @override diff --git a/lib/pages/video/send_danmaku/view.dart b/lib/pages/video/send_danmaku/view.dart index 9e3a9a26d..32212cf7e 100644 --- a/lib/pages/video/send_danmaku/view.dart +++ b/lib/pages/video/send_danmaku/view.dart @@ -7,7 +7,7 @@ import 'package:PiliPlus/http/loading_state.dart'; import 'package:PiliPlus/main.dart'; import 'package:PiliPlus/models/common/publish_panel_type.dart'; import 'package:PiliPlus/pages/common/publish/common_text_pub_page.dart'; -import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart'; +import 'package:PiliPlus/pages/danmaku/danmaku_model.dart'; import 'package:PiliPlus/pages/setting/slide_color_picker.dart'; import 'package:PiliPlus/plugin/pl_player/controller.dart'; import 'package:PiliPlus/utils/storage_pref.dart'; diff --git a/lib/pages/video/view.dart b/lib/pages/video/view.dart index 7aaafbd74..b7c2e1794 100644 --- a/lib/pages/video/view.dart +++ b/lib/pages/video/view.dart @@ -198,7 +198,7 @@ class _VideoDetailPageVState extends State } } } else if (state == AppLifecycleState.paused) { - introController.canelTimer(); + introController.cancelTimer(); ctr.showDanmaku = false; } } @@ -231,7 +231,7 @@ class _VideoDetailPageVState extends State } } } catch (e) { - if (kDebugMode) debugPrint('handle playe status: $e'); + if (kDebugMode) debugPrint('handle player status: $e'); } if (status == PlayerStatus.completed) { @@ -343,10 +343,10 @@ class _VideoDetailPageVState extends State if (!videoDetailController.isFileSource) { if (videoDetailController.isUgc) { ugcIntroController - ..canelTimer() + ..cancelTimer() ..videoDetail.close(); } else { - pgcIntroController.canelTimer(); + pgcIntroController.cancelTimer(); } } if (!videoDetailController.horizontalScreen) { @@ -386,7 +386,7 @@ class _VideoDetailPageVState extends State videoDetailController.positionSubscription?.cancel(); - introController.canelTimer(); + introController.cancelTimer(); videoDetailController ..playerStatus = plPlayerController?.playerStatus.value @@ -857,7 +857,7 @@ class _VideoDetailPageVState extends State backgroundColor: Colors.transparent, body: Column( children: [ - buildTabbar(onTap: videoDetailController.animToTop), + buildTabBar(onTap: videoDetailController.animToTop), Expanded( child: videoTabBarView( controller: videoDetailController.tabCtr, @@ -926,7 +926,7 @@ class _VideoDetailPageVState extends State body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - buildTabbar(), + buildTabBar(), Expanded( child: videoTabBarView( controller: videoDetailController.tabCtr, @@ -994,7 +994,7 @@ class _VideoDetailPageVState extends State backgroundColor: Colors.transparent, body: Column( children: [ - buildTabbar(showIntro: false), + buildTabBar(showIntro: false), Expanded( child: videoTabBarView( controller: videoDetailController.tabCtr, @@ -1069,7 +1069,7 @@ class _VideoDetailPageVState extends State body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - buildTabbar( + buildTabBar( introText: '相关视频', showIntro: videoDetailController.isFileSource ? true @@ -1161,7 +1161,7 @@ class _VideoDetailPageVState extends State body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - buildTabbar(needIndicator: false), + buildTabBar(needIndicator: false), Expanded( child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -1419,7 +1419,7 @@ class _VideoDetailPageVState extends State : child; } - Widget buildTabbar({ + Widget buildTabBar({ bool needIndicator = true, String? introText, bool showIntro = true, @@ -1443,7 +1443,7 @@ class _VideoDetailPageVState extends State } final flag = !needIndicator || tabs.length == 1; - Widget tabbar() => TabBar( + Widget tabBar() => TabBar( labelColor: flag ? themeData.colorScheme.onSurface : null, indicator: flag ? const BoxDecoration() : null, padding: EdgeInsets.zero, @@ -1507,7 +1507,7 @@ class _VideoDetailPageVState extends State else Flexible( flex: tabs.length == 3 ? 2 : 1, - child: tabbar(), + child: tabBar(), ), Flexible( flex: 1, diff --git a/lib/pages/video/widgets/header_control.dart b/lib/pages/video/widgets/header_control.dart index 6d68dba6c..5d2efb165 100644 --- a/lib/pages/video/widgets/header_control.dart +++ b/lib/pages/video/widgets/header_control.dart @@ -23,7 +23,7 @@ import 'package:PiliPlus/models/common/video/video_quality.dart'; import 'package:PiliPlus/models/video/play/url.dart'; import 'package:PiliPlus/models_new/video/video_play_info/subtitle.dart'; import 'package:PiliPlus/pages/common/common_intro_controller.dart'; -import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart'; +import 'package:PiliPlus/pages/danmaku/danmaku_model.dart'; import 'package:PiliPlus/pages/setting/widgets/select_dialog.dart'; import 'package:PiliPlus/pages/setting/widgets/switch_item.dart'; import 'package:PiliPlus/pages/video/controller.dart'; @@ -1585,14 +1585,14 @@ class HeaderControlState extends State final int totalQaSam = videoFormat.length; /// 可用的质量分类 - int userfulQaSam = 0; + int usefulQaSam = 0; final List video = videoInfo.dash!.video!; final Set idSet = {}; for (final VideoItem item in video) { final int id = item.id!; if (!idSet.contains(id)) { idSet.add(id); - userfulQaSam++; + usefulQaSam++; } } @@ -1661,7 +1661,7 @@ class HeaderControlState extends State } }, // 可能包含会员解锁画质 - enabled: index >= totalQaSam - userfulQaSam, + enabled: index >= totalQaSam - usefulQaSam, contentPadding: const EdgeInsets.symmetric( horizontal: 20, ), @@ -1919,7 +1919,7 @@ class HeaderControlState extends State double subtitleFontScaleFS = plPlayerController.subtitleFontScaleFS; int subtitlePaddingH = plPlayerController.subtitlePaddingH; int subtitlePaddingB = plPlayerController.subtitlePaddingB; - double subtitleBgOpaticy = plPlayerController.subtitleBgOpaticy; + double subtitleBgOpacity = plPlayerController.subtitleBgOpacity; double subtitleStrokeWidth = plPlayerController.subtitleStrokeWidth; int subtitleFontWeight = plPlayerController.subtitleFontWeight; @@ -1946,9 +1946,9 @@ class HeaderControlState extends State } void updateOpacity(double val) { - subtitleBgOpaticy = val.toPrecision(2); + subtitleBgOpacity = val.toPrecision(2); plPlayerController - ..subtitleBgOpaticy = subtitleBgOpaticy + ..subtitleBgOpacity = subtitleBgOpacity ..updateSubtitleStyle(); setState(() {}); } @@ -2216,7 +2216,7 @@ class HeaderControlState extends State Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text('背景不透明度 ${(subtitleBgOpaticy * 100).toInt()}%'), + Text('背景不透明度 ${(subtitleBgOpacity * 100).toInt()}%'), resetBtn( theme, '67%', @@ -2237,7 +2237,7 @@ class HeaderControlState extends State child: Slider( min: 0, max: 1, - value: subtitleBgOpaticy, + value: subtitleBgOpacity, onChanged: updateOpacity, onChangeEnd: (_) => plPlayerController.putSubtitleSettings(), diff --git a/lib/pages/whisper/widgets/item.dart b/lib/pages/whisper/widgets/item.dart index b5c3d7d49..1a7297df3 100644 --- a/lib/pages/whisper/widgets/item.dart +++ b/lib/pages/whisper/widgets/item.dart @@ -163,7 +163,7 @@ class WhisperSessionItem extends StatelessWidget { final pendant = item.sessionInfo.avatar.fallbackLayers.layers .getOrNull(1) ?.resource; - final offcial = item + final official = item .sessionInfo .avatar .fallbackLayers @@ -187,8 +187,8 @@ class WhisperSessionItem extends StatelessWidget { ? pendant!.resImage.imageSrc.remote.url : pendant?.resAnimation.webpSrc.remote.url, isVip: vipInfo?['status'] != null && vipInfo!['status'] > 0, - officialType: offcial?.hasLocalValue() == true - ? switch (offcial!.localValue) { + officialType: official?.hasLocalValue() == true + ? switch (official!.localValue) { 3 => 0, 4 => 1, _ => null, diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 66c9b6dfc..45a33307c 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -17,7 +17,7 @@ import 'package:PiliPlus/models/common/video/video_type.dart'; import 'package:PiliPlus/models/user/danmaku_rule.dart'; import 'package:PiliPlus/models/video/play/url.dart'; import 'package:PiliPlus/models_new/video/video_shot/data.dart'; -import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart'; +import 'package:PiliPlus/pages/danmaku/danmaku_model.dart'; import 'package:PiliPlus/pages/mine/controller.dart'; import 'package:PiliPlus/plugin/pl_player/models/bottom_progress_behavior.dart'; import 'package:PiliPlus/plugin/pl_player/models/data_source.dart'; @@ -357,7 +357,7 @@ class PlPlayerController { late double danmakuLineHeight = Pref.danmakuLineHeight; late int subtitlePaddingH = Pref.subtitlePaddingH; late int subtitlePaddingB = Pref.subtitlePaddingB; - late double subtitleBgOpaticy = Pref.subtitleBgOpaticy; + late double subtitleBgOpacity = Pref.subtitleBgOpacity; final bool showVipDanmaku = Pref.showVipDanmaku; // loop unswitching late double subtitleStrokeWidth = Pref.subtitleStrokeWidth; late int subtitleFontWeight = Pref.subtitleFontWeight; @@ -437,9 +437,9 @@ class PlPlayerController { wordSpacing: 0.1, color: Colors.white, fontWeight: FontWeight.values[subtitleFontWeight], - backgroundColor: subtitleBgOpaticy == 0 + backgroundColor: subtitleBgOpacity == 0 ? null - : Colors.black.withValues(alpha: subtitleBgOpaticy), + : Colors.black.withValues(alpha: subtitleBgOpacity), ); late final Rx subtitleConfig = _getSubConfig.obs; @@ -448,7 +448,7 @@ class PlPlayerController { final subTitleStyle = this.subTitleStyle; return SubtitleViewConfiguration( style: subTitleStyle, - strokeStyle: subtitleBgOpaticy == 0 + strokeStyle: subtitleBgOpacity == 0 ? subTitleStyle.copyWith( color: null, background: null, @@ -1697,7 +1697,7 @@ class PlPlayerController { SettingBoxKey.subtitleFontScaleFS: subtitleFontScaleFS, SettingBoxKey.subtitlePaddingH: subtitlePaddingH, SettingBoxKey.subtitlePaddingB: subtitlePaddingB, - SettingBoxKey.subtitleBgOpaticy: subtitleBgOpaticy, + SettingBoxKey.subtitleBgOpacity: subtitleBgOpacity, SettingBoxKey.subtitleStrokeWidth: subtitleStrokeWidth, SettingBoxKey.subtitleFontWeight: subtitleFontWeight, }); diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index f27151857..3cbbc3c85 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -25,7 +25,7 @@ import 'package:PiliPlus/models_new/video/video_detail/section.dart'; import 'package:PiliPlus/models_new/video/video_detail/ugc_season.dart'; import 'package:PiliPlus/models_new/video/video_shot/data.dart'; import 'package:PiliPlus/pages/common/common_intro_controller.dart'; -import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart'; +import 'package:PiliPlus/pages/danmaku/danmaku_model.dart'; import 'package:PiliPlus/pages/live_room/widgets/bottom_control.dart' as live_bottom; import 'package:PiliPlus/pages/video/controller.dart'; @@ -419,7 +419,7 @@ class _PLVideoPlayerState extends State width: widgetWidth, height: 30, tooltip: '高能进度条', - icon: videoDetailController.showDmTreandChart.value + icon: videoDetailController.showDmTrendChart.value ? const Icon( Icons.show_chart, size: 22, @@ -441,8 +441,8 @@ class _PLVideoPlayerState extends State ), ], ), - onTap: () => videoDetailController.showDmTreandChart.value = - !videoDetailController.showDmTreandChart.value, + onTap: () => videoDetailController.showDmTrendChart.value = + !videoDetailController.showDmTrendChart.value, ); } return const SizedBox.shrink(); @@ -765,14 +765,14 @@ class _PLVideoPlayerState extends State } final List videoFormat = videoInfo.supportFormats!; final int totalQaSam = videoFormat.length; - int userfulQaSam = 0; + int usefulQaSam = 0; final List video = videoInfo.dash!.video!; final Set idSet = {}; for (final VideoItem item in video) { final int id = item.id!; if (!idSet.contains(id)) { idSet.add(id); - userfulQaSam++; + usefulQaSam++; } } return PopupMenuButton( @@ -785,7 +785,7 @@ class _PLVideoPlayerState extends State totalQaSam, (index) { final item = videoFormat[index]; - final enabled = index >= totalQaSam - userfulQaSam; + final enabled = index >= totalQaSam - usefulQaSam; return PopupMenuItem( enabled: enabled, height: 35, @@ -1835,7 +1835,7 @@ class _PLVideoPlayerState extends State ), ], if (plPlayerController.showDmChart && - videoDetailController.showDmTreandChart.value) + videoDetailController.showDmTrendChart.value) if (videoDetailController.dmTrend.value?.dataOrNull case final list?) buildDmChart(primary, list, videoDetailController), diff --git a/lib/plugin/pl_player/widgets/bottom_control.dart b/lib/plugin/pl_player/widgets/bottom_control.dart index e031254a9..c3b9a15b5 100644 --- a/lib/plugin/pl_player/widgets/bottom_control.dart +++ b/lib/plugin/pl_player/widgets/bottom_control.dart @@ -148,7 +148,7 @@ class BottomControl extends StatelessWidget { maxWidth - 40, ), ], - if (videoDetailController.showDmTreandChart.value) + if (videoDetailController.showDmTrendChart.value) if (videoDetailController.dmTrend.value?.dataOrNull case final list?) buildDmChart(primary, list, videoDetailController, 4.5), diff --git a/lib/utils/accounts.dart b/lib/utils/accounts.dart index 3f210082a..e865ffaaa 100644 --- a/lib/utils/accounts.dart +++ b/lib/utils/accounts.dart @@ -77,7 +77,7 @@ abstract class Accounts { } } await Future.wait( - (accountMode.toSet()..removeWhere((i) => i.activited)).map( + (accountMode.toSet()..removeWhere((i) => i.activated)).map( Request.buvidActive, ), ); @@ -93,14 +93,14 @@ abstract class Accounts { } static Future deleteAll(Set accounts) async { - var isloginMain = Accounts.main.isLogin; + var isLoginMain = Accounts.main.isLogin; for (int i = 0; i < AccountType.values.length; i++) { if (accounts.contains(accountMode[i])) { accountMode[i] = AnonymousAccount(); } } await Future.wait(accounts.map((i) => i.delete())); - if (isloginMain && !Accounts.main.isLogin) { + if (isLoginMain && !Accounts.main.isLogin) { await LoginUtils.onLogoutMain(); } } @@ -109,7 +109,7 @@ abstract class Accounts { await (accountMode[key.index]..type.remove(key)).onChange(); accountMode[key.index] = account..type.add(key); await account.onChange(); - if (!account.activited) await Request.buvidActive(account); + if (!account.activated) await Request.buvidActive(account); switch (key) { case AccountType.main: await (account.isLogin diff --git a/lib/utils/accounts/account.dart b/lib/utils/accounts/account.dart index 3f0b7a510..336a8954a 100644 --- a/lib/utils/accounts/account.dart +++ b/lib/utils/accounts/account.dart @@ -12,9 +12,9 @@ sealed class Account { Set get type => const {}; - bool get activited => false; + bool get activated => false; - set activited(bool value) => throw UnimplementedError(); + set activated(bool value) => throw UnimplementedError(); String? get accessKey => throw UnimplementedError(); @@ -53,7 +53,7 @@ class LoginAccount extends Account { final Set type; @override - bool activited = false; + bool activated = false; @override late final int mid = int.parse(_midStr); @@ -141,7 +141,7 @@ class AnonymousAccount extends Account { final Map headers = Constants.baseHeaders; @override - bool activited = false; + bool activated = false; @override Future delete() async { diff --git a/lib/utils/context_ext.dart b/lib/utils/context_ext.dart index 8df7368b8..a566a3216 100644 --- a/lib/utils/context_ext.dart +++ b/lib/utils/context_ext.dart @@ -11,7 +11,7 @@ extension ContextExtensions on BuildContext { double get height => MediaQuery.heightOf(this); /// The same of [MediaQuery.of(context).size.width] - /// Note: updates when you rezise your screen (like on a browser or + /// Note: updates when you resize your screen (like on a browser or /// desktop window) double get width => MediaQuery.widthOf(this); diff --git a/lib/utils/storage_key.dart b/lib/utils/storage_key.dart index febecdd82..9e72e5f18 100644 --- a/lib/utils/storage_key.dart +++ b/lib/utils/storage_key.dart @@ -77,8 +77,8 @@ abstract class SettingBoxKey { showRelatedVideo = 'showRelatedVideo', showVideoReply = 'showVideoReply', showBangumiReply = 'showBangumiReply', - alwaysExapndIntroPanel = 'alwaysExapndIntroPanel', - exapndIntroPanelH = 'exapndIntroPanelH', + alwaysExpandIntroPanel = 'alwaysExapndIntroPanel', + expandIntroPanelH = 'exapndIntroPanelH', horizontalSeasonPanel = 'horizontalSeasonPanel', horizontalMemberPage = 'horizontalMemberPage', replyLengthLimit = 'replyLengthLimit', @@ -159,7 +159,7 @@ abstract class SettingBoxKey { enableDragSubtitle = 'enableDragSubtitle', subtitlePaddingH = 'subtitlePaddingH', subtitlePaddingB = 'subtitlePaddingB', - subtitleBgOpaticy = 'subtitleBgOpaticy', + subtitleBgOpacity = 'subtitleBgOpaticy', subtitleStrokeWidth = 'subtitleStrokeWidth', subtitleFontScale = 'subtitleFontScale', subtitleFontScaleFS = 'subtitleFontScaleFS', diff --git a/lib/utils/storage_pref.dart b/lib/utils/storage_pref.dart index 5a8e809de..1f771b1a4 100644 --- a/lib/utils/storage_pref.dart +++ b/lib/utils/storage_pref.dart @@ -333,11 +333,11 @@ abstract class Pref { static bool get showBangumiReply => _setting.get(SettingBoxKey.showBangumiReply, defaultValue: true); - static bool get alwaysExapndIntroPanel => - _setting.get(SettingBoxKey.alwaysExapndIntroPanel, defaultValue: false); + static bool get alwaysExpandIntroPanel => + _setting.get(SettingBoxKey.alwaysExpandIntroPanel, defaultValue: false); - static bool get exapndIntroPanelH => - _setting.get(SettingBoxKey.exapndIntroPanelH, defaultValue: false); + static bool get expandIntroPanelH => + _setting.get(SettingBoxKey.expandIntroPanelH, defaultValue: false); static bool get horizontalSeasonPanel => _setting.get(SettingBoxKey.horizontalSeasonPanel, defaultValue: false); @@ -371,8 +371,8 @@ abstract class Pref { static int get subtitlePaddingB => _setting.get(SettingBoxKey.subtitlePaddingB, defaultValue: 24); - static double get subtitleBgOpaticy => - _setting.get(SettingBoxKey.subtitleBgOpaticy, defaultValue: 0.67); + static double get subtitleBgOpacity => + _setting.get(SettingBoxKey.subtitleBgOpacity, defaultValue: 0.67); static double get subtitleStrokeWidth => _setting.get(SettingBoxKey.subtitleStrokeWidth, defaultValue: 2.0);