writeIfNonEmpty method

void writeIfNonEmpty(
  1. Object idOrText, {
  2. TextStyle? style,
  3. GestureRecognizer? onGesture,
})

Implementation

void writeIfNonEmpty(Object idOrText, {
  TextStyle? style,
  GestureRecognizer? onGesture
}) {
  if(isNotEmpty) {
    final text = theme.translate(text: idOrText);
    spans.add(TextSpan(text: text, style: style, recognizer: onGesture));
  }
}