Add a placeholder implementation for non-mobile platforms#688
Add a placeholder implementation for non-mobile platforms#688Taym95 merged 5 commits intoPhilipsHue:masterfrom
Conversation
|
The following PRs will need an update after this change. |
|
Should I increase the version numbers in |
64a1818 to
90b5ba0
Compare
|
@Taym95 Hi. If you have some time, could you please take a look at this change and give me some advice? |
I will review it today, sorry for not responding quickly |
|
@Taym95 Hi. Could you review and give some comments? |
Taym95
left a comment
There was a problem hiding this comment.
Thank you for contribution, this will be helpful for endorsed package indeed.
please update your branch |
|
@Taym95 Sure. I hope there will be a version bump soon after merge so that this change can be released. |
Yes |
Sets the default value of
ReactiveBlePlatform.instanceto an instance of_PlaceholderImplementation, rather thanReactiveBleMobilePlatform(current) which is for mobile platforms only. This is necessary so that federated implementations of this plugin (endorsed or not) can be added for non-mobile (desktop) platforms.The same approach is being used by 1st-party plugin developers as they have decided to remove default method channel implementations from their platform interface packages. For example: https://github.com/flutter/plugins/blob/2ce625f1a87e4b738f63a6f1f7e3e040e7c0b87f/packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart#L22
After this change, a new platform implementation can be added by providing a static
registerWithmethod that is used to register the plugin for that platform on app startup (documentation). Here is the example:I personally need this change to add a Tizen platform implementation of this plugin for our project. Any comments will be appreciated. Thank you!