isDOMBuilderDirectHelper function

bool isDOMBuilderDirectHelper(
  1. Object? f
)

Returns true if f is a DOM Builder helper, like $div and $br.

Note: A direct helper is only for tags that don't need parameters to be valid.

Implementation

bool isDOMBuilderDirectHelper(Object? f) {
  if (f == null || f is! Function) return false;

  return identical(f, $br) ||
      identical(f, $p) ||
      identical(f, $a) ||
      identical(f, $nbsp) ||
      identical(f, $div) ||
      identical(f, $divInline) ||
      identical(f, $img) ||
      identical(f, $hr) ||
      identical(f, $form) ||
      identical(f, $nav) ||
      identical(f, $header) ||
      identical(f, $footer) ||
      identical(f, $span) ||
      identical(f, $button) ||
      identical(f, $label) ||
      identical(f, $textarea) ||
      identical(f, $input) ||
      identical(f, $select) ||
      identical(f, $option) ||
      identical(f, $table) ||
      identical(f, $tbody) ||
      identical(f, $thead) ||
      identical(f, $tfoot) ||
      identical(f, $td) ||
      identical(f, $th) ||
      identical(f, $tr) ||
      identical(f, $caption);
}