mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-29 22:00:16 +08:00
lazy init dyn refreshctrl
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -72,7 +72,12 @@ class _DynamicDetailPageState
|
||||
// ).whenComplete(_stopRefresh);
|
||||
}
|
||||
|
||||
late final AnimationController _refreshController;
|
||||
AnimationController? refreshController;
|
||||
AnimationController get _refreshController =>
|
||||
refreshController ??= AnimationController(
|
||||
vsync: this,
|
||||
duration: CircularProgressIndicator.defaultAnimationDuration,
|
||||
);
|
||||
|
||||
@override
|
||||
dynamic get arguments => {'item': controller.dynItem};
|
||||
@@ -96,15 +101,11 @@ class _DynamicDetailPageState
|
||||
),
|
||||
tag: id,
|
||||
);
|
||||
_refreshController = AnimationController(
|
||||
vsync: this,
|
||||
duration: CircularProgressIndicator.defaultAnimationDuration,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_refreshController.dispose();
|
||||
refreshController?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user