mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-05 08:40:12 +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);
|
// ).whenComplete(_stopRefresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
late final AnimationController _refreshController;
|
AnimationController? refreshController;
|
||||||
|
AnimationController get _refreshController =>
|
||||||
|
refreshController ??= AnimationController(
|
||||||
|
vsync: this,
|
||||||
|
duration: CircularProgressIndicator.defaultAnimationDuration,
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
dynamic get arguments => {'item': controller.dynItem};
|
dynamic get arguments => {'item': controller.dynItem};
|
||||||
@@ -96,15 +101,11 @@ class _DynamicDetailPageState
|
|||||||
),
|
),
|
||||||
tag: id,
|
tag: id,
|
||||||
);
|
);
|
||||||
_refreshController = AnimationController(
|
|
||||||
vsync: this,
|
|
||||||
duration: CircularProgressIndicator.defaultAnimationDuration,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_refreshController.dispose();
|
refreshController?.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user