text

External Documentation

RNTextElement text(

  1. String content, {
  2. Map<String, dynamic>? style,
  3. Map<String, dynamic>? props,
  4. void onPress()?,
})

Text component

Implementation

RNTextElement text(
  String content, {
  Map<String, dynamic>? style,
  Map<String, dynamic>? props,
  void Function()? onPress,
}) {
  final p = <String, dynamic>{};
  if (style != null) p['style'] = style;
  if (onPress != null) p['onPress'] = onPress;
  if (props != null) p.addAll(props);
  return RNTextElement.fromJS(rnElement('Text', props: p, child: content.toJS));
}