基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。
tiny fix in android tablet
Predidit45feee72c72d
diff --git a/lib/pages/about/about_page.dart b/lib/pages/about/about_page.dartindex bdc20620..b70cb10c 100644--- a/lib/pages/about/about_page.dart+++ b/lib/pages/about/about_page.dart@@ -26,7 +26,7 @@ class _AboutPageState extends State<AboutPage> {@overridevoid initState() {super.initState();- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {diff --git a/lib/pages/favorite/favorite_page.dart b/lib/pages/favorite/favorite_page.dartindex 40b5125e..84ee0ac8 100644--- a/lib/pages/favorite/favorite_page.dart+++ b/lib/pages/favorite/favorite_page.dart@@ -38,7 +38,7 @@ class _FavoritePageState extends State<FavoritePage> {}Widget contentGrid(List bangumiList) {- int crossCount = (!Utils.isCompact(context)) ? 6 : 3;+ int crossCount = (!Utils.isCompact()) ? 6 : 3;return SliverGrid(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(mainAxisSpacing: StyleString.cardSpace - 2,diff --git a/lib/pages/history/history_page.dart b/lib/pages/history/history_page.dartindex f12c3d27..44740731 100644--- a/lib/pages/history/history_page.dart+++ b/lib/pages/history/history_page.dart@@ -28,7 +28,7 @@ class _HistoryPageState extends State<HistoryPage>void initState() {super.initState();historyController.init();- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {@@ -78,7 +78,7 @@ class _HistoryPageState extends State<HistoryPage>Widget get contentGrid {// List<Widget> gridViewList = [];- int crossCount = (!Utils.isCompact(context)) ? 4 : 1;+ int crossCount = (!Utils.isCompact()) ? 4 : 1;return CustomScrollView(slivers: [SliverGrid(diff --git a/lib/pages/index_page.dart b/lib/pages/index_page.dartindex e6a9524c..8a077e84 100644--- a/lib/pages/index_page.dart+++ b/lib/pages/index_page.dart@@ -25,6 +25,6 @@ class _IndexPageState extends State<IndexPage> with WidgetsBindingObserver {@overrideWidget build(BuildContext context) {- return (!Utils.isCompact(context)) ? const SideMenu() : const BottomMenu();+ return (!Utils.isCompact()) ? const SideMenu() : const BottomMenu();}}diff --git a/lib/pages/info/info_page.dart b/lib/pages/info/info_page.dartindex 5a62650e..889c3d3a 100644--- a/lib/pages/info/info_page.dart+++ b/lib/pages/info/info_page.dart@@ -39,7 +39,7 @@ class _InfoPageState extends State<InfoPage>TabController(length: pluginsController.pluginList.length, vsync: this);// 测试用例infoController.querySource(popularController.keyword);- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {diff --git a/lib/pages/player/player_item.dart b/lib/pages/player/player_item.dartindex 2a63f69b..53621a9f 100644--- a/lib/pages/player/player_item.dart+++ b/lib/pages/player/player_item.dart@@ -267,7 +267,7 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {@overridevoid initState() {super.initState();- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {@@ -278,7 +278,7 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {_opacity = setting.get(SettingBoxKey.danmakuOpacity, defaultValue: 1.0);_duration = 8;_fontSize = setting.get(SettingBoxKey.danmakuFontSize,- defaultValue: (Utils.isCompact(context)) ? 16.0 : 25.0);+ defaultValue: (Utils.isCompact()) ? 16.0 : 25.0);danmakuArea = setting.get(SettingBoxKey.danmakuArea, defaultValue: 1.0);_hideTop = !setting.get(SettingBoxKey.danmakuTop, defaultValue: true);_hideBottom = !setting.get(SettingBoxKey.danmakuBottom, defaultValue: true);@@ -828,7 +828,7 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {},),),- ((Utils.isCompact(context)) &&+ ((Utils.isCompact()) &&!videoPageController.androidFullscreen)? Container()@@ -846,7 +846,7 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {.duration),style: TextStyle(color: Colors.white,- fontSize: !Utils.isCompact(context)+ fontSize: !Utils.isCompact()? 16.0: 12.0,),diff --git a/lib/pages/plugin_editor/plugin_shop_page.dart b/lib/pages/plugin_editor/plugin_shop_page.dartindex bcc64d8b..ca16b67d 100644--- a/lib/pages/plugin_editor/plugin_shop_page.dart+++ b/lib/pages/plugin_editor/plugin_shop_page.dart@@ -32,7 +32,7 @@ class _PluginShopPageState extends State<PluginShopPage> {void initState() {super.initState();enableGitProxy = setting.get(SettingBoxKey.enableGitProxy, defaultValue: false);- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {diff --git a/lib/pages/plugin_editor/plugin_view_page.dart b/lib/pages/plugin_editor/plugin_view_page.dartindex 57d2df77..b4733e0d 100644--- a/lib/pages/plugin_editor/plugin_view_page.dart+++ b/lib/pages/plugin_editor/plugin_view_page.dart@@ -120,7 +120,7 @@ class _PluginViewPageState extends State<PluginViewPage> {@overridevoid initState() {super.initState();- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {@@ -143,7 +143,7 @@ class _PluginViewPageState extends State<PluginViewPage> {appBar: SysAppBar(title: const Text('规则管理'),actions: [- (Utils.isCompact(context)) ? IconButton(+ (Utils.isCompact()) ? IconButton(onPressed: () {_handleAdd();},@@ -244,7 +244,7 @@ class _PluginViewPageState extends State<PluginViewPage> {},);}),- floatingActionButton: (!Utils.isCompact(context)) ? FloatingActionButton(+ floatingActionButton: (!Utils.isCompact()) ? FloatingActionButton(onPressed: () {_handleAdd();},diff --git a/lib/pages/popular/popular_page.dart b/lib/pages/popular/popular_page.dartindex 1d7d563a..fd7b4e6f 100644--- a/lib/pages/popular/popular_page.dart+++ b/lib/pages/popular/popular_page.dart@@ -98,7 +98,7 @@ class _PopularPageState extends State<PopularPage>},child: Scaffold(appBar: SysAppBar(- leading: (Utils.isCompact(context)) ? Row(+ leading: (Utils.isCompact()) ? Row(children: [const SizedBox(width: 10,@@ -227,7 +227,7 @@ class _PopularPageState extends State<PopularPage>}Widget contentGrid(bangumiList) {- int crossCount = !Utils.isCompact(context) ? 6 : 3;+ int crossCount = !Utils.isCompact() ? 6 : 3;return SliverGrid(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(// 行间距diff --git a/lib/pages/settings/danmaku_settings.dart b/lib/pages/settings/danmaku_settings.dartindex 6166daa6..f8b595d2 100644--- a/lib/pages/settings/danmaku_settings.dart+++ b/lib/pages/settings/danmaku_settings.dart@@ -29,7 +29,7 @@ class _DanmakuSettingsPageState extends State<DanmakuSettingsPage> {@overridevoid initState() {super.initState();- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {@@ -41,7 +41,7 @@ class _DanmakuSettingsPageState extends State<DanmakuSettingsPage> {defaultDanmakuOpacity =setting.get(SettingBoxKey.danmakuOpacity, defaultValue: 1.0);defaultDanmakuFontSize = setting.get(SettingBoxKey.danmakuFontSize,- defaultValue: (Utils.isCompact(context)) ? 16.0 : 25.0);+ defaultValue: (Utils.isCompact()) ? 16.0 : 25.0);}void onBackPressed(BuildContext context) {@@ -199,7 +199,7 @@ class _DanmakuSettingsPageState extends State<DanmakuSettingsPage> {TextButton(onPressed: () async {updateDanmakuFontSize(- (Utils.isCompact(context))+ (Utils.isCompact())? 16.0: 25.0);SmartDialog.dismiss();diff --git a/lib/pages/settings/other_settings.dart b/lib/pages/settings/other_settings.dartindex 3432e195..914108c8 100644--- a/lib/pages/settings/other_settings.dart+++ b/lib/pages/settings/other_settings.dart@@ -23,7 +23,7 @@ class _OtherSettingsPageState extends State<OtherSettingsPage> {@overridevoid initState() {super.initState();- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {diff --git a/lib/pages/settings/theme_settings_page.dart b/lib/pages/settings/theme_settings_page.dartindex 1164a7ab..7d7eb8e6 100644--- a/lib/pages/settings/theme_settings_page.dart+++ b/lib/pages/settings/theme_settings_page.dart@@ -33,7 +33,7 @@ class _ThemeSettingsPageState extends State<ThemeSettingsPage> {@overridevoid initState() {super.initState();- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {diff --git a/lib/pages/timeline/timeline_page.dart b/lib/pages/timeline/timeline_page.dartindex ec182de9..1905826d 100644--- a/lib/pages/timeline/timeline_page.dart+++ b/lib/pages/timeline/timeline_page.dart@@ -31,7 +31,7 @@ class _TimelinePageState extends State<TimelinePage>int weekday = DateTime.now().weekday - 1;controller =TabController(vsync: this, length: tabs.length, initialIndex: weekday);- if (Utils.isCompact(context)) {+ if (Utils.isCompact()) {navigationBarState =Provider.of<NavigationBarState>(context, listen: false);} else {@@ -116,7 +116,7 @@ class _TimelinePageState extends State<TimelinePage>List<Widget> contentGrid(List<List<BangumiItem>> bangumiCalendar) {List<Widget> gridViewList = [];- int crossCount = !Utils.isCompact(context) ? 6 : 3;+ int crossCount = !Utils.isCompact() ? 6 : 3;for (dynamic bangumiList in bangumiCalendar) {gridViewList.add(CustomScrollView(diff --git a/lib/pages/video/video_page.dart b/lib/pages/video/video_page.dartindex 602b6dcb..5c19bccf 100644--- a/lib/pages/video/video_page.dart+++ b/lib/pages/video/video_page.dart@@ -276,7 +276,7 @@ class _VideoPageState extends State<VideoPage>scrollDirection: Axis.vertical,gridDelegate:SliverGridDelegateWithFixedCrossAxisCount(- crossAxisCount: !Utils.isCompact(context)+ crossAxisCount: !Utils.isCompact()? 10: 3,crossAxisSpacing: 10,diff --git a/lib/utils/utils.dart b/lib/utils/utils.dartindex 7b884922..22b62968 100644--- a/lib/utils/utils.dart+++ b/lib/utils/utils.dart@@ -376,7 +376,7 @@ class Utils {}/// 判断设备是否需要紧凑布局- static bool isCompact(BuildContext context) {+ static bool isCompact() {Box setting = GStorage.setting;bool isWideScreen =setting.get(SettingBoxKey.isWideScreen, defaultValue: false);