mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 21:52:31 +03: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();
|
||||
}
|
||||
|
||||
/// 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(fn) {
|
||||
fn();
|
||||
}
|
||||
|
||||
nested1(() => print("Example2 nested 1"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user