Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[camerax] Ignore new
unreachable_switch_default
warning. (flutter#7592
) The Dart analyzer will soon be changed so that if the `default` clause of a `switch` statement is determined to be unreachable by the exhaustiveness checker, a new warning of type `unreachable_switch_default` will be issued. This parallels the behavior of the existing `unreachable_switch_case` warning, which is issued whenever a `case` clause of a `switch` statement is determined to be unreachable. In the vast majority of cases, the most reasonable way to address the warning is to remove the unreachable `default` clause. However, in a few rare cases, it makes sense to keep the `default` clause, because it's intentionally future-proofing the code in case new possible values are added to the enum being switched on. Three of these rare cases crop up in the camerax package. This change adds `ignore` comments to avoid a spurious warning.
- Loading branch information