getBounds method

Future<Rect> getBounds()

Returns Rect - The bounds of the window as Object.

Implementation

Future<Rect> getBounds() async {
  final Map<String, dynamic> arguments = {
    'devicePixelRatio': getDevicePixelRatio(),
  };
  final Map<dynamic, dynamic> resultData = await _channel.invokeMethod(
    'getBounds',
    arguments,
  );

  return Rect.fromLTWH(
    resultData['x'],
    resultData['y'],
    resultData['width'],
    resultData['height'],
  );
}