summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVince Ramces V. Oliveros <blusea231@gmail.com>2020-01-16 13:52:33 +0800
committerVince Ramces V. Oliveros <blusea231@gmail.com>2020-01-16 13:52:33 +0800
commitab5a1953e77288ca27bd7b4c931d8bb2e79a9966 (patch)
tree0f1fe292fb5b7dbfb9af6f8c7c80ea2d5d42b291
parentc114dd9875834f514087fcce5d5524c05a6c7310 (diff)
add dart null aware operator
-rw-r--r--dart.html.markdown5
1 files changed, 5 insertions, 0 deletions
diff --git a/dart.html.markdown b/dart.html.markdown
index 3e6ffe09..3b94a254 100644
--- a/dart.html.markdown
+++ b/dart.html.markdown
@@ -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.