check if string is null flutter code example
Example 1: dart string empty or null
Testing empty or null, use Dart's safe navigation
if (mystring?.isEmpty ?? true) {
//
}
Example 2: flutter check if null
var value = maybeSomeNumber();
if (value != null) {
doSomething();
}