[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:
Anton Trekov 2022-01-03 19:07:35 +03:00 committed by GitHub
parent f6d6a9cdae
commit 625f149739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"));
} }