-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Share] Support v2 android embedder. #2156
Conversation
matthew-carroll
left a comment
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 from a new plugin API perspective.
| } | ||
|
|
||
| @Override | ||
| public void onDetachedFromEngine(FlutterPluginBinding binding) {} |
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.
Should we teardown the channel here?
| } | ||
| private void setUpChannel(BinaryMessenger messenger) { | ||
| methodChannel = new MethodChannel(messenger, CHANNEL); | ||
| share = new Share(activity); |
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.
It looks like activity is always null at this point. You can probably remove the local activity variable and exclusively use the setter method, instead.
| <application android:name="io.flutter.app.FlutterApplication" android:label="share_example" android:icon="@mipmap/ic_launcher"> | ||
| <activity android:name=".MainActivity" | ||
| <activity android:name=".EmbeddingV1Activity" | ||
| android:launchMode="singleTop" |
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.
I made a comment about singleTop in the sensor PR.
|
@matthew-carroll Updated based on your last review suggestions. |
|
Thanks. Still LGTM! |
packages/share/pubspec.yaml
Outdated
| environment: | ||
| sdk: ">=2.0.0-dev.28.0 <3.0.0" | ||
| flutter: ">=1.6.7 <2.0.0" | ||
| flutter: ">=1.9.1+hotfix.2 <2.0.0" |
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.
Does the share plugin really require such a recent version?
Description
Migrate to the new android embedding.
Related Issues
flutter/flutter#41847
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?