createTextNode method

  1. @override
Text? createTextNode(
  1. Object? text
)
override

Implementation

@override
Text? createTextNode(Object? text) {
  if (text == null) return null;

  if (text is Text) {
    return text;
  } else if (text is TextNode) {
    return Text(text.text);
  }

  var s = text.toString();
  if (s.isEmpty) return null;
  return Text(s);
}