mod: auto expand intro panel

Closes #47

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-24 00:09:27 +08:00
parent e2b30200bf
commit 569cf6b4a3

View File

@@ -171,9 +171,19 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
loadingStatus = widget.loadingStatus;
enableAi = setting.get(SettingBoxKey.enableAi, defaultValue: true);
bool exapndIntroPanel = GStorage.exapndIntroPanel;
_expandableCtr = ExpandableController(
initialExpanded: GStorage.exapndIntroPanel,
initialExpanded: exapndIntroPanel,
);
if (exapndIntroPanel.not) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (context.orientation == Orientation.landscape) {
_expandableCtr.toggle();
}
});
}
}
@override