copyWith method

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

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,
  bool disableAnimations,
  bool invertColors,
  bool accessibleNavigation,
  bool boldText,
}) {
  return 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,
    invertColors: invertColors ?? this.invertColors,
    disableAnimations: disableAnimations ?? this.disableAnimations,
    accessibleNavigation: accessibleNavigation ?? this.accessibleNavigation,
    boldText: boldText ?? this.boldText,
  );
}