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.
128 lines
4.3 KiB
YAML
128 lines
4.3 KiB
YAML
name: settings
|
|
description: "A new Flutter project."
|
|
publish_to: 'none'
|
|
resolution: workspace
|
|
|
|
# The following defines the version and build number for your application.
|
|
# A version number is three numbers separated by dots, like 1.2.43
|
|
# followed by an optional build number separated by a +.
|
|
# Both the version and the builder number may be overridden in flutter
|
|
# build by specifying --build-name and --build-number, respectively.
|
|
# In Android, build-name is used as versionName while build-number used as versionCode.
|
|
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
|
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
|
# Read more about iOS versioning at
|
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
|
#
|
|
# This version is used _only_ for the Runner app, which is used if you just do
|
|
# a `flutter run`. It has no impact on any other native host app that you embed
|
|
# your Flutter project into.
|
|
version: 1.0.0+1
|
|
|
|
environment:
|
|
sdk: ^3.9.2
|
|
|
|
dependencies:
|
|
flutter:
|
|
sdk: flutter
|
|
#modules dependencies go here
|
|
|
|
#packages dependencies go here
|
|
legacy_theme:
|
|
path: ../../packages/legacy_theme
|
|
sf_tracking:
|
|
path: ../../../../packages/sf_tracking
|
|
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
|
|
fonts:
|
|
path: ../../../../packages/fonts
|
|
legacy_device_state:
|
|
path: ../../packages/legacy_device_state
|
|
legacy_ui:
|
|
path: ../../packages/legacy_ui
|
|
sf_shared:
|
|
path: ../../../../packages/sf_shared
|
|
#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
|
|
json_annotation: ^4.9.0
|
|
json_serializable: ^6.11.2
|
|
url_launcher: ^6.3.2
|
|
flutter_contacts: ^1.1.9+2
|
|
|
|
# The following adds the Cupertino Icons font to your application.
|
|
# Use with the CupertinoIcons class for iOS style icons.
|
|
cupertino_icons: ^1.0.8
|
|
uuid: ^4.5.3
|
|
|
|
dev_dependencies:
|
|
flutter_test:
|
|
sdk: flutter
|
|
flutter_lints: ^5.0.0
|
|
|
|
# For information on the generic Dart part of this file, see the
|
|
# following page: https://dart.dev/tools/pub/pubspec
|
|
|
|
flutter:
|
|
# The following line ensures that the Material Icons font is
|
|
# included with your application, so that you can use the icons in
|
|
# the material Icons class.
|
|
uses-material-design: true
|
|
|
|
# To add Flutter specific assets to your application, add an assets section,
|
|
# like this:
|
|
# assets:
|
|
# - images/a_dot_burr.jpeg
|
|
# - images/a_dot_ham.jpeg
|
|
|
|
# An image asset can refer to one or more resolution-specific "variants", see
|
|
# https://flutter.dev/to/resolution-aware-images
|
|
|
|
# For details regarding adding assets from package dependencies, see
|
|
# https://flutter.dev/to/asset-from-package
|
|
|
|
# To add Flutter specific custom fonts to your application, add a fonts
|
|
# section here, in this "flutter" section. Each entry in this list should
|
|
# have a "family" key with the font family name, and a "fonts" key with a
|
|
# list giving the asset and other descriptors for the font. For
|
|
# example:
|
|
# fonts:
|
|
# - family: Schyler
|
|
# fonts:
|
|
# - asset: fonts/Schyler-Regular.ttf
|
|
# - asset: fonts/Schyler-Italic.ttf
|
|
# style: italic
|
|
# - family: Trajan Pro
|
|
# fonts:
|
|
# - asset: fonts/TrajanPro.ttf
|
|
# - asset: fonts/TrajanPro_Bold.ttf
|
|
# weight: 700
|
|
#
|
|
# For details regarding fonts from package dependencies,
|
|
# see https://flutter.dev/to/font-from-package
|
|
|
|
|
|
# This section identifies your Flutter project as a module meant for
|
|
# embedding in a native host app. These identifiers should _not_ ordinarily
|
|
# be changed after generation - they are used to ensure that the tooling can
|
|
# maintain consistency when adding or modifying assets and plugins.
|
|
# They also do not have any bearing on your native host application's
|
|
# identifiers, which may be completely independent or the same as these.
|
|
module:
|
|
androidX: true
|
|
androidPackage: com.example.settings
|
|
iosBundleIdentifier: com.example.settings
|