getAllElements static method

void getAllElements(
  1. String listenerId,
  2. double pixRatio,
  3. int screenWidth,
  4. int screenHeight,
)

Implementation

static void getAllElements(
    String listenerId, double pixRatio, int screenWidth, int screenHeight) {
  try {
    screenHeight = (MediaQuery.of(_ctx).size.height * pixRatio).round();
    screenWidth = (MediaQuery.of(_ctx).size.width * pixRatio).round();
    List<Map<String, dynamic>> views =
      recurseKey(_ctx, pixRatio, screenWidth, screenHeight);
    plotlineChannel.invokeMethod('getAllElements',
        <String, dynamic>{"listenerId": listenerId, "elements": views});
  } catch (e) {
    debugPrint("Error in getAllElements: $e");
  }
}