isDomElement function

bool isDomElement(
  1. dynamic instance
)

Returns whether instance is a ReactElement for a DOM node.

Implementation

bool isDomElement(dynamic instance) {
  return isValidElement(instance) &&
      (instance as ReactElement).type is String; // ignore: avoid_as
}