Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@Zazo032
Copy link
Contributor

@Zazo032 Zazo032 commented Feb 18, 2020

Right now, while building, users get this warning:

C:\Users\Cristian\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.6+1\android\src\main\java\io\flutter\plugins\sharedpreferences\SharedPreferencesPlugin.java:25: warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated
    setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
                        ^
1 warning

I think this has rolled to stable now so it can be fixed to not use a deprecated API.

Fixes flutter/flutter#48211

@Zazo032 Zazo032 requested review from collinjackson, cyanglaz and ditman and removed request for collinjackson February 18, 2020 16:34
@Zazo032 Zazo032 changed the title Fix deprecated API call [shared_preferences] Fix deprecated API call Feb 18, 2020
@cyanglaz
Copy link
Contributor

LGTM thanks!

@cyanglaz cyanglaz added the submit queue The Flutter team is in the process of landing this PR. label Feb 18, 2020
@ditman
Copy link
Member

ditman commented Feb 18, 2020

I don't know much about the Java version of plugins, but if @cyanglaz approves, it's probably OK!

(@cyanglaz ping me if you need a hand merging/publishing this)

@cyanglaz
Copy link
Contributor

@ditman This is calling a depreciated API in engine and since the new API is in stable, we can use the new API.
Thanks for offering to help! I will merge it as soon as the post-submit tree goes green :)

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@otopba
Copy link
Contributor

otopba commented Feb 24, 2020

LGTM

@wymored
Copy link

wymored commented Feb 24, 2020

Please accept this pr, the message is annoying and I need the plugin to my app

@ditman
Copy link
Member

ditman commented Feb 24, 2020

This is already tagged as "submit queue", it'll get merged.

@matteotan
Copy link

@cyanglaz could you please review the patch? Would be very helpful.

@ened
Copy link
Contributor

ened commented Mar 10, 2020

Hi @Zazo032 are you available to work on this PR a bit further? The proposed change fixes the problem but is part of a bigger change we need to do for each plugin.
You can refer to this PR for the description / TODO list: flutter/flutter#47153
You can refer to this PR for an complete example: #2590.

Thank you!

@xster
Copy link
Member

xster commented Mar 10, 2020

Our task list for cleanup on the plugins is a bit longer as @ened pointed out. But this is ok to merge incrementally for now.

@xster xster merged commit d46d417 into flutter:master Mar 10, 2020
@anton-roos
Copy link

I am still getting this, was it merged?

EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes submit queue The Flutter team is in the process of landing this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shared_preferences calls deprecated API

10 participants