copyWith method

Device copyWith({
  1. Size? size,
  2. double? devicePixelRatio,
  3. String? name,
  4. double? textScale,
  5. Brightness? brightness,
  6. EdgeInsets? safeArea,
})

copyWith convenience function for Device modification

Implementation

Device copyWith({
  Size? size,
  double? devicePixelRatio,
  String? name,
  double? textScale,
  Brightness? brightness,
  EdgeInsets? safeArea,
}) {
  return Device(
    size: size ?? this.size,
    devicePixelRatio: devicePixelRatio ?? this.devicePixelRatio,
    name: name ?? this.name,
    textScale: textScale ?? this.textScale,
    brightness: brightness ?? this.brightness,
    safeArea: safeArea ?? this.safeArea,
  );
}