Dart return Statement
Dart return Statement
Syntax
Example
Returning a value from a function
For example, in the main() function, we can call the add() function to get the value.
var result;
result = add(45,27);
When a function is called, we have to pass some information as per the function prototype. The number of function parameters passed and data type while the function call must be matched with the number of parameters passed during function declaration.
The add() function has two parameters a and b.
—
Dart Tutorials
Dart tutorial on this website can be found at:
https://www.testingdocs.com/dart-tutorials-for-beginners/