copyWith method

MediaQueryData copyWith ({Size size, double devicePixelRatio, double textScaleFactor, EdgeInsets padding, EdgeInsets viewInsets, bool alwaysUse24HourFormat })

Creates a copy of this media query data but with the given fields replaced with the new values.

Implementation

MediaQueryData copyWith({
  Size size,
  double devicePixelRatio,
  double textScaleFactor,
  EdgeInsets padding,
  EdgeInsets viewInsets,
  bool alwaysUse24HourFormat,
}) {
  return new MediaQueryData(
    size: size ?? this.size,
    devicePixelRatio: devicePixelRatio ?? this.devicePixelRatio,
    textScaleFactor: textScaleFactor ?? this.textScaleFactor,
    padding: padding ?? this.padding,
    viewInsets: viewInsets ?? this.viewInsets,
    alwaysUse24HourFormat: alwaysUse24HourFormat ?? this.alwaysUse24HourFormat,
  );
}