Пример #1
0
        public static MediaQueryData fromWindow(Window window)
        {
            return(new MediaQueryData(
                       size: window.physicalSize / window.devicePixelRatio,
                       devicePixelRatio: window.devicePixelRatio,
                       textScaleFactor: window.textScaleFactor,
                       viewInsets: EdgeInsets.fromWindowPadding(window.viewInsets, window.devicePixelRatio),
                       padding: EdgeInsets.fromWindowPadding(window.padding, window.devicePixelRatio)
//                accessibleNavigation: window.accessibilityFeatures.accessibleNavigation,
//                invertColors: window.accessibilityFeatures.invertColors,
//                disableAnimations: window.accessibilityFeatures.disableAnimations,
//                boldText: window.accessibilityFeatures.boldText,
//                alwaysUse24HourFormat: window.alwaysUse24HourFormat
                       ));
        }
Пример #2
0
 public static MediaQueryData fromWindow(Window window)
 {
     return(new MediaQueryData(
                size: window.physicalSize / window.devicePixelRatio,
                devicePixelRatio: window.devicePixelRatio,
                textScaleFactor: window.textScaleFactor,
                platformBrightness: window.platformBrightness, // TODO: remove comment when window.platformBrightness is ready
                padding: EdgeInsets.fromWindowPadding(window.padding, window.devicePixelRatio),
                viewPadding: EdgeInsets.fromWindowPadding(window.viewPadding, window.devicePixelRatio),
                viewInsets: EdgeInsets.fromWindowPadding(window.viewInsets, window.devicePixelRatio),
                systemGestureInsets: EdgeInsets.fromWindowPadding(window.systemGestureInsets, window.devicePixelRatio),
                physicalDepth: window.physicalDepth,
                accessibleNavigation: window.accessibilityFeatures.accessibleNavigation,
                invertColors: window.accessibilityFeatures.invertColors,
                disableAnimations: window.accessibilityFeatures.disableAnimations,
                boldText: window.accessibilityFeatures.boldText,
                highContrast: window.accessibilityFeatures.highContrast,
                alwaysUse24HourFormat: window.alwaysUse24HourFormat
                ));
 }