$if static method
Implementation
static Tag $if(
String condition, {
List<Tag> then = const [],
List<Tag> otherwise = const [],
}) {
return $JinjaBody(
commandUp: 'if $condition',
children: [
...then,
if (otherwise.isNotEmpty) ...[
$Jinja('else'),
...otherwise,
]
],
commandDown: 'endif',
);
}