mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-22 23:19:21 +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,6 +52,7 @@ class _MeasurableItemListState extends State<MeasurableItemList>
|
||||||
@override
|
@override
|
||||||
didChangeMetrics() {
|
didChangeMetrics() {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (mounted) {
|
||||||
final orientation = MediaQuery.of(context).orientation;
|
final orientation = MediaQuery.of(context).orientation;
|
||||||
if (orientation != _prevOrientation) {
|
if (orientation != _prevOrientation) {
|
||||||
_log.info(
|
_log.info(
|
||||||
|
@ -59,6 +60,7 @@ class _MeasurableItemListState extends State<MeasurableItemList>
|
||||||
_prevOrientation = orientation;
|
_prevOrientation = orientation;
|
||||||
updateListHeight();
|
updateListHeight();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue