I'm learning Dart after coming from Python and I wanted to know what is the closest Dart has to using a non-Boolean variable as a Boolean in conditional statements. Like using a string where an empty string is false and a non-empty string is true.
For example, in Python:
name = 'Yes'
print('True' if name else 'False') // 'True'
name2 = ''
print('True' if name else 'False') // 'False'
Does Dart have something similar without having to convert the variable to a Boolean statement?