Skip to content

Commit

Permalink
test: added case with switch to be highlighted by other rule
Browse files Browse the repository at this point in the history
  • Loading branch information
gbassisp committed Nov 23, 2023
1 parent 1f7216a commit 9a50548
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions example/lib/counter/view/counter_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ class CounterView extends StatelessWidget {
enum AnotherTest { a, b }

class CounterText extends StatelessWidget {
bool enumIsA(AnotherTest value) {
switch (value) {
case AnotherTest.a:
return true;
// checking for default or exhaustive cases is not in our scope
// not_expect_lint: avoid_if_with_enum
default:
return false;
}
}

const CounterText({Key? key, this.deprecatedParam})
:
// this is a test case, assertions can have string on description
Expand Down

0 comments on commit 9a50548

Please sign in to comment.