Skip to content

[in_app_purchase] Migrate plugin to federated architecture #78525

@mvanbeusekom

Description

@mvanbeusekom

Use case

Migrate the "in_app_purchase" package to the federated plugin architecture. This would result in the following benefits:

  1. Makes it easier to add support for additional platforms (there is already a concrete use case for macOS, but Linux and Windows are also potential candidates);
  2. The federated architecture also makes it easier to write automated tests and guard the API;
  3. Confirms to the architecture of most other Flutter plugins, making it easier for developers to understand the project layout and contribute to the project.

Proposal

To migrate the in_app_purchase package to federated architecture we should take the following steps:

  • Move the in_app_purchase into its own subdirectory ("in_app_purchase/in_app_purchase");
  • Create the in_app_purchase_platform_interface package;
    • Copy the LICENSE file from the in_app_purchase package;
    • Add a CHANGELOG.md file;
    • Define a pubspec.yaml file;
    • Create a README.md file;
    • Define the platform interface in in_app_purchase_platform.dart;
    • Implement the default implementation in method_channel_in_app_purchase.dart;
  • Refactor package in_app_purchase to use the in_app_purchase platform interface;

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectp: in_app_purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions