Text constructor

Text(
  1. Object? value, {
  2. String? className,
  3. Map<String, Object?> props = const {},
  4. Map<String, Object?> style = const {},
  5. DartStyle? dartStyle,
  6. String tag = 'span',
})

Creates a text element from value with optional dartStyle and properties.

Implementation

Text(
  Object? value, {
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
  String tag = 'span',
}) : super(
        tag,
        props: mergeComponentProps(
          props,
          className: className,
          dartStyle: dartStyle,
          style: style,
        ),
        children: [FlintText(value?.toString() ?? '')],
      );