Skip to content

Commit bbc7da4

Browse files
authored
[go_router_builder] [in_app_purchase_storekit] Removes redundant arguments from annotations (#9964)
It was found, at the issue below, a false-negative for the `avoid_redundant_argument_values` lint where it wasn't triggered for annotations. This PR simply removes the redundant arguments. - dart-lang/sdk#61456 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent a7a5ec8 commit bbc7da4

File tree

11 files changed

+33
-26
lines changed

11 files changed

+33
-26
lines changed

packages/go_router_builder/test_inputs/shell_route_data.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,15 @@
44

55
import 'package:go_router/go_router.dart';
66

7-
@TypedShellRoute<ShellRouteNoConstConstructor>(
8-
routes: <TypedRoute<RouteData>>[],
9-
)
7+
@TypedShellRoute<ShellRouteNoConstConstructor>()
108
class ShellRouteNoConstConstructor extends ShellRouteData {}
119

12-
@TypedShellRoute<ShellRouteWithConstConstructor>(
13-
routes: <TypedRoute<RouteData>>[],
14-
)
10+
@TypedShellRoute<ShellRouteWithConstConstructor>()
1511
class ShellRouteWithConstConstructor extends ShellRouteData {
1612
const ShellRouteWithConstConstructor();
1713
}
1814

19-
@TypedShellRoute<ShellRouteWithRestorationScopeId>(
20-
routes: <TypedRoute<RouteData>>[],
21-
)
15+
@TypedShellRoute<ShellRouteWithRestorationScopeId>()
2216
class ShellRouteWithRestorationScopeId extends ShellRouteData {
2317
const ShellRouteWithRestorationScopeId();
2418

packages/go_router_builder/test_inputs/shell_route_data_without_unnamed_constructor.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
import 'package:go_router/go_router.dart';
66

7-
@TypedShellRoute<ShellRouteWithoutUnnamedConstructor>(
8-
routes: <TypedRoute<RouteData>>[],
9-
)
7+
@TypedShellRoute<ShellRouteWithoutUnnamedConstructor>()
108
class ShellRouteWithoutUnnamedConstructor extends ShellRouteData {
119
const ShellRouteWithoutUnnamedConstructor.namedConstructor();
1210
}

packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.5
2+
3+
* Makes `SKError.userInfo` key non-nullable to comply with json serialization requirements.
4+
15
## 0.4.4+1
26

37
* Removes code for versions of iOS older than 13.0.

packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/enum_converters.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ class _SerializedEnums {
121121
late SKPaymentTransactionStateWrapper response;
122122
late SKSubscriptionPeriodUnit unit;
123123
late SKProductDiscountPaymentMode discountPaymentMode;
124+
late SKProductDiscountType discountType;
124125
}
125126

126127
/// Serializer for [SKProductDiscountType].

packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/enum_converters.g.dart

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_payment_queue_wrapper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class SKError {
378378
///
379379
/// Any key of the map must be a valid [NSErrorUserInfoKey](https://developer.apple.com/documentation/foundation/nserroruserinfokey?language=objc).
380380
@JsonKey(defaultValue: <String, dynamic>{})
381-
final Map<String?, Object?>? userInfo;
381+
final Map<String, Object?>? userInfo;
382382

383383
@override
384384
bool operator ==(Object other) {

packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_payment_queue_wrapper.g.dart

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_payment_transaction_wrappers.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_product_wrapper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class SKProductDiscountWrapper {
384384
/// A string used to uniquely identify a discount offer for a product.
385385
///
386386
/// You set up offers and their identifiers in App Store Connect.
387-
@JsonKey(defaultValue: null)
387+
@JsonKey()
388388
final String? identifier;
389389

390390
/// Values representing the types of discount offers an app can present.

packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_product_wrapper.g.dart

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)