setLogicalSize method

void setLogicalSize({
  1. double? width,
  2. double? height,
})

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());
}