0

If a Text("This is a very big string of text") does not fit on the screen, how can I instead show a different and smaller Text() widget?

EDIT: For clarification. What I want is, if a widget overflows, to show a different widget, doesn't have to be limited to text.

Thanks.

1 Answers1

-1

You can try this

(showDifferentText ? Text("Different text") : Text("This is a very big string of text"))

Here showDifferentText is bool.

Brutal
  • 798
  • 1
  • 14
  • 37