getAllElements static method
void
getAllElements(
- String listenerId,
- double pixRatio,
- int screenWidth,
- int screenHeight,
)
Implementation
static void getAllElements(
String listenerId, double pixRatio, int screenWidth, int screenHeight) {
try {
plotlineDebugLog("getAllElements called with listenerId: $listenerId, pixRatio: $pixRatio, screenWidth: $screenWidth, screenHeight: $screenHeight");
screenHeight = (MediaQuery.of(_ctx).size.height * pixRatio).round();
screenWidth = (MediaQuery.of(_ctx).size.width * pixRatio).round();
plotlineDebugLog("getAllElements screenHeight: $screenHeight, screenWidth: $screenWidth");
List<Map<String, dynamic>> views =
recurseKey(_ctx, pixRatio, screenWidth, screenHeight);
if (shouldEnableDebug) {
BuildContext buildContext = _ctx;
plotlineDebugLog("getAllElements BuildContext Mounted: ${buildContext.mounted} ${buildContext.widget.runtimeType}");
if (buildContext.mounted) {
plotlineDebugLog(
"getAllElements Details about the context: $buildContext, description: ${buildContext
.describeElement("")}, ownership: ${buildContext
.describeOwnershipChain("")}, size: ${buildContext.size}");
}
}
plotlineDebugLog("getAllElements found elements: ${views.length}");
plotlineChannel.invokeMethod('getAllElements',
<String, dynamic>{"listenerId": listenerId, "elements": views});
} catch (e) {
plotlineDebugLog("getAllElements error: $e");
}
}