screenOf function

({double h, double w})? screenOf(
  1. Map<String, Object?> reply
)

The app's frame size in a runner /tree reply, which is the screen in logical points.

Implementation

({double w, double h})? screenOf(Map<String, Object?> reply) {
  final app = reply['app'];
  final f = app is Map ? app['frame'] : null;
  if (f is! List || f.length != 4) return null;
  return (w: (f[2] as num).toDouble(), h: (f[3] as num).toDouble());
}