Replies: 2 comments 3 replies
-
My bad, it works completely fine !
// Media query
final mediaQuery = MediaQuery.of(context);
final screenSize = mediaQuery.size;
print('SIZE: $screenSize'); Output:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
ReArch works fine with InheritedWidgets, like MediaQuery. I often make accessing MediaQuery an extension on BuildContext, but you can also make a side effect for it too if you wanted: extension UseMediaQuery on WidgetSideEffectRegistrar {
MediaQuery mediaQuery() => MediaQuery.of(context());
}
// …
use.mediaQuery(); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, here it says:
Is there an obvious ReArch integration here? I just have done a Side Effect but I have two worries:
Beta Was this translation helpful? Give feedback.
All reactions