Sizes are not updating when rotating the device
sumitanaiya opened this issue · comments
If we use MediaQuery.of(context).size then the size is automatically updated when rotating the device, but when using Adaptive.w or .w the sizes are not automatically updating on rotation
Did you wrap MaterialApp
with ResponsiveSizer
? If you did and the problem still persists, you have to rebuild your widget by using OrientationBuilder so that it is using the updated Adaptive.w
state.
Try doing this:
OrientationBuilder(builder: (context, orientation) {
return MyWidget(
width: // Your Adaptive.w here
);
});
Closing since there's been no response for two weeks.