Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryaBelanger authored Feb 21, 2025
1 parent 979deb5 commit 5e07f1c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/content/effective-dart/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,17 @@ so their parameters must be named so that it's clear what each parameter is for,
even if it isn't used.

:::version-note
Since Dart 3.7 `_` no longer creates a variable, so you can use `_` for
multiple parameters simultaneously without name collision:
Since Dart 3.7, the [wildcard variable `_`][] no longer creates a variable, so you can
use `_` for multiple parameters simultaneously without name collision:

```dart tag=good
(_, _) {
print('error');
}
```
:::

[wildcard variable `_`]: /language/variables#wildcard-variables

### DON'T use a leading underscore for identifiers that aren't private

Expand Down

0 comments on commit 5e07f1c

Please sign in to comment.