DeviceGestureSettings.fromWindow constructor Null safety

DeviceGestureSettings.fromWindow(
  1. FlutterView window
)

Create a new DeviceGestureSettings from the provided window.

Implementation

factory DeviceGestureSettings.fromWindow(ui.FlutterView window) {
  final double? physicalTouchSlop = window.viewConfiguration.gestureSettings.physicalTouchSlop;
  return DeviceGestureSettings(
    touchSlop: physicalTouchSlop == null ? null : physicalTouchSlop / window.devicePixelRatio
  );
}