CoderUni / responsive_sizer

Responsive Sizer helps implement are responsive layout by providing helper widgets and extensions

Home Page:https://pub.dev/packages/responsive_sizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.