mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
add dart null aware operator
This commit is contained in:
parent
c114dd9875
commit
ab5a1953e7
@ -659,6 +659,11 @@ example33() {
|
||||
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.
|
||||
/// Nothing is expected to be executed on the outer scope before a program
|
||||
/// starts running with what's in its main function.
|
||||
|
Loading…
Reference in New Issue
Block a user