add dart null aware operator

This commit is contained in:
Vince Ramces V. Oliveros 2020-01-16 13:52:33 +08:00
parent c114dd9875
commit ab5a1953e7

View File

@ -659,6 +659,11 @@ example33() {
findVolume33(10,20);//valid findVolume33(10,20);//valid
} }
/// Dart has also added feature such as Null aware operators
var isBool = true;
var hasString = isBool ?? "default String";
var hasValue ??= "default Value";
/// Programs have only one entry point in the main function. /// Programs have only one entry point in the main function.
/// Nothing is expected to be executed on the outer scope before a program /// Nothing is expected to be executed on the outer scope before a program
/// starts running with what's in its main function. /// starts running with what's in its main function.