Anatomy of Dart Functions
on Saturday, 18th of July, 2020
Functions look familiar in Dart if you're coming from any C-like language. The anatomy of a function is pretty straightforward:
String makeGreeting(String name) {
return 'Hello, $name';
}The first line in the function is the signature. It defines the return type of the function, the function name, and lists all arguments the function requires or accepts.
The function sig
- previous: Values and variables