feat(deps): migrate to file_picker 12 - #10
Merged
Merged
Conversation
Builds on the flutter_secure_storage widening in the previous commit, keeping the same library-friendly shape: widen the upper bound so consumers can adopt the new major while the old one stays supported, rather than forcing everyone onto the newest. - go_router ^14.0.0 -> '>=14.0.0 <19.0.0' (resolves 18.0.0) - shimmer ^3.0.0 -> '>=3.0.0 <5.0.0' (resolves 4.0.0) - flutter_lints ^3.0.1 -> '>=3.0.1 <7.0.0' (resolves 6.0.0) - flutter_secure_storage upper bound 11 -> 12 example/ tracks the same ranges and the same sdk/flutter minimums so the workspace resolves as one. file_picker is deliberately NOT widened: v12 removes FilePicker.platform, which lib/src/widgets/file_dropzone.dart:38 uses, so it needs a code migration rather than a constraint change. Verified with the widened ranges resolved to their upper end: flutter analyze 0 errors (83 infos, one fewer than before) and flutter test 2/2 passing. Also bumps actions/checkout v5 -> v7 and adds .github/dependabot.yml (pub for / and /example, plus github-actions); this repo had no dependabot config at all.
Dependabot proposed widening the constraint to '>=8.0.0 <13.0.0'. That
range cannot compile: file_picker broke the exact API this dropzone uses
three separate times.
v11 removed the FilePicker.platform instance getter and promoted
pickFiles to a static
v12 returns List<PlatformFile> directly instead of a nullable
FilePickerResult wrapper, so cancelling yields an empty list
v12 replaced PlatformFile.size (sync int) with length() (async)
So this one pins rather than widens, unlike go_router/shimmer/
flutter_secure_storage where analyze proved the whole range compiles. A
constraint spanning an API break is a promise the code cannot keep.
allowMultiple is deprecated in v12 and now defaults to true, which is
what the dropzone wants, so it is dropped rather than passed.
Verified: flutter analyze 0 errors (83 infos, matching the pre-change
baseline) and flutter test 2/2 passing, resolved against file_picker
12.1.2.
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #9, and closes out the one major that PR #8 deliberately held back.
Dependabot's proposal cannot compile
#9 widens the constraint to
>=8.0.0 <13.0.0and changes nothing else. That range is unbuildable:file_pickerbroke the exact API this dropzone uses three separate times.FilePicker.platforminstance getter;pickFilesbecame a staticList<PlatformFile>directly instead of a nullableFilePickerResultwrapper — cancelling now yields an empty list, notnullPlatformFile.size(syncint) withlength()(async)Each one surfaced only after fixing the previous, so the migration is a little more than a rename — the size change in particular forces the mapping into a loop, since
.map()cannot await.This one pins rather than widens
PR #8 established the house style for this library: widen the upper bound so consumers can adopt a new major while the old one keeps working, which was right for
go_router,shimmerandflutter_secure_storagebecauseflutter analyzeproved the whole range compiles.file_pickeris the opposite case, so it is set to^12.1.2. A constraint spanning an API break is a promise the code cannot keep — a consumer resolving v8 inside>=8.0.0 <13.0.0would get a package that does not build.allowMultipleis deprecated in v12 and now defaults totrue, which is what this dropzone wants, so it is dropped rather than passed.Also worth noting: the null-path skip is now load-bearing rather than defensive. In v12
pathis derived from aUriand is null for non-local picks (blob/data URIs on web), so those files are skipped because there is nothing to upload from.Verification
flutter analyze0 errors — 83 infos, matching the pre-change baseline exactly — andflutter test2/2, resolved againstfile_picker 12.1.2(confirmed viaflutter pub deps).Standing caveat from #8 still applies: CI runs
analyzebut neverflutter test, and the suite is 2 tests, so a file-picker dialog change like this leans on static analysis. There is no widget test coveringFileDropzone; adding one would need the platform channel mocked, which is a bigger piece of work than this migration.