-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[in_app_purchase] Add currencySymbol to ProductDetails #4115
[in_app_purchase] Add currencySymbol to ProductDetails #4115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@stuartmorgan The publishable task fails because it is a breaking change and that is strongly discouraged. |
Yes, that's flutter/flutter#85391
Can you elaborate on what that means? If you're just referring to the type of the accessor you could mask that by defaulting it to
This is inconsistent with the statement above. Either this class ends up as part of the public interface of the app-facing packages, in which case this is by definition not true because literally anyone could be using this interface, or it's not, in which case the details of the class are not relevant to clients. |
Indeed, I meant that it is required in the constructor, but by adding a default it is not required. I'll make it optional that way.
In the app you (normally) only read the ProductDetails objects and you don't create them, so for reading them it is not breaking. But indeed it is possible to create them as well, so it would be a breaking change for the app facing packages. |
This pull request is not suitable for automatic merging in its current state.
|
packages/in_app_purchase/in_app_purchase_platform_interface/lib/src/types/product_details.dart
Outdated
Show resolved
Hide resolved
Co-authored-by: Maurits van Beusekom <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* upstream_master: (40 commits) [image_picker] Image picker fix camera device (flutter#3898) [flutter_plugin_tools] Improve license-check output (flutter#4154) [webview_flutter] Fix broken keyboard issue link (flutter#3266) [flutter_plugin_tools] Support format on Windows (flutter#4150) [flutter_plugin_tools] Make unit tests pass on Windows (flutter#4149) [image_picker_for_web] Migrate image_picker to package:cross_file (flutter#4083) [various] Prepare plugin repo for binding API improvements (flutter#4148) [quick_actions] Add const constructor (flutter#4131) [in_app_purchase] Add iOS currency symbol to ProductDetails (flutter#4144) [in_app_purchase] Added priceCurrencySymbol to SkuDetailsWrapper (flutter#4114) [image_picker_platform_interface] Add methods that return package:cross_file (flutter#4072) [flutter_plugin_tools] Improve and test 'format' (flutter#4145) [flutter_plugin_tools] Only check target packages in analyze (flutter#4146) [in_app_purchase] Fix crash when retrieveReceiptWithError gives an error. (flutter#4138) [video_player] Pause video when it completes (flutter#3727) [in_app_purchase] Add currencySymbol to ProductDetails (flutter#4115) [in_app_purchase] Add documentation for price change confirmations (flutter#4092) [camera] android-rework part 8: Supporting modules for final implementation (flutter#4054) [plugin_platform_interface] Fix README broken link (flutter#4143) [various] Prepare plugin repo for binding API improvements (flutter#4137) ...
Adds currencySymbol to ProductDetails.
With PR #4114 both Android and iOS have a currency symbol. This PR adds the currency symbol to the platform interface so it can be exposed in the app facing package.
Part of flutter/flutter#83984
This is a breaking change because it has a new required parameter in the constructor. I could make it optional, but that would be suboptimal for usage. I'm not sure if there is a migration guid needed, but it is stated in the changelog what is changed.
Pre-launch Checklist
dart format
.)[shared_preferences]
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.