-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[shared_preferences] Move away from shared method channel implementation in native packages. #4723
[shared_preferences] Move away from shared method channel implementation in native packages. #4723
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.
Just minor things here as well.
packages/shared_preferences/shared_preferences_android/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_macos/lib/shared_preferences_macos.dart
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_linux/test/shared_preferences_linux_test.dart
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_linux/test/shared_preferences_linux_test.dart
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_macos/pubspec.yaml
Outdated
Show resolved
Hide resolved
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.
Sorry, I missed a few things.
...ages/shared_preferences/shared_preferences_android/test/shared_preferences_android_test.dart
Outdated
Show resolved
Hide resolved
...ages/shared_preferences/shared_preferences_android/test/shared_preferences_android_test.dart
Outdated
Show resolved
Hide resolved
...ages/shared_preferences/shared_preferences_android/test/shared_preferences_android_test.dart
Outdated
Show resolved
Hide resolved
...ages/shared_preferences/shared_preferences_android/test/shared_preferences_android_test.dart
Show resolved
Hide resolved
...ages/shared_preferences/shared_preferences_android/test/shared_preferences_android_test.dart
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_windows/lib/shared_preferences_windows.dart
Show resolved
Hide resolved
final String key = (methodCall.arguments['key'] as String?)!; | ||
final Object value = (methodCall.arguments['value'] as Object?)!; | ||
final String key = methodCall.arguments['key'] as String; | ||
final Object value = methodCall.arguments['value'] as Object; |
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.
Don't these need !
s? I would expect you to get an analyzer warning about using as
to convert from nullable to non-nullable.
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 wondered the same thing, but as it gave me no warnings I left it out.
packages/shared_preferences/shared_preferences_linux/CHANGELOG.md
Outdated
Show resolved
Hide resolved
...preferences/shared_preferences_windows/example/integration_test/shared_preferences_test.dart
Outdated
Show resolved
Hide resolved
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, sorry I kept missing things in earlier review stages.
…mplementation in native packages. (flutter/plugins#4723)
…mplementation in native packages. (flutter/plugins#4723)
…mplementation in native packages. (flutter/plugins#4723)
…mplementation in native packages. (flutter/plugins#4723)
This PR eliminates the use of the shared method channel implementation in each of the native packages for the shared_preferences plugin.
This PR's contents are based on the steps outlined in the following issue:
No CHANGELOG change: The main package only has one of its tests changed.
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style].///
).