From 625f149739623407847752acd414ae7bc9ba8367 Mon Sep 17 00:00:00 2001 From: Anton Trekov Date: Mon, 3 Jan 2022 19:07:35 +0300 Subject: [Dart/en] Fixed error in example2 (#4035) * [Dart/en] Fixed example2 * [Dart/en] Simplify example Co-authored-by: Anton Dorozhkin --- dart.html.markdown | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'dart.html.markdown') diff --git a/dart.html.markdown b/dart.html.markdown index b215474a..37f207f5 100644 --- a/dart.html.markdown +++ b/dart.html.markdown @@ -77,13 +77,11 @@ 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 fn) { + nested1(fn) { fn(); } - nested1(() => print("Example2 nested 1")); } -- cgit v1.2.3 From 3971ad07745d5df74ac2b4efde88419f866c8f36 Mon Sep 17 00:00:00 2001 From: Stanley Modrak <44023416+smith558@users.noreply.github.com> Date: Mon, 3 Jan 2022 16:20:24 +0000 Subject: Replace deprecated links (#4174) Replace the old links which were deprecated with the new URLs they redirect to. --- dart.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dart.html.markdown') diff --git a/dart.html.markdown b/dart.html.markdown index 37f207f5..69e1623d 100644 --- a/dart.html.markdown +++ b/dart.html.markdown @@ -715,6 +715,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) -- cgit v1.2.3 From 6410aeac23a2b0f391c54d3b15dc19d1c31fe096 Mon Sep 17 00:00:00 2001 From: rosnerdev <83503879+rosnerdev@users.noreply.github.com> Date: Mon, 4 Sep 2023 09:50:19 +0300 Subject: Fixed typo --- dart.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dart.html.markdown') diff --git a/dart.html.markdown b/dart.html.markdown index 69e1623d..282f183b 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 -- cgit v1.2.3 From c5e7af574b9182b954c8e1057e65f0aaf45d8ee1 Mon Sep 17 00:00:00 2001 From: Ersin Ertan <4809853+ersin-ertan@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:51:54 -0500 Subject: Change function's function param to correct syntax (#4065) Ref: https://dart.dev/guides/language/sound-problems Co-authored-by: ven --- dart.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dart.html.markdown') diff --git a/dart.html.markdown b/dart.html.markdown index 282f183b..ab3c07d2 100644 --- a/dart.html.markdown +++ b/dart.html.markdown @@ -79,7 +79,8 @@ example1() { /// Anonymous functions don't include a name example2() { - nested1(fn) { + //// Explicit return type. + nested1(void Function() fn) { fn(); } nested1(() => print("Example2 nested 1")); -- cgit v1.2.3