Functions are first-class citizens in Dart.
They can be passed directly as arguments, provided that the type signatures match.
This is known as a function tear-off.
Since Dart 2.15, we can use constructor tear-offs too. 👍
Found this useful? Show some love and share the original tweet 🙏
Previous | Next |
---|---|
How to define type aliases in Dart | Using build_runner in watch mode |