setDetent static method

Future<void> setDetent(
  1. CNSheetDetent detent
)

Moves the sheet to detent, one of the detents it was shown with. Ignored on macOS, where the inspector has no detents.

Implementation

static Future<void> setDetent(CNSheetDetent detent) async {
  if (!_shown) return;
  final index = _detents.indexOf(detent);
  if (index < 0) return;
  await _channel.invokeMethod('setDetent', {'index': index});
}