This is the best course i found on List Set and Maps. Thank you so much
@t_tek760
2 жыл бұрын
Aside from teaching programming… I think there’s a part of you that belongs to radio presentation… omg! your voice is more than sonorous.. it’s so sweet to listen to.. I just found this channel.. the subscribe button has since then been hit.
@databutfun7166
3 жыл бұрын
bro , you saved my life fr
@henrytuxdev1331
2 жыл бұрын
As of Dart 2.18.0, var ipAddress = user['ipAddress'] as String; if (ipAddress == null) { print('The value is empty'); } else { print(ipAddress.length); } // TypeError will be triggered Since "as" casts to a non-nullable type: value as String, and it raises an exception if value is null, the workaround I found to follow this video was to use the null-aware access operator for the type String instead i.e. String? var ipAddress = user['ipAddress'] as String?; if (ipAddress == null) { print('The value is empty'); } else { print(ipAddress.length); } // OK Quick check -> print("$ipAddress, ${ipAddress is String}, ${ipAddress == null}");
Пікірлер: 11