Skip to content

Commit 0bb87a0

Browse files
Merge pull request #32 from SpencerLindemuth/master
Add cleaner context check
2 parents 34d0176 + 702bf9a commit 0bb87a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/responsive_wrapper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
461461
// The required MediaQueryData is only available
462462
// on the next frame for physical dimension changes.
463463
WidgetsBinding.instance.addPostFrameCallback((_) {
464-
if (context != null) {
464+
if (mounted) {
465465
setDimensions();
466466
setState(() {});
467467
}

0 commit comments

Comments
 (0)