refactor(legacy): extract shared device state into legacy_device_state package

- New package legacy_device_state hosts shared device/position state
  consumed by both control_panel and location screens. ControlPanel*
  classes renamed to LegacyDevice* in 8 moved files.
- Move PositionEntity + AddressEntity + NetworkEntity +
  LatestPositionsResponseModel + BatteryUtils + DateFormatUtils from
  control_panel to legacy_shared (shared domain entities).
- Remove anti-pattern re-export of sf_infrastructure/dio_error_mapper
  from legacy_shared barrel. Update consumers to import
  sf_infrastructure directly.
- Clean 14 unused legacy_shared imports across view models in
  account, device_management, legacy_auth and settings modules.

Eliminates cross-module dependency location -> control_panel.
0 errors, 0 warnings in flutter analyze across 11 packages/modules.
This commit is contained in:
2026-04-19 01:55:11 +02:00
parent fa3d7aa1fd
commit 6cf994cd5d
85 changed files with 213 additions and 209 deletions

View File

@@ -24,6 +24,7 @@ workspace:
- modules/legacy/modules/location
- modules/legacy/modules/settings
- modules/legacy/packages/legacy_shared
- modules/legacy/packages/legacy_device_state
- packages/design_system
- packages/flutter_treezor_entrust_sdk_bridge
- packages/flutter_treezor_entrust_sdk_bridge/example