feat: horizontal scroll, fix #11

This commit is contained in:
Simon Ding
2025-02-10 11:22:25 +08:00
parent 2a9fdd2a13
commit 80ad9a2a3b

View File

@@ -23,7 +23,7 @@ class ResourceList extends ConsumerWidget {
seasonNumber: seasonNum,
episodeNumber: episodeNum
)));
return torrents.when(
var widgets = torrents.when(
data: (v) {
bool hasPrivate = false;
for (final item in v) {
@@ -83,5 +83,9 @@ class ResourceList extends ConsumerWidget {
: Text("$err");
},
loading: () => const MyProgressIndicator());
return isSmallScreen(context)
? SingleChildScrollView(
scrollDirection: Axis.horizontal, child: widgets)
: widgets;
}
}