mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[Dart/en] Fixed error in example2 (#4035)
* [Dart/en] Fixed example2 * [Dart/en] Simplify example Co-authored-by: Anton Dorozhkin <anton.dorozhkin@lamoda.ru>
This commit is contained in:
parent
f6d6a9cdae
commit
625f149739
@ -77,13 +77,11 @@ example1() {
|
|||||||
nested1();
|
nested1();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Anonymous functions don't include a name but can take number of arguments
|
/// Anonymous functions don't include a name
|
||||||
example2() {
|
example2() {
|
||||||
//// Explicit return type.
|
nested1(fn) {
|
||||||
nested1(Function<void> fn) {
|
|
||||||
fn();
|
fn();
|
||||||
}
|
}
|
||||||
|
|
||||||
nested1(() => print("Example2 nested 1"));
|
nested1(() => print("Example2 nested 1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user