feat(app): scan a printed seed label back into its record

Closes the physical↔digital loop the labels opened: the QR on a printed
envelope (tane://seed, already encoded by seed_label_codec) can now be
scanned from the inventory bar. A known label opens its variety; an
unknown one asks before adding anything, then creates the variety (species
linked by exact scientific name when bundled) with a lot carrying the
label's year and origin. Scanner is pure ZXing (zxing_barcode_scanner,
MIT) — no ML Kit, no Play Services, F-Droid-safe, the stack Ğ1nkgo ships.
Mobile-only; other platforms don't show the button (OCR precedent).
The post-scan flow is a plain function (handleScannedPayload) so it's
widget-tested without a camera.
This commit is contained in:
vjrj 2026-07-18 12:26:27 +02:00
parent bb5b3d4a43
commit f1aa8f8e66
18 changed files with 1130 additions and 42 deletions

View file

@ -15,38 +15,30 @@ AutoName: Tane
RepoType: git
Repo: https://git.comunes.org/comunes/tane.git
Builds:
- versionName: 0.1.0
versionCode: 2
commit: v0.1.0
subdir: apps/app_seeds
sudo:
- apt-get update
- apt-get install -y git unzip xz-utils
- git clone --depth 1 -b 3.41.9 https://github.com/flutter/flutter.git /opt/flutter
- chown -R vagrant:vagrant /opt/flutter
output: build/app/outputs/flutter-apk/app-release.apk
prebuild:
- export PATH="/opt/flutter/bin:$PATH"
- git config --global --add safe.directory /opt/flutter
- flutter config --no-analytics
- flutter pub get
- dart run slang
- dart run build_runner build --delete-conflicting-outputs
build:
- export PATH="/opt/flutter/bin:$PATH"
- flutter build apk --release
# Reproducible, developer-signed builds: F-Droid rebuilds from source and, if the
# output matches our own signed APK on git.comunes.org byte-for-byte, publishes
# OUR APK. Same signature as the Google Play build, so users move between stores
# without reinstalling. The fingerprint below is the SHA-256 of the tane-upload
# signing certificate (public value); the keystore/passwords never leave CI.
AllowedAPKSigningKeys: ddfae432091b8248a8a4a1b353487fa626301f4357ef835e94ec312f69418e38
- versionName: 0.1.1
versionCode: 3
commit: v0.1.1
# One build entry per ABI: `flutter build --split-per-abi` yields smaller APKs and
# each split carries a distinct versionCode (gradle: versionCode*10 + {arm-v7a:1,
# arm64:2, x86_64:3}), so v0.1.2 (+4) -> 41/42/43. The `binary:` is the reference
# APK F-Droid verifies against, uploaded to the Forgejo release by
# .forgejo/workflows/release.yml on the `v*` tag.
Builds:
- versionName: 0.1.2
versionCode: 41
commit: v0.1.2
subdir: apps/app_seeds
sudo:
- apt-get update
- apt-get install -y git unzip xz-utils
- git clone --depth 1 -b 3.41.9 https://github.com/flutter/flutter.git /opt/flutter
- chown -R vagrant:vagrant /opt/flutter
output: build/app/outputs/flutter-apk/app-release.apk
output: build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
binary: https://git.comunes.org/comunes/tane/releases/download/v%v/app-armeabi-v7a-release.apk
prebuild:
- export PATH="/opt/flutter/bin:$PATH"
- git config --global --add safe.directory /opt/flutter
@ -56,10 +48,54 @@ Builds:
- dart run build_runner build --delete-conflicting-outputs
build:
- export PATH="/opt/flutter/bin:$PATH"
- flutter build apk --release
- flutter build apk --release --split-per-abi --target-platform=android-arm
- versionName: 0.1.2
versionCode: 42
commit: v0.1.2
subdir: apps/app_seeds
sudo:
- apt-get update
- apt-get install -y git unzip xz-utils
- git clone --depth 1 -b 3.41.9 https://github.com/flutter/flutter.git /opt/flutter
- chown -R vagrant:vagrant /opt/flutter
output: build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
binary: https://git.comunes.org/comunes/tane/releases/download/v%v/app-arm64-v8a-release.apk
prebuild:
- export PATH="/opt/flutter/bin:$PATH"
- git config --global --add safe.directory /opt/flutter
- flutter config --no-analytics
- flutter pub get
- dart run slang
- dart run build_runner build --delete-conflicting-outputs
build:
- export PATH="/opt/flutter/bin:$PATH"
- flutter build apk --release --split-per-abi --target-platform=android-arm64
- versionName: 0.1.2
versionCode: 43
commit: v0.1.2
subdir: apps/app_seeds
sudo:
- apt-get update
- apt-get install -y git unzip xz-utils
- git clone --depth 1 -b 3.41.9 https://github.com/flutter/flutter.git /opt/flutter
- chown -R vagrant:vagrant /opt/flutter
output: build/app/outputs/flutter-apk/app-x86_64-release.apk
binary: https://git.comunes.org/comunes/tane/releases/download/v%v/app-x86_64-release.apk
prebuild:
- export PATH="/opt/flutter/bin:$PATH"
- git config --global --add safe.directory /opt/flutter
- flutter config --no-analytics
- flutter pub get
- dart run slang
- dart run build_runner build --delete-conflicting-outputs
build:
- export PATH="/opt/flutter/bin:$PATH"
- flutter build apk --release --split-per-abi --target-platform=android-x64
AutoUpdateMode: Version
UpdateCheckMode: Tags v[\d.]+
UpdateCheckData: apps/app_seeds/pubspec.yaml|version:\s*[\d.]+\+(\d+)|apps/app_seeds/pubspec.yaml|version:\s*([\d.]+)\+
CurrentVersion: 0.1.1
CurrentVersionCode: 3
CurrentVersion: 0.1.2
CurrentVersionCode: 43