Closed Sameri11 closed 3 months ago
Hey @miguelpruivo, @philenius can you please review this fix and/or approve workflow?
I see you're all actively working on it. I'm still experiencing the issue here.
"Package file_picker:windows references file_picker:windows as the default plugin, but it does not provide an inline implementation.
Ask the maintainers of file_picker to either avoid referencing a default implementation via platforms: windows: default_package: file_picker
or add an inline implementation to file_picker via platforms: windows:
pluginClass
or dartPluginClass
."
I see you're all actively working on it. I'm still experiencing the issue here.
"Package file_picker:windows references file_picker:windows as the default plugin, but it does not provide an inline implementation. Ask the maintainers of file_picker to either avoid referencing a default implementation via
platforms: windows: default_package: file_picker
or add an inline implementation to file_picker viaplatforms: windows:
pluginClass
ordartPluginClass
."
That is indeed what this PR would aim to solve yes. Once we get the required changes in this PR, I'll review it again and then we can release a fix version.
@navaronbracke can you please take another look at this? I think I implemented what you talked about here.
Btw, I had hard times reproducing #1343 both based on this PR and master – no success. Either I do something wrong, or, maybe, these issues were fixed earlier somehow.
I also edited the original PR comment to list fixed issues, so these get closed when the PR is merged.
As for not being able to reproduce https://github.com/miguelpruivo/flutter_file_picker/issues/1343 I'm not sure either.
It looks like one of the test is failing, because https://github.com/miguelpruivo/flutter_file_picker/pull/1561/files did not update a test expectation.
Checks are green, so ship it!
This PR addresses #1555 and removes warning. Implementation is based on this comment from https://github.com/flutter/flutter/issues/152037
Fixes https://github.com/miguelpruivo/flutter_file_picker/issues/1484 Fixes https://github.com/miguelpruivo/flutter_file_picker/issues/1483 Fixes https://github.com/miguelpruivo/flutter_file_picker/issues/1343
Details:
Old implementation with
default_plugin
never did anything over than providing correct list of supported platforms for package page on pub.dev. Since some version of dart sdk, this behaviour has become warning. New implementation provides (arguably) correct usage offlutter:plugins:
section to avoid warning. Since all logic for choosing current platform and appropriate plugin's implementation is encapsulated inside current code, this PR just provides emptyregisterWith
static methods needed for compilation. Also, it is mandatory for plugin implementations to be public, so we export them.Testing:
Current tests are not affected by this PR. Example app is also functioning (tested on
android
andios
). Since tests on macOS (my dev machine) and example on both emulators works – I believe that functionality is not broken.1555 provides reproduction with https://github.com/zulip/zulip-flutter repo. This fix can be tested in that repo by adding
dependency_overrides
topubspec.yaml
. This override will point to my fork with fix: