diet-guard/app/lib/widgets
Krzysztof kuhy Rudnicki c935a202cc
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
Make AppStatusColors lookup null-safe; fix tests that never had it
Theme.of(context).extension<AppStatusColors>()! crashed in any context
that doesn't build its theme from buildAppTheme() -- which is most widget
tests, since they wrap in a bare MaterialApp(home: ...) rather than the
real app theme. That crash was latent since AppStatusColors was
introduced but only became reachable once main.dart actually started
using buildAppTheme() (previous commit), which is when 27-47 tests
started failing.

Fixed at both call sites (slot_selector_row.dart, day_status_calendar.dart)
by falling back to AppStatusColors.dark instead of force-unwrapping --
production code should never trust every context to fully replicate the
real theme. Also fixed day_status_calendar_test.dart, which asserted
against stale hardcoded Colors.* values from before the theme rewrite;
it now wraps in the real buildAppTheme() and asserts against the actual
tokens, so the assertions mean something again.

Verified: flutter analyze clean, 436/436 tests pass (up from 389/47).
2026-07-22 16:52:13 +02:00
..
attached_image_io.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
attached_image_web.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
attached_image.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
autocomplete_suggestion_list.dart Compact LogMealScreen so it fits without scrolling on-screen keyboard 2026-07-04 05:19:23 +02:00
day_status_calendar.dart Make AppStatusColors lookup null-safe; fix tests that never had it 2026-07-22 16:52:13 +02:00
macro_input_row.dart Compact LogMealScreen so it fits without scrolling on-screen keyboard 2026-07-04 05:19:23 +02:00
photo_attach_field.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
slot_selector_row.dart Make AppStatusColors lookup null-safe; fix tests that never had it 2026-07-22 16:52:13 +02:00
streak_summary_row.dart Add budget-adherence calendar, streaks, and freely-editable synced budget 2026-07-13 21:31:45 +02:00