mod: video sheet panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-28 20:20:39 +08:00
parent d2890d72e5
commit f6bfbc3ed6
3 changed files with 20 additions and 12 deletions

View File

@@ -114,15 +114,6 @@ class _ListSheetContentState extends State<ListSheetContent>
@override
void initState() {
super.initState();
if (GStorage.collapsibleVideoPage) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) {
setState(() {
_isInit = false;
});
}
});
}
if (_isList) {
_indexStream ??= StreamController<int>.broadcast();
_ctr = TabController(
@@ -149,9 +140,22 @@ class _ListSheetContentState extends State<ListSheetContent>
}();
}
WidgetsBinding.instance.addPostFrameCallback((_) {
try {
itemScrollController[_index].jumpTo(index: currentIndex);
} catch (_) {}
if (GStorage.collapsibleVideoPage) {
if (mounted) {
setState(() {
_isInit = false;
});
WidgetsBinding.instance.addPostFrameCallback((_) {
try {
itemScrollController[_index].jumpTo(index: currentIndex);
} catch (_) {}
});
}
} else {
try {
itemScrollController[_index].jumpTo(index: currentIndex);
} catch (_) {}
}
});
}

View File

@@ -160,6 +160,8 @@ class _HorizontalMemberPageState extends State<HorizontalMemberPage> {
Success() => Material(
color: Colors.transparent,
child: CustomScrollView(
controller: ScrollController(),
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
_buildSliverHeader,
SliverPadding(

View File

@@ -42,6 +42,8 @@ class AiDetail extends StatelessWidget {
),
Expanded(
child: SingleChildScrollView(
controller: ScrollController(),
physics: const AlwaysScrollableScrollPhysics(),
child: Column(
children: [
if (modelResult.summary?.isNotEmpty == true) ...[