Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[in_app_purchase] Migrate plugin to federated architecture #78525

Closed
8 of 9 tasks
mvanbeusekom opened this issue Mar 18, 2021 · 1 comment · Fixed by flutter/plugins#3877
Closed
8 of 9 tasks

[in_app_purchase] Migrate plugin to federated architecture #78525

mvanbeusekom opened this issue Mar 18, 2021 · 1 comment · Fixed by flutter/plugins#3877
Assignees
Labels
p: in_app_purchase Plugin for in-app purchase P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels.

Comments

@mvanbeusekom
Copy link

mvanbeusekom commented Mar 18, 2021

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;
@mvanbeusekom mvanbeusekom added plugin p: in_app_purchase Plugin for in-app purchase labels Mar 18, 2021
@stuartmorgan stuartmorgan added the P3 Issues that are less important to the Flutter project label Mar 18, 2021
@mvanbeusekom mvanbeusekom self-assigned this Apr 2, 2021
cyanglaz pushed a commit to flutter/plugins that referenced this issue May 10, 2021
Adds some improvements to the platform interface. 

1. Make `InAppPurchasePlatformAddition` a subclass of `PlatformInterface` to take advantage of the existing token checking logic. (I also consider `InAppPurchasePlatformAddition` a `PlatformInterface` because it works in a similar way.
2. Make the `instance` variable `late` as we should never access it before setter.
3. Add tests for `InAppPurchasePlatformAddition`

part of flutter/flutter#78525
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: in_app_purchase Plugin for in-app purchase P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants