Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 633 Bytes

File metadata and controls

21 lines (12 loc) · 633 Bytes

Functions as arguments (with tear-off)

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