buildCaption function
Implementation
Widget buildCaption(BuildContext context, OpenUiNode node) {
final theme = node.theme;
final slot = BlockSlot.of(context, node.element);
final subtitle = _isSubtitle(context, slot);
return _subtitleGap(
_richText(
context,
node,
node.props.string('text') ?? '',
_textStyle(
theme,
color: theme.fg(node.props['color']) ?? theme.muted,
size: subtitle
? theme.fontSizeOf('Caption.subtitle', 13)
: theme.fontSizeOf('Caption', 12),
height: subtitle ? 18 / 13 : 1.6,
),
),
subtitle,
slot,
);
}