Files
DriverVault/Phone App/pubspec.yaml
T
tajniak81andClaude Opus 5 7718b32013 Phone App: off the plugins that bring their own Kotlin
flutter build apk warned that file_picker and shared_preferences_android apply
the Kotlin Gradle Plugin themselves, and that a future Flutter will refuse to
build an app whose plugins do. Both have versions that let Flutter's built-in
Kotlin do it instead; neither of them is a version bump on its own.

shared_preferences_android was free — 2.4.27 is inside the constraint that was
already there and only pub.lock was holding it back. file_picker is not: 10 and
11 both apply KGP, so 12 is the floor, and 12 split into federated packages
whose windows one wants win32 ^6, which flutter_secure_storage 9 forbids.

So the fix reaches flutter_secure_storage, and that is the part worth reading
twice. v11 satisfies win32 but its changelog is explicit: data written by a
version before v10 is unusable after it, because v10 is what migrates the
Jetpack Security (EncryptedSharedPreferences) backend Google deprecated to the
package's own ciphers. Going 9 to 11 in one step would leave the stored
credentials unreadable and quietly switch biometric login off for anyone who
had it on. v10 satisfies win32 ^6 just as well, so the constraint is pinned
below 11 with the reason written down: once a build carrying v10 has run on
every device that had biometric login enabled, the ceiling can go.

encryptedSharedPreferences: true goes with it — v10 ignores the parameter and
migrates on first access, and v11 has removed it.

file_picker 12's API is smaller and the call sites got smaller with it.
FilePicker.platform.pickFiles returning a result whose files list had to be
checked for emptiness becomes FilePicker.pickFile returning one nullable file,
which is what both callers wanted. PlatformFile.bytes (populated only when
withData was asked for) becomes readAsBytes(), so the "bytes, or read the path,
or give up" ladder both callers carried is one await — and the give-up branch
that raised errors.noFile and the import's notJson is gone, because a file that
was picked can now always be read.

Verified: flutter analyze is clean and flutter test still passes 32. flutter
build apk --debug succeeds and prints no KGP warning, where the build before
this named both plugins.

Not verified: nothing was exercised on a device — the phone came off USB before
the reinstall, so this APK has not run. The two things to try first are the
ones that changed under the picker: attach a PDF to a service record, and
Settings, data, import a previously exported JSON. Biometric login is the third
— it should survive, since v10 migrates rather than resets, but a device that
had it on is the only place that claim can be checked, and if the migration
does fail the app treats it as stale credentials and asks for the password.
Android is the only target built; the win32 bump underneath is untested because
this app has no windows/ folder to build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 22:06:11 +02:00

54 lines
1.7 KiB
YAML

name: drivervault_phone
description: "DriverVault — car control & service-tracking phone app."
publish_to: "none"
version: 0.1.0+1
environment:
sdk: ">=3.4.0 <4.0.0"
dependencies:
flutter:
sdk: flutter
http: ^1.2.0
shared_preferences: ^2.2.0
intl: ^0.19.0
cupertino_icons: ^1.0.8
image_picker: ^1.1.2
# Attachments are PDFs as well as images, which image_picker cannot offer.
# 12 or newer: 10 and 11 apply the Kotlin Gradle Plugin themselves, which a
# future Flutter will refuse to build.
file_picker: ^12.0.0
# Opens a downloaded attachment with whatever viewer the phone has for it.
open_filex: ^4.5.0
path_provider: ^2.1.4
local_auth: ^2.3.0
local_auth_android: ^1.0.46
# Below 11 on purpose, not because 11 is broken: v10 migrates what v9 wrote
# with the now-deprecated Jetpack Security backend, and v11 removes that path.
# Bump the ceiling once a v10 build has run on every device that had biometric
# login on — see lib/biometric.dart. 10 is also what file_picker 12 needs, its
# win32 ^6 being incompatible with v9.
flutter_secure_storage: '>=10.0.0 <11.0.0'
google_fonts: ^6.2.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.0.0
flutter_launcher_icons: ^0.14.1
flutter:
uses-material-design: true
# Per-language UI translation files, read at runtime by lib/i18n.dart.
assets:
- assets/i18n/
# DriverVault launcher icon — regenerate with:
# flutter pub run flutter_launcher_icons
flutter_launcher_icons:
android: true
image_path: "assets/icon/drivervault.png"
min_sdk_android: 21
adaptive_icon_background: "#1E40AF"
adaptive_icon_foreground: "assets/icon/drivervault-fg.png"