rmawatson / flutter_isolate

Launch an isolate that can use flutter plugins.
MIT License
270 stars 80 forks source link

Update handlePlatformMessage to stop using deprecated API #64

Closed pschuegr closed 3 years ago

pschuegr commented 3 years ago

Fixes https://github.com/rmawatson/flutter_isolate/issues/63.

You'll want to squash this, I was iterating on it in a pretty dumb and sleep-deprived way, so there are 3 commits for a one-line change :|

ryanheise commented 3 years ago

Thanks, @pschuegr . I will take a look later since I'm not in front of my dev environment right now, but can you confirm that you have tested this on Flutter's stable channel? Based on the API documentation it looks like it should be fine, but sometimes features marked as deprecated in dev or beta recommend replacements that may not yet be available in stable.

ryanheise commented 3 years ago

It seems the line was made redundant by WidgetsFlutterBinding.ensureInitialized() so I have removed it in the latest commit.

I've also fixed the example, updated it to Android X and bumped gradle/sdk versions. If things break on your end let me know, but it seems good on initial testing.

ryanheise commented 3 years ago

Will close now since removing the offending line seems to be working.