Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 706 Bytes

File metadata and controls

19 lines (11 loc) · 706 Bytes

How to Define Type Aliases in Dart

In Dart, you can use a "typedef" to define type aliases for your function and non-function types.

They make your code more concise, so you can avoid repeating long type names. 👌

Typedefs are particularly useful for functions with many arguments or complex types with generics. 👍


Found this useful? Show some love and share the original tweet 🙏


Previous Next
Use type annotations for safer code Functions as arguments (with tear-off)