Skip to content

Commit c350f56

Browse files
authored
[jni] Update to latest lints (#2403)
1 parent 6cba347 commit c350f56

File tree

16 files changed

+23
-18
lines changed

16 files changed

+23
-18
lines changed

pkgs/jni/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.14.3-wip
2+
3+
- Update to the latest lints.
4+
15
## 0.14.2
26

37
- Fixed a bug where certain method of `JList`, `JSet`, and `JMap` did not work

pkgs/jni/example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class Example {
150150
}
151151

152152
class MyApp extends StatefulWidget {
153-
const MyApp(this.examples, {Key? key}) : super(key: key);
153+
const MyApp(this.examples, {super.key});
154154
final List<Example> examples;
155155

156156
@override
@@ -182,7 +182,7 @@ class _MyAppState extends State<MyApp> {
182182
}
183183

184184
class ExampleCard extends StatefulWidget {
185-
const ExampleCard(this.example, {Key? key}) : super(key: key);
185+
const ExampleCard(this.example, {super.key});
186186
final Example example;
187187

188188
@override

pkgs/jni/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dev_dependencies:
5656
# activated in the `analysis_options.yaml` file located at the root of your
5757
# package. See that file for information about deactivating specific lint
5858
# rules and activating additional ones.
59-
flutter_lints: ^2.0.0
59+
flutter_lints: ^6.0.0
6060

6161
# For information on the generic Dart part of this file, see the
6262
# following page: https://dart.dev/tools/pub/pubspec

pkgs/jni/lib/src/util/jlist.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class JList<$E extends JObject?> extends JObject with ListMixin<$E> {
206206
_class.instanceMethodId(r'subList', r'(II)Ljava/util/List;');
207207
@override
208208
JList<$E> getRange(int start, int end) {
209-
RangeError.checkValidRange(start, end, this.length);
209+
RangeError.checkValidRange(start, end, length);
210210
return _getRangeId(
211211
this, JListType<$E>(E), [JValueInt(start), JValueInt(end)])!;
212212
}
@@ -271,9 +271,9 @@ class JList<$E extends JObject?> extends JObject with ListMixin<$E> {
271271
@override
272272
int lastIndexOf(Object? element, [int? start]) {
273273
if (element is! JObject?) return -1;
274-
if (start == null || start >= this.length) start = this.length - 1;
274+
if (start == null || start >= length) start = length - 1;
275275
final elementRef = element?.reference ?? jNullReference;
276-
if (start == this.length - 1) {
276+
if (start == length - 1) {
277277
return _lastIndexOfId(this, const jintType(), [elementRef.pointer]);
278278
}
279279
final range = getRange(0, start);

pkgs/jni/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: jni
66
description: A library to access JNI from Dart and Flutter that acts as a support library for package:jnigen.
7-
version: 0.14.2
7+
version: 0.14.3-wip
88
repository: https://github.com/dart-lang/native/tree/main/pkgs/jni
99
issue_tracker: https://github.com/dart-lang/native/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Ajni
1010

@@ -28,7 +28,7 @@ dependencies:
2828
plugin_platform_interface: ^2.1.8
2929

3030
dev_dependencies:
31-
dart_flutter_team_lints: ^3.2.0
31+
dart_flutter_team_lints: ^3.5.2
3232
## Pin ffigen version because we are depending on internal APIs.
3333
ffigen: 16.1.0
3434
logging: ^1.2.0

pkgs/jnigen/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 0.15.0-wip
22

33
- **Breaking Change**: Removed `exclude` from config.
4+
- Update to the latest lints.
45

56
## 0.14.2
67

pkgs/jnigen/android_test_runner/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ dev_dependencies:
5050
# activated in the `analysis_options.yaml` file located at the root of your
5151
# package. See that file for information about deactivating specific lint
5252
# rules and activating additional ones.
53-
flutter_lints: ^3.0.2
53+
flutter_lints: ^6.0.0
5454

5555
# For information on the generic Dart part of this file, see the
5656
# following page: https://dart.dev/tools/pub/pubspec

pkgs/jnigen/example/in_app_java/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dev_dependencies:
2626
jnigen:
2727
path: ../../
2828

29-
flutter_lints: ^3.0.2
29+
flutter_lints: ^6.0.0
3030

3131
flutter:
3232

pkgs/jnigen/example/kotlin_plugin/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dev_dependencies:
2222
flutter_test:
2323
sdk: flutter
2424

25-
flutter_lints: ^3.0.2
25+
flutter_lints: ^6.0.0
2626

2727
flutter:
2828
uses-material-design: true

pkgs/jnigen/example/kotlin_plugin/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies:
2020
dev_dependencies:
2121
flutter_test:
2222
sdk: flutter
23-
flutter_lints: ^3.0.2
23+
flutter_lints: ^6.0.0
2424
jnigen:
2525
path: ../../
2626

0 commit comments

Comments
 (0)