Skip to content

Commit 69f4c3f

Browse files
committed
Added use_nearest_context function test
1 parent 4f4ff18 commit 69f4c3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lint_test/use_nearest_context_test.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore_for_file: avoid_unused_parameters
1+
// ignore_for_file: avoid_unused_parameters, unused_local_variable
22
import 'package:flutter/material.dart';
33

44
/// Check the `use_nearest_context` rule
@@ -21,6 +21,11 @@ void showDialog(BuildContext context) {
2121
},
2222
);
2323

24+
final fun = ({required BuildContext context}) {
25+
/// expect_lint: use_nearest_context
26+
outerContext.mounted;
27+
};
28+
2429
showModalBottomSheet(
2530
context: context,
2631
builder: (_) {

0 commit comments

Comments
 (0)