Fixes the issues on all Desktop platforms when the window is wider than the height and mean it used the tablet sizes.
This change ensures that width=Size.width rather than width=Size.shortest when on Web and Desktop. The code was there in the getDeviceTypes and getRefindedSize but it was either was not configurable and stuck as kIsWeb or had a parameter and defaulted. I have added a parameter to ResponsiveBuilder to allow this to be overridden. Currently, it just defaults to kIsWeb as this was the existing behaviour.
Example
ResponsiveBuilder(
isWebOrDesktop: kIsWeb || Theme.of(context).platform.isDesktop(), // Using an extension function to determine isDesktop
builder: (context, sizingInformation) {
...
}
Extra. If anyone wants the extension function to use the above
Fixes #31
Fixes the issues on all Desktop platforms when the window is wider than the height and mean it used the tablet sizes.
This change ensures that width=Size.width rather than width=Size.shortest when on Web and Desktop. The code was there in the getDeviceTypes and getRefindedSize but it was either was not configurable and stuck as kIsWeb or had a parameter and defaulted. I have added a parameter to ResponsiveBuilder to allow this to be overridden. Currently, it just defaults to kIsWeb as this was the existing behaviour.
Example
Extra. If anyone wants the extension function to use the above
To use the code in this PR in your app: