Instructor: Apart from parameters that are required, functions or methods in Dart can also specify optional parameters. These come in two flavors, positioning and named. The required parameters are listed first, followed by any of the optional parameters. Optional positional parameters are defined inside opening and closing square brackets, separated by commas.
The exclaim parameter defaults to null. Let's specify a default Boolean, and add another parameter. Optional named parameters are defined inside opening and closing curly brackets.
Using optional named parameters will help you define functions and methods that are self-documenting. Here's how you would use these in a case of methods. Let's invoke our method. Let's refactor our method example with named parameters, update the method call, run again.