Named Parameters
Named parameters are optional unless they're explicitly marked as
required
.When defining a function, use
{param1, param2, …}
to specify named parameters. If you don't provide a default value or mark a named parameter asrequired
, their types must be nullable as their default value will benull
:dart
/// Sets the [bold] and [hidden] flags ... void enableFlags({bool? bold, bool? hidden}) {...}