mod: keep pgc index page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-16 13:27:26 +08:00
parent fa465f792d
commit 959bcfaa30

View File

@@ -22,14 +22,19 @@ class PgcIndexPage extends StatefulWidget {
State<PgcIndexPage> createState() => _PgcIndexPageState();
}
class _PgcIndexPageState extends State<PgcIndexPage> {
class _PgcIndexPageState extends State<PgcIndexPage>
with AutomaticKeepAliveClientMixin {
late final _ctr = Get.put(
PgcIndexController(widget.indexType),
tag: '${widget.indexType}',
);
@override
bool get wantKeepAlive => widget.indexType != null;
@override
Widget build(BuildContext context) {
super.build(context);
return widget.indexType == null
? Scaffold(
appBar: AppBar(title: const Text('索引')),