Commit graph

3 commits

Author SHA1 Message Date
Lukas Müllner
7635b0d85b fix: extract manual entry dialog into StatefulWidget
Fixes TextEditingController used after being disposed  the controller
was being manually disposed while the dialog's TextField still held a
reference during the pop animation. Now the dialog is its own
StatefulWidget so dispose() is called automatically by the framework
at the right time.
2026-02-23 09:47:46 +01:00
Lukas Müllner
bbcacc0664 fix: only rebuild AuthGate on actual login state changes
- AuthGate now tracks wasLoggedIn vs isLoggedIn and only calls setState
  when the login status actually flips, preventing token-refresh events
  from tearing down open dialogs and causing _dependents.isEmpty crashes
- Fix TextEditingController disposal order in scanner manual entry dialog
2026-02-23 08:50:39 +01:00
Lukas Müllner
2c3c6d990b feat: add camera OCR scanner, DB query, and collection dialogs
- Add camera, google_mlkit_text_recognition, image_picker, permission_handler deps
- Create ScannerScreen with live camera preview and OCR text recognition
- Auto-detect Hot Wheels IDs (e.g. JKF21) from captured photos using regex
- Add manual entry fallback dialog for typing HW ID by hand
- Update HomeScreen with scan FAB button and full DB query flow
- Query hotwheels table with .eq('hw_id', scannedCode).maybeSingle()
- Show 'Already in Collection' alert if car exists
- Show 'Add to Collection?' confirmation with insert if car is new
2026-02-23 07:12:24 +01:00