There is a feature request in the Dart repository for this.
According to the issue comment you can use the third party linter "DCM" for this: https://dcm.dev/docs/rules/common/avoid-unused-parameters/