Skip to content

[in_app_purchase] Unused json_annotation-generated code #183937

Open

Description

@stuartmorgan-g

Pub.dev is giving this package a score deduction due to unused generated code:

WARNING: The declaration '_$SerializedEnumsFromJson' isn't referenced.
lib/src/store_kit_wrappers/enum_converters.g.dart:9:18

  ╷
9 │ _SerializedEnums _$SerializedEnumsFromJson(Map json) => _SerializedEnums()
  │                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵

WARNING: The declaration '_$SKPaymentDiscountWrapperToJson' isn't referenced.
lib/src/store_kit_wrappers/sk_payment_queue_wrapper.g.dart:49:22

   ╷
49 │ Map<String, dynamic> _$SKPaymentDiscountWrapperToJson(
   │                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We don't catch this locally because we mostly exempt generated code from the analyzer in our repo settings; pub.dev uses standardized analysis options rather than ours.

I haven't investigated to see if this is a bug in the generation itself, or if we are generating code that we no longer need to. It may very well be the latter since we used to use JSON for platform channel communication, and now use Pigeon instead.

This doesn't actually matter for production, due to tree shaking; investigating this would be purely for pub.dev score.

Activity

  1. added
    platform-iosiOS applications specifically
    packageflutter/packages repository. See also p: labels.
    team-iosOwned by iOS platform team
    on Mar 20, 2026
  2. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    c: tech-debtTechnical debt, code quality, testing, etc.
    on Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.p: in_app_purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions