diff --git a/src/content/effective-dart/style.md b/src/content/effective-dart/style.md index ceb949afca..08840fffe5 100644 --- a/src/content/effective-dart/style.md +++ b/src/content/effective-dart/style.md @@ -301,6 +301,18 @@ In contrast, top-level functions and method declarations don't have that context 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, 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