setLogicalSize method
Sets physicalSize, devicePixelRatio and adds reset code to tearDown
Implementation
void setLogicalSize({
double? width,
double? height,
}) {
physicalSize = Size(
width ?? physicalSize.width / devicePixelRatio,
height ?? physicalSize.height / devicePixelRatio,
);
devicePixelRatio = 1.0;
addTearDown(() => resetPhysicalSize());
addTearDown(() => resetDevicePixelRatio());
}