I have an API call that returns a null value and I want to handle it in the Text
widget, if the value is null, return and empty string like this ''
or and empty Text widget like this Text('')
, if the text is not null, return the widget as it is.
Text('FLIGHT ${data.locations.pickup.flightInfo.flightNumber}' ?? ''),
I just check it inside the Text widget like in the code above, is this not the correct approach? Thanks in advance for the help!