resetSize method
Implementation
Size resetSize(Size size, BuildContext context) {
double width = size.width;
double height = size.height;
final Size physicalSize = MediaQuery.of(context).size;
if (physicalSize != null) {
width = min(width, physicalSize.width);
height = min(height, physicalSize.height);
size = Size(width, height);
}
return size;
}