getInfo method

Future<List<DisplayUnitInfo>> getInfo(
  1. GetInfoFlags? flags
)

Requests the information for all attached display devices. |flags|: Options affecting how the information is returned. |callback|: The callback to invoke with the results.

Implementation

Future<List<DisplayUnitInfo>> getInfo(GetInfoFlags? flags) async {
  var $res = await promiseToFuture<JSArray>(
      $js.chrome.system.display.getInfo(flags?.toJS));
  return $res.toDart
      .cast<$js.DisplayUnitInfo>()
      .map((e) => DisplayUnitInfo.fromJS(e))
      .toList();
}