operator >>
ReactElement
operator >>(
Adds children using the >> operator.
Supports:
String→ text childReactElement→ single element childEl→ unwrapped element childList<Object>→ multiple children (can contain strings, elements)null→ ignored (supports conditional rendering)
Implementation
ReactElement operator >>(Object? child) => switch (child) {
null => _element,
final String s => _withTextChild(s),
final List<Object?> list => _withChildren(list),
final num n => _withTextChild(n.toString()),
final El el => _withSingleChild(el._element),
final ReactElement re => _withSingleChild(re),
_ => _element,
};