MediaQueryData constructor Null safety
- {Size size = Size.zero,
- double devicePixelRatio = 1.0,
- double textScaleFactor = 1.0,
- Brightness platformBrightness = Brightness.light,
- EdgeInsets padding = EdgeInsets.zero,
- EdgeInsets viewInsets = EdgeInsets.zero,
- EdgeInsets systemGestureInsets = EdgeInsets.zero,
- EdgeInsets viewPadding = EdgeInsets.zero,
- bool alwaysUse24HourFormat = false,
- bool invertColors = false,
- bool highContrast = false,
- bool disableAnimations = false,
- bool boldText = false,
- DeviceGestureSettings gestureSettings = const DeviceGestureSettings(touchSlop: kTouchSlop),
- List<
DisplayFeature> displayFeatures = const <ui.DisplayFeature>[]}
Creates data for a media query with explicit values.
Consider using MediaQueryData.fromWindow to create data based on a dart:ui.PlatformDispatcher.
Implementation
const MediaQueryData({
this.size = Size.zero,
this.devicePixelRatio = 1.0,
this.textScaleFactor = 1.0,
this.platformBrightness = Brightness.light,
this.padding = EdgeInsets.zero,
this.viewInsets = EdgeInsets.zero,
this.systemGestureInsets = EdgeInsets.zero,
this.viewPadding = EdgeInsets.zero,
this.alwaysUse24HourFormat = false,
this.accessibleNavigation = false,
this.invertColors = false,
this.highContrast = false,
this.disableAnimations = false,
this.boldText = false,
this.navigationMode = NavigationMode.traditional,
this.gestureSettings = const DeviceGestureSettings(touchSlop: kTouchSlop),
this.displayFeatures = const <ui.DisplayFeature>[],
}) : assert(size != null),
assert(devicePixelRatio != null),
assert(textScaleFactor != null),
assert(platformBrightness != null),
assert(padding != null),
assert(viewInsets != null),
assert(systemGestureInsets != null),
assert(viewPadding != null),
assert(alwaysUse24HourFormat != null),
assert(accessibleNavigation != null),
assert(invertColors != null),
assert(highContrast != null),
assert(disableAnimations != null),
assert(boldText != null),
assert(navigationMode != null),
assert(gestureSettings != null),
assert(displayFeatures != null);