deferScreenEdges static method

Future<void> deferScreenEdges(
  1. List<ScreenEdge> edges
)

Ask iOS to defer system gestures on the given edges of the screen.

Warning: It appears "deferring" the bottom screen edge does not successfully prevent a "home swipe" when the home indicator is also hidden. That is: if you need the behavior of HomeIndicator.deferScreenEdges([ScreenEdge.bottom]), then don't also call HomeIndicator.hide().

Implementation

static Future<void> deferScreenEdges(List<ScreenEdge> edges) async {
  var mask = 0;
  for (final e in edges) {
    mask |= 1 << e.index;
  }
  await _channel.invokeMethod('deferScreenEdges', mask);
}