新增:体重录入与历史列表接入真实数据(T2-13 体重半边)

- WeightRecordsPage:cursor 分页(加载更多/末页收起/翻页失败保留重试)、
  loading/empty/error/retry 四态、下拉刷新;viewer 隐藏录入入口
- WeightFormPage:weightKg 契约区间 (0,500] 与两位小数前端校验 + 40000
  兜底;称重时间转 UTC 上送;错误三层分层沿用登录纵切
- health_record 域埋点强类型封装(06 §1.4:create_started/succeeded/
  failed + viewed,httpStatus 由业务码推导;viewed 按工单口径取列表曝光)
- health_record_display 纯函数(体重解析/展示、疫苗状态映射、42201
  规则前端拦截函数);PetsController 暴露 repository(22 号 §7 交接)
- 测试 177 → 205(+28)全绿

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 13:17:17 +08:00
parent 97a1f46e3f
commit 5b34fa336b
10 changed files with 1528 additions and 0 deletions
+4
View File
@@ -21,6 +21,10 @@ class PetsController extends ChangeNotifier {
final PetsRepository _repository;
/// 记录级页面(体重/疫苗/事件/提醒)直接经仓库取数(22 号报告 §7
/// 交接约定:页面级状态按页自建,不膨胀本控制器)。
PetsRepository get repository => _repository;
PetsLoadPhase _phase = PetsLoadPhase.initial;
List<Pet> _pets = const [];
ApiException? _lastError;