Files
sf-app-platform/modules/legacy/modules/legacy_auth/pubspec.yaml
JulianAlcala 14720b66bf refactor(legacy): split legacy_shared into cohesive packages
legacy_shared was the junk drawer of the legacy app mode — 37 files
mixing device entities, command infrastructure, UI primitives, generic
formatters, and a duplicate of sf_infrastructure's dio_error_mapper.
Any module needing one piece pulled the whole bag into its graph.

Split it by responsibility, following Mandamiento 4 of Real-World Flutter:

- legacy_ui (new): 6 widget/layout primitives (PageLayout, MenuButton,
  SectionButton, PulsingLocationMarker, RefreshableErrorState,
  WeekDayChips) plus mapStyleProvider — shared UI state that was the
  only reason two modules needed a common package.
- legacy_device_state (expanded 9 → 30): absorbed device entities,
  commands infrastructure (datasource + repo + provider + guard),
  device settings update flow, and the CSV exporter. Now one package
  owns the device domain end-to-end.
- packages/utils: absorbed battery_utils and date_format_utils as pure
  formatters that never belonged in a legacy-scoped package.
- legacy_shared: deleted entirely.

The duplicate dio_error_mapper in legacy_shared is gone; callers now use
the sf_infrastructure version (which was always the superset — it adds
ApiException and the dart:io socket handling).

DeviceEntity note: legacy_device_state keeps its own DeviceEntity (with
int timestamps and typed paymentOptions) separate from sf_shared's
DeviceEntity (String timestamps, untyped paymentOptions). The legacy
one is intentionally not exported from the barrel to avoid the
ambiguous_import collision that legacy_shared quietly hid by never
exporting it in the first place. Unifying the two is a domain-model
refactor out of scope here.

0 cross-module imports remain among legacy feature modules.
2026-04-26 21:52:51 +02:00

67 lines
1.5 KiB
YAML

name: legacy_auth
description: "Legacy auth module for SaveFamily."
publish_to: 'none'
resolution: workspace
version: 0.0.1
homepage:
environment:
sdk: ^3.9.2
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
#packages dependencies go here
legacy_theme:
path: ../../packages/legacy_theme
design_system:
path: ../../../../packages/design_system
navigation:
path: ../../../../packages/navigation
sf_localizations:
path: ../../../../packages/sf_localizations
sf_infrastructure:
path: ../../../../packages/sf_infrastructure
utils:
path: ../../../../packages/utils
sf_shared:
path: ../../../../packages/sf_shared
sf_tracking:
path: ../../../../packages/sf_tracking
legacy_device_state:
path: ../../packages/legacy_device_state
fonts:
path: ../../../../packages/fonts
#dependencies go here
flutter_svg: ^2.2.2
get_it: ^9.0.5
go_router: ^17.0.0
flutter_riverpod: ^3.0.3
freezed_annotation: ^3.1.0
freezed: ^3.2.3
dio: ^5.9.2
country_code_picker: ^3.4.1
json_annotation: ^4.9.0
json_serializable: ^6.11.2
uuid: ^4.5.3
mobile_scanner: ^7.1.4
dio_cookie_manager: ^3.3.0
cookie_jar: ^4.0.8
path_provider: ^2.1.5
shared_preferences: ^2.5.5
l10n_countries: ^1.3.1
sealed_countries: ^2.8.0
flutter_map: ^8.2.2
latlong2: ^0.9.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
riverpod_generator: ^3.0.3
build_runner: ^2.7.1
riverpod_lint: ^3.0.3
flutter: