PangleSize constructor

PangleSize({
  1. required double width,
  2. required double height,
})

自渲染时必填

width 宽度,必选, 如果width超过屏幕,默认使用屏幕宽 height 高度,必选

Implementation

PangleSize({required double width, required double height})
    : assert(width > 0),
      assert(height > 0),
      width = width > kPangleScreenWidth ? kPangleScreenWidth : width,
      height = height > kPangleScreenWidth / width * height
          ? kPangleScreenWidth / width * height
          : height;