getDisplayLayout method

Future<List<DisplayLayout>> getDisplayLayout()

Requests the layout info for all displays. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. |callback|: The callback to invoke with the results.

Implementation

Future<List<DisplayLayout>> getDisplayLayout() async {
  var $res = await promiseToFuture<JSArray>(
      $js.chrome.system.display.getDisplayLayout());
  return $res.toDart
      .cast<$js.DisplayLayout>()
      .map((e) => DisplayLayout.fromJS(e))
      .toList();
}