Files
tatlock-ui/lib/features/control_room/containers/data/datasources
jpmschweitzerandClaude 05948b41a6 fix(analysis): clear the five findings blocking the pre-push gate
flutter analyze exits non-zero on info-level findings too, so all five had to
go for `make pre-push` to pass. Four were mechanical. The fifth was not.

envApiUser was reported as an unused declaration. Removing it revealed that the
field behind it, _envApiUser, was then unused as well -- and the pair turns out
to be a closed loop nothing could enter: the getter is public but sits on
_DashboardContentState, a private class, so no caller outside this file could
ever have reached it. The field was written once per session and never read.
The debugPrint next to it logs envData.user directly, so the logging the
comment describes never depended on the stored copy. Field, getter and
assignment removed; _hasLoggedEnvUser stays, because it genuinely guards the
log-once.

Deleting the first warning exposing the second is the useful part: unused_field
could not fire while a dead getter was "using" it. Dead code hides dead code.

The two `if (x != null) x` collection entries become null-aware elements, which
is the same intent spelled the way the SDK now expects. The two casts in
data_grid_test were the second cast of a pair -- `mode as InfiniteDataMode` on
the preceding line already promotes the local.

flutter analyze: No issues found. The edited test file still passes all 37.

Note the gate still prints "not gated here yet: test (T-56)" -- analysis is
green, tests remain unwired, and that is deliberately left visible.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 12:49:05 +02:00
..