The part of the function that comes before the curly braces is known as the function signature, as it contains vital information about the function, such as its name, parameter types, return type, and whether it is async. The function signature is used when defining abstract methods in structs.
Parameters
Required Positional
Required Named
Optional Named
Return Type
The default return type is void, though it’s better to define it explicitly. Asynchronous functions must return a promise, with the type argument being the type that the promise resolves to.