positional arguments dart

The solution for “positional arguments dart” can be found here. The following code will assist you in solving the problem.

void main() {
print(fullname(“yo”, “hope you have amazing day”));
}

// this fancy [] will do the job
String fullname(String fname, String lname, [String age = ’23’]) {
return fname + lname + age;
}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in