ScreenAdaptationUtil constructor

ScreenAdaptationUtil({
  1. double width = 750,
  2. double height = 1334,
  3. double? screenWidth,
  4. double? screenHeight,
  5. Orientation? orientation,
  6. double? pixelRatio,
  7. double? statusBarHeight,
  8. double? bottomBarHeight,
  9. double? textScaleFactor,
  10. bool allowFontScaling = false,
  11. double? landscapeWidth,
  12. double? landscapeHeight,
})

Implementation

ScreenAdaptationUtil({
  double width = 750,
  double height = 1334,
  this.screenWidth,
  this.screenHeight,
  this.orientation,
  this.pixelRatio,
  this.statusBarHeight,
  this.bottomBarHeight,
  this.textScaleFactor,
  this.allowFontScaling = false,
  double? landscapeWidth,
  double? landscapeHeight,
}) {
  if (orientation == Orientation.portrait) {
    this.width = width;
    this.height = height;
  } else {
    this.width = landscapeWidth ?? height;
    this.height = landscapeHeight ?? width;
  }
}