mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +01:00
Fix potential use of disposed context
This commit is contained in:
parent
acc340ca7a
commit
98696b9a47
1 changed files with 8 additions and 6 deletions
|
@ -52,12 +52,14 @@ class _MeasurableItemListState extends State<MeasurableItemList>
|
||||||
@override
|
@override
|
||||||
didChangeMetrics() {
|
didChangeMetrics() {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
final orientation = MediaQuery.of(context).orientation;
|
if (mounted) {
|
||||||
if (orientation != _prevOrientation) {
|
final orientation = MediaQuery.of(context).orientation;
|
||||||
_log.info(
|
if (orientation != _prevOrientation) {
|
||||||
"[didChangeMetrics] updateListHeight: orientation changed: $orientation");
|
_log.info(
|
||||||
_prevOrientation = orientation;
|
"[didChangeMetrics] updateListHeight: orientation changed: $orientation");
|
||||||
updateListHeight();
|
_prevOrientation = orientation;
|
||||||
|
updateListHeight();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue