diff options
author | Boris Verkhovskiy <boris.verk@gmail.com> | 2024-04-04 04:26:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 04:26:14 -0700 |
commit | 4d59048f0df8441e5ad2c2c440e8d54b0e9c11b6 (patch) | |
tree | fa2dbdd40da35b3c27f928f1112ea43193a7482e /dart.html.markdown | |
parent | b38d4437120e700646a45dff68b7c4ff3f7109c0 (diff) | |
parent | 327001f58739489b41f6b1f7bbc8be900847b381 (diff) |
Merge branch 'master' into patch-2
Diffstat (limited to 'dart.html.markdown')
-rw-r--r-- | dart.html.markdown | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/dart.html.markdown b/dart.html.markdown index b215474a..ab3c07d2 100644 --- a/dart.html.markdown +++ b/dart.html.markdown @@ -45,7 +45,7 @@ const CONSTANT_VALUE = "I CANNOT CHANGE"; CONSTANT_VALUE = "DID I?"; //Error /// Final is another variable declaration that cannot be change once it has been instantiated. Commonly used in classes and functions /// `final` can be declared in pascalCase. -final finalValue = "value cannot be change once instantiated"; +final finalValue = "value cannot be changed once instantiated"; finalValue = "Seems not"; //Error /// `var` is another variable declaration that is mutable and can change its value. Dart will infer types and will not change its data type @@ -77,13 +77,12 @@ example1() { nested1(); } -/// Anonymous functions don't include a name but can take number of arguments +/// Anonymous functions don't include a name example2() { //// Explicit return type. - nested1(Function<void> fn) { + nested1(void Function() fn) { fn(); } - nested1(() => print("Example2 nested 1")); } @@ -717,6 +716,6 @@ main() { ## Further Reading Dart has a comprehensive web-site. It covers API reference, tutorials, articles and more, including a -useful Try Dart online. -[https://www.dartlang.org](https://www.dartlang.org) -[https://try.dartlang.org](https://try.dartlang.org) +useful DartPad (a cloud-based Dart coding playground). +[https://dart.dev/](https://dart.dev) +[https://dartpad.dev/](https://dartpad.dev) |