[jni] Update to latest lints (#2403)

diff --git a/pkgs/jni/CHANGELOG.md b/pkgs/jni/CHANGELOG.md
index 5b1481b..655221f 100644
--- a/pkgs/jni/CHANGELOG.md
+++ b/pkgs/jni/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.14.3-wip
+
+- Update to the latest lints.
+
 ## 0.14.2
 
 - Fixed a bug where certain method of `JList`, `JSet`, and `JMap` did not work
diff --git a/pkgs/jni/example/lib/main.dart b/pkgs/jni/example/lib/main.dart
index 8149a97..8d86367 100644
--- a/pkgs/jni/example/lib/main.dart
+++ b/pkgs/jni/example/lib/main.dart
@@ -150,7 +150,7 @@
 }
 
 class MyApp extends StatefulWidget {
-  const MyApp(this.examples, {Key? key}) : super(key: key);
+  const MyApp(this.examples, {super.key});
   final List<Example> examples;
 
   @override
@@ -182,7 +182,7 @@
 }
 
 class ExampleCard extends StatefulWidget {
-  const ExampleCard(this.example, {Key? key}) : super(key: key);
+  const ExampleCard(this.example, {super.key});
   final Example example;
 
   @override
diff --git a/pkgs/jni/example/pubspec.yaml b/pkgs/jni/example/pubspec.yaml
index ce06464..dec9bdd 100644
--- a/pkgs/jni/example/pubspec.yaml
+++ b/pkgs/jni/example/pubspec.yaml
@@ -56,7 +56,7 @@
   # activated in the `analysis_options.yaml` file located at the root of your
   # package. See that file for information about deactivating specific lint
   # rules and activating additional ones.
-  flutter_lints: ^2.0.0
+  flutter_lints: ^6.0.0
 
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
diff --git a/pkgs/jni/lib/src/util/jlist.dart b/pkgs/jni/lib/src/util/jlist.dart
index 8c0054c..673723d 100644
--- a/pkgs/jni/lib/src/util/jlist.dart
+++ b/pkgs/jni/lib/src/util/jlist.dart
@@ -206,7 +206,7 @@
       _class.instanceMethodId(r'subList', r'(II)Ljava/util/List;');
   @override
   JList<$E> getRange(int start, int end) {
-    RangeError.checkValidRange(start, end, this.length);
+    RangeError.checkValidRange(start, end, length);
     return _getRangeId(
         this, JListType<$E>(E), [JValueInt(start), JValueInt(end)])!;
   }
@@ -271,9 +271,9 @@
   @override
   int lastIndexOf(Object? element, [int? start]) {
     if (element is! JObject?) return -1;
-    if (start == null || start >= this.length) start = this.length - 1;
+    if (start == null || start >= length) start = length - 1;
     final elementRef = element?.reference ?? jNullReference;
-    if (start == this.length - 1) {
+    if (start == length - 1) {
       return _lastIndexOfId(this, const jintType(), [elementRef.pointer]);
     }
     final range = getRange(0, start);
diff --git a/pkgs/jni/pubspec.yaml b/pkgs/jni/pubspec.yaml
index a7a40e8..a4baace 100644
--- a/pkgs/jni/pubspec.yaml
+++ b/pkgs/jni/pubspec.yaml
@@ -4,7 +4,7 @@
 
 name: jni
 description: A library to access JNI from Dart and Flutter that acts as a support library for package:jnigen.
-version: 0.14.2
+version: 0.14.3-wip
 repository: https://github.com/dart-lang/native/tree/main/pkgs/jni
 issue_tracker: https://github.com/dart-lang/native/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Ajni
 
@@ -28,7 +28,7 @@
   plugin_platform_interface: ^2.1.8
 
 dev_dependencies:
-  dart_flutter_team_lints: ^3.2.0
+  dart_flutter_team_lints: ^3.5.2
   ## Pin ffigen version because we are depending on internal APIs.
   ffigen: 16.1.0
   logging: ^1.2.0
diff --git a/pkgs/jnigen/CHANGELOG.md b/pkgs/jnigen/CHANGELOG.md
index 3d95144..c6ef581 100644
--- a/pkgs/jnigen/CHANGELOG.md
+++ b/pkgs/jnigen/CHANGELOG.md
@@ -1,6 +1,7 @@
 ## 0.15.0-wip
 
 - **Breaking Change**: Removed `exclude` from config.
+- Update to the latest lints.
 
 ## 0.14.2
 
diff --git a/pkgs/jnigen/android_test_runner/pubspec.yaml b/pkgs/jnigen/android_test_runner/pubspec.yaml
index 5a22fa2..e42a252 100644
--- a/pkgs/jnigen/android_test_runner/pubspec.yaml
+++ b/pkgs/jnigen/android_test_runner/pubspec.yaml
@@ -50,7 +50,7 @@
   # activated in the `analysis_options.yaml` file located at the root of your
   # package. See that file for information about deactivating specific lint
   # rules and activating additional ones.
-  flutter_lints: ^3.0.2
+  flutter_lints: ^6.0.0
 
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
diff --git a/pkgs/jnigen/example/in_app_java/pubspec.yaml b/pkgs/jnigen/example/in_app_java/pubspec.yaml
index 2ed905e..e09b6dc 100644
--- a/pkgs/jnigen/example/in_app_java/pubspec.yaml
+++ b/pkgs/jnigen/example/in_app_java/pubspec.yaml
@@ -26,7 +26,7 @@
   jnigen:
     path: ../../
 
-  flutter_lints: ^3.0.2
+  flutter_lints: ^6.0.0
 
 flutter:
 
diff --git a/pkgs/jnigen/example/kotlin_plugin/example/pubspec.yaml b/pkgs/jnigen/example/kotlin_plugin/example/pubspec.yaml
index 9ac6ed3..de00750 100644
--- a/pkgs/jnigen/example/kotlin_plugin/example/pubspec.yaml
+++ b/pkgs/jnigen/example/kotlin_plugin/example/pubspec.yaml
@@ -22,7 +22,7 @@
   flutter_test:
     sdk: flutter
 
-  flutter_lints: ^3.0.2
+  flutter_lints: ^6.0.0
 
 flutter:
   uses-material-design: true
diff --git a/pkgs/jnigen/example/kotlin_plugin/pubspec.yaml b/pkgs/jnigen/example/kotlin_plugin/pubspec.yaml
index a5c2a6e..e3b8037 100644
--- a/pkgs/jnigen/example/kotlin_plugin/pubspec.yaml
+++ b/pkgs/jnigen/example/kotlin_plugin/pubspec.yaml
@@ -20,7 +20,7 @@
 dev_dependencies:
   flutter_test:
     sdk: flutter
-  flutter_lints: ^3.0.2
+  flutter_lints: ^6.0.0
   jnigen:
     path: ../../
 
diff --git a/pkgs/jnigen/example/notification_plugin/example/pubspec.yaml b/pkgs/jnigen/example/notification_plugin/example/pubspec.yaml
index 6647b5d..ac8dc36 100644
--- a/pkgs/jnigen/example/notification_plugin/example/pubspec.yaml
+++ b/pkgs/jnigen/example/notification_plugin/example/pubspec.yaml
@@ -44,7 +44,7 @@
   # activated in the `analysis_options.yaml` file located at the root of your
   # package. See that file for information about deactivating specific lint
   # rules and activating additional ones.
-  flutter_lints: ^3.0.2
+  flutter_lints: ^6.0.0
 
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
diff --git a/pkgs/jnigen/example/notification_plugin/pubspec.yaml b/pkgs/jnigen/example/notification_plugin/pubspec.yaml
index 093c41a..e2291bd 100644
--- a/pkgs/jnigen/example/notification_plugin/pubspec.yaml
+++ b/pkgs/jnigen/example/notification_plugin/pubspec.yaml
@@ -20,7 +20,7 @@
     path: ../../
   flutter_test:
     sdk: flutter
-  flutter_lints: ^3.0.2
+  flutter_lints: ^6.0.0
 
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
diff --git a/pkgs/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml b/pkgs/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml
index 1e088b6..b6c9b17 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml
+++ b/pkgs/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml
@@ -15,5 +15,5 @@
     path: ../
 
 dev_dependencies:
-  lints: ^3.0.0
+  lints: ^6.0.0
   test: ^1.16.0
diff --git a/pkgs/jnigen/example/pdfbox_plugin/example/pubspec.yaml b/pkgs/jnigen/example/pdfbox_plugin/example/pubspec.yaml
index 2bb6954..e0a40c1 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/example/pubspec.yaml
+++ b/pkgs/jnigen/example/pdfbox_plugin/example/pubspec.yaml
@@ -54,7 +54,7 @@
   # activated in the `analysis_options.yaml` file located at the root of your
   # package. See that file for information about deactivating specific lint
   # rules and activating additional ones.
-  flutter_lints: ^3.0.2
+  flutter_lints: ^6.0.0
 
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
diff --git a/pkgs/jnigen/example/pdfbox_plugin/pubspec.yaml b/pkgs/jnigen/example/pdfbox_plugin/pubspec.yaml
index fa26264..7fe79b0 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/pubspec.yaml
+++ b/pkgs/jnigen/example/pdfbox_plugin/pubspec.yaml
@@ -21,7 +21,7 @@
   jnigen:
     path: ../../
   test: any
-  lints: ^3.0.0
+  lints: ^6.0.0
 
 flutter:
   # A JNI plugin uses FFI for calling into C code. Thus the relevant shared
diff --git a/pkgs/jnigen/pubspec.yaml b/pkgs/jnigen/pubspec.yaml
index a1a5381..cd2dd31 100644
--- a/pkgs/jnigen/pubspec.yaml
+++ b/pkgs/jnigen/pubspec.yaml
@@ -33,7 +33,7 @@
 
 dev_dependencies:
   build_runner: ^2.4.12
-  dart_flutter_team_lints: ^3.2.0
+  dart_flutter_team_lints: ^3.5.2
   jni: ^0.13.0
   json_serializable: ^6.8.0
   test: ^1.25.8