hpoul / file_picker_writable

Flutter plugin to choose files which can be read, referenced and written back at a later time.
https://pub.dev/packages/file_picker_writable
MIT License
17 stars 12 forks source link

path_provider <2.0.0 restriction causing problems #13

Closed amake closed 3 years ago

amake commented 3 years ago

Recently the google_fonts package released version 2.0.0, which depends on path_provider 2.0.0.

file_picker_writable specifies path_provider: ">=1.6.0 <2.0.0" so currently it can't be used with google_fonts: ^2.0.0:

% flutter analyze
Because no versions of google_fonts match >2.0.0 <3.0.0 and google_fonts 2.0.0 depends on path_provider ^2.0.0, google_fonts ^2.0.0 requires path_provider ^2.0.0.
And because file_picker_writable >=1.2.0-dev.1 depends on path_provider ^1.6.0, google_fonts ^2.0.0 is incompatible with file_picker_writable >=1.2.0-dev.1.
So, because orgro depends on both file_picker_writable ^1.2.0 and google_fonts ^2.0.0, version solving failed.
Running "flutter pub get" in orgro...                                   
pub get failed (1; So, because orgro depends on both file_picker_writable ^1.2.0 and google_fonts ^2.0.0, version solving
failed.)

(In fact despite long since having updated to 1.2.0, my pubspec.yaml still specified file_picker_writable: ^1.1.1 so initially what flutter pub did was resolve back down to 1.1.1, which apparently didn't prevent path_provider 2.0.0. Of course this downgrade failed due to API changes since then. I was quite confused for a while.)

It would be nice if you could bump the version.

hpoul commented 3 years ago

Well.. I guess it's time to migrate the package to null safety :-) just bumping the version restrictions won't do much good

hpoul commented 3 years ago

@amake i've migrated now and published a preview version https://pub.dev/packages/file_picker_writable/versions/2.0.0-nullsafety.2 as 2.0.0-nullsafety.2 - maybe you can give it a try 😅️ i've only given it a very short try with the example app yet so be cautious.

amake commented 3 years ago

Thanks! I haven't tested the behavior yet, but I was able to get all my dependencies bumped now.

I'll give it a proper test and let you know.

amake commented 3 years ago

I tested my app on iOS and Android and everything seemed to be working fine.

hpoul commented 3 years ago

i've now also upgraded to 2.0.0 in AuthPass and everything looks fine, so I assume this should be resolved 😅️

amake commented 3 years ago

Yes, thanks! It's working great.