compileScreen method
Implementation
IrScreen compileScreen(String name, DartValue tree, String? source) {
final ctx = _Ctx(
box: const _Box(forceW: true, forceH: true),
text: theme.textStyle('bodyMedium')!,
iconColor: theme.color('onSurfaceVariant'),
);
final node = _widget(tree, ctx);
final IrFrame root;
if (node is IrFrame) {
root = node;
} else {
root = IrFrame(name: name, children: [node]);
}
root
..name = name
..role = 'screen'
..width = IrSizing.fixed(screenWidth)
..height = IrSizing.fixed(screenHeight)
..clip = true;
return IrScreen(
name: name,
width: screenWidth,
height: screenHeight,
source: source,
root: _sanitize(simplify(root)) as IrFrame,
);
}