copyWith method

DeviceViewport copyWith({
  1. int? width,
  2. int? height,
  3. num? deviceScaleFactor,
  4. bool? isMobile,
  5. bool? isLandscape,
  6. bool? hasTouch,
})

Implementation

DeviceViewport copyWith(
    {int? width,
    int? height,
    num? deviceScaleFactor,
    bool? isMobile,
    bool? isLandscape,
    bool? hasTouch}) {
  return DeviceViewport(
    width: width ?? this.width,
    height: height ?? this.height,
    deviceScaleFactor: deviceScaleFactor ?? this.deviceScaleFactor,
    isMobile: isMobile ?? this.isMobile,
    isLandscape: isLandscape ?? this.isLandscape,
    hasTouch: hasTouch ?? this.hasTouch,
  );
}