buildImplicitViewProbe static method
dpr/vw/vh from the implicit view — needs no inspector selection, so it works on any root widget and before the first addressable node renders.
Implementation
static String buildImplicitViewProbe() {
final body = [
"'{\"dpr\":'",
'$_implicitView.devicePixelRatio.toString()',
"',\"vw\":'",
'($_implicitView.physicalSize.width / $_implicitView.devicePixelRatio).toString()',
"',\"vh\":'",
'($_implicitView.physicalSize.height / $_implicitView.devicePixelRatio).toString()',
"'}'",
].join(' + ');
return body;
}