Skip to content

基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。

chore: better responsive layout in popular page

Prediditea63162fc17c
diff --git a/lib/pages/popular/popular_page.dart b/lib/pages/popular/popular_page.dart
index 11d00647..f7e363af 100644
--- a/lib/pages/popular/popular_page.dart
+++ b/lib/pages/popular/popular_page.dart
@@ -164,8 +164,13 @@ class _PopularPageState extends State<PopularPage>
}
Widget contentGrid(bangumiList) {
- int crossCount =
- MediaQuery.of(context).orientation != Orientation.portrait ? 6 : 3;
+ int crossCount = 3;
+ if (MediaQuery.sizeOf(context).width > LayoutBreakpoint.compact['width']!) {
+ crossCount = 5;
+ }
+ if (MediaQuery.sizeOf(context).width > LayoutBreakpoint.medium['width']!) {
+ crossCount = 6;
+ }
return SliverGrid(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// 行间距