© Sanjib Sinha 2020
S. SinhaQuick Start Guide to Dart Programminghttps://doi.org/10.1007/978-1-4842-5562-9_6

6. Anonymous Functions

Sanjib Sinha1 
(1)
Howrah, West Bengal, India
 

In Dart, most of the functions we have seen so far are named functions, which are similar to functions in languages like C# and Java. Still, the function syntax of Dart has more similarities with JavaScript than in many strongly typed languages like C# or Java.

Because in Dart everything is object, a function is also an object; this means we can store it in a variable and use it anywhere in our application. The advantage of Dart is we that can pass a function like any other type, such as string, integer, etc. These features are greatly enhanced when the functions have no names ...

Get Quick Start Guide to Dart Programming: Create High-Performance Applications for the Web and Mobile now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.