-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[path_provider] Switch macOS to an internal method channel #4547
[path_provider] Switch macOS to an internal method channel #4547
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.
nice!
|
||
@override | ||
Future<String?> getDownloadsPath() { | ||
return methodChannel.invokeMethod<String>('getDownloadsDirectory'); |
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.
Might be worthwhile adding a note that the mix match of names is intentional.
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.
There's no reason method channels need to parallel platform interfaces, so I don't really consider it a mismatch; all that is expected (and required) to match is the Dart and native endpoints.
(Longer term this should probably be replaced with a single method+enum using Pigeon, to more closely mirror the OS API, but I just wanted to do the initial cleanup of using an internal method channel for now.)
) Eliminates the path_provider_macos reliance on the default, shared method channel implementation, in favor of an in-package implementation. Now that it's trivial to do so, also moves the creation of directories when necessary to the Dart side, and unit tests it there. Part of flutter/flutter#94224
) Eliminates the path_provider_macos reliance on the default, shared method channel implementation, in favor of an in-package implementation. Now that it's trivial to do so, also moves the creation of directories when necessary to the Dart side, and unit tests it there. Part of flutter/flutter#94224
Eliminates the path_provider_macos reliance on the default, shared method channel implementation, in favor of an in-package implementation.
Now that it's trivial to do so, also moves the creation of directories when necessary to the Dart side, and unit tests it there.
Part of flutter/flutter#94224
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.///
).