diff --git a/apps/mobile_app/ios/Runner.xcodeproj/project.pbxproj b/apps/mobile_app/ios/Runner.xcodeproj/project.pbxproj index f14f5e0b..22f1b6ad 100644 --- a/apps/mobile_app/ios/Runner.xcodeproj/project.pbxproj +++ b/apps/mobile_app/ios/Runner.xcodeproj/project.pbxproj @@ -543,7 +543,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-development; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "Runner/Runner-development.entitlements"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -727,7 +727,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-development; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "Runner/Runner-development.entitlements"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -751,7 +751,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-development; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "Runner/Runner-development.entitlements"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -1100,7 +1100,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-staging; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "Runner/Runner-staging.entitlements"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -1124,7 +1124,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-production; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -1148,7 +1148,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-staging; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "Runner/Runner-staging.entitlements"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -1171,7 +1171,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-production; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -1194,7 +1194,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-staging; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "Runner/Runner-staging.entitlements"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -1217,7 +1217,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-production; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; diff --git a/apps/mobile_app/lib/providers/legacy_heartbeat_service.dart b/apps/mobile_app/lib/providers/legacy_heartbeat_service.dart index 411bcba3..a26e5df8 100644 --- a/apps/mobile_app/lib/providers/legacy_heartbeat_service.dart +++ b/apps/mobile_app/lib/providers/legacy_heartbeat_service.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:dio/dio.dart'; import 'package:flutter/foundation.dart'; import 'package:sf_infrastructure/sf_infrastructure.dart'; @@ -35,8 +36,10 @@ class LegacyHeartbeatService { debugPrint('[LegacyHeartbeat] /auth/me => OK'); } catch (e) { debugPrint('[LegacyHeartbeat] error: $e'); - stop(); - _onUnauthorized(); + if (e is DioException && e.response?.statusCode == 401) { + stop(); + _onUnauthorized(); + } } } } diff --git a/apps/mobile_app/pubspec.yaml b/apps/mobile_app/pubspec.yaml index 0aeaa1f1..b8f14e35 100644 --- a/apps/mobile_app/pubspec.yaml +++ b/apps/mobile_app/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+4 +version: 1.0.0+5 environment: sdk: ^3.9.2 diff --git a/modules/activity/.flutter-plugins-dependencies b/modules/activity/.flutter-plugins-dependencies index 4efd2188..ff1568b9 100644 --- a/modules/activity/.flutter-plugins-dependencies +++ b/modules/activity/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"C:\\\\dev\\\\sf-app-platform\\\\packages\\\\flutter_treezor_entrust_sdk_bridge\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.5.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.5.6\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"C:\\\\dev\\\\sf-app-platform\\\\packages\\\\flutter_treezor_entrust_sdk_bridge\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.22\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_android-2.4.20\\\\","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.5.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.5.6\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_linux-2.4.1\\\\","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_windows-2.4.1\\\\","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"C:\\\\Users\\\\Aitor Arana\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_web-2.4.3\\\\","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2026-03-16 09:33:25.098373","version":"3.35.6","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/save-family-app/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.5.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/save-family-app/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.5.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2026-03-18 14:45:38.408085","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/modules/legacy/modules/control_panel/lib/control_panel.dart b/modules/legacy/modules/control_panel/lib/control_panel.dart index 3935eb08..1d226111 100644 --- a/modules/legacy/modules/control_panel/lib/control_panel.dart +++ b/modules/legacy/modules/control_panel/lib/control_panel.dart @@ -1,3 +1,9 @@ +export 'src/core/data/models/latest_positions_response_model.dart'; +export 'src/core/domain/entities/address_entity.dart'; +export 'src/core/domain/entities/network_entity.dart'; +export 'src/core/domain/entities/position_entity.dart'; +export 'src/core/utils/battery_utils.dart'; +export 'src/core/utils/date_format_utils.dart'; export 'src/features/control_panel/control_panel_builder.dart'; export 'src/features/control_panel/presentation/state/control_panel_view_model.dart'; export 'src/shared/widgets/device_map.dart'; \ No newline at end of file diff --git a/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/control_panel_screen.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/control_panel_screen.dart index dd246324..4ce6ecc5 100644 --- a/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/control_panel_screen.dart +++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/control_panel_screen.dart @@ -258,7 +258,6 @@ class _MapSection extends ConsumerWidget { child: DeviceMap( selectedPosition: state.selectedPosition, selectedDevice: state.selectedDevice, - markerSize: 40, ), ), ), diff --git a/modules/legacy/modules/control_panel/lib/src/shared/widgets/device_map.dart b/modules/legacy/modules/control_panel/lib/src/shared/widgets/device_map.dart index 658287e1..fe2555d0 100644 --- a/modules/legacy/modules/control_panel/lib/src/shared/widgets/device_map.dart +++ b/modules/legacy/modules/control_panel/lib/src/shared/widgets/device_map.dart @@ -5,25 +5,21 @@ import 'package:design_system/design_system.dart'; import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_svg/svg.dart'; import 'package:latlong2/latlong.dart'; +import 'package:legacy_shared/legacy_shared.dart'; import 'package:sf_shared/sf_shared.dart'; -import 'package:utils/utils.dart'; const _defaultCenter = LatLng(40.4168, -3.7038); const _defaultZoom = 15.0; -const _tileServerUrl = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'; class DeviceMap extends ConsumerStatefulWidget { final PositionEntity? selectedPosition; final DeviceEntity? selectedDevice; - final double markerSize; const DeviceMap({ super.key, required this.selectedPosition, required this.selectedDevice, - this.markerSize = 80, }); @override @@ -62,6 +58,7 @@ class _DeviceMapState extends ConsumerState { @override Widget build(BuildContext context) { + final mapStyle = ref.watch(mapStyleProvider); final initialCenter = widget.selectedPosition != null ? LatLng( widget.selectedPosition!.latitude, @@ -78,7 +75,7 @@ class _DeviceMapState extends ConsumerState { ), children: [ TileLayer( - urlTemplate: _tileServerUrl, + urlTemplate: mapStyle.urlTemplate, userAgentPackageName: 'com.savefamily.sf_platform', ), MarkerLayer( @@ -89,15 +86,9 @@ class _DeviceMapState extends ConsumerState { widget.selectedPosition!.latitude, widget.selectedPosition!.longitude, ), - width: widget.markerSize * 2.5, - height: widget.markerSize * 1.8, - child: Align( - alignment: Alignment.topCenter, - child: SvgPicture.asset( - 'assets/shared/images/location.svg', - height: widget.markerSize, - ), - ), + width: 100, + height: 100, + child: const PulsingLocationMarker(), rotate: true, ), ], @@ -107,7 +98,7 @@ class _DeviceMapState extends ConsumerState { alignment: Alignment.bottomCenter, child: LocationBanner( position: widget.selectedPosition!, - battery: widget.selectedDevice?.battery ?? 0, + device: widget.selectedDevice, ), ), ], @@ -117,86 +108,156 @@ class _DeviceMapState extends ConsumerState { class LocationBanner extends ConsumerWidget { final PositionEntity position; - final int battery; + final DeviceEntity? device; const LocationBanner({ super.key, required this.position, - required this.battery, + this.device, }); @override Widget build(BuildContext context, WidgetRef ref) { final theme = ref.read(themePortProvider); - final batteryIcon = toBatteryIcon(battery); + final primaryColor = theme.getColorFor(ThemeCode.legacyPrimary); + final batteryValue = device?.battery ?? 0; + final batteryIcon = toBatteryIcon(batteryValue); final dateText = formatPositionDate(position.positionDate); + final localDevice = device; + final name = localDevice?.carrierName; + final deviceName = localDevice != null + ? (name != null && name.isNotEmpty ? name : localDevice.identificator) + : null; + final initial = deviceName != null && deviceName.isNotEmpty + ? deviceName[0].toUpperCase() + : null; + final addressText = [ position.address?.street, position.address?.province, - position.address?.country, ].whereType().where((s) => s.isNotEmpty).join(', '); - return Container( - height: SizeUtils.getByScreen(small: 60, big: 58), - width: SizeUtils.getByScreen(small: 300, big: 298), - margin: EdgeInsets.only( - bottom: SizeUtils.getByScreen(small: 20, big: 16), - ), - decoration: BoxDecoration( - color: theme.getColorFor(ThemeCode.backgroundPrimary), - borderRadius: BorderRadius.all( - Radius.circular(SizeUtils.getByScreen(small: 9, big: 8)), - ), - ), - child: Row( - children: [ - Icon( - SFIcons.location, - size: SizeUtils.getByScreen(small: 40, big: 38), - color: theme.getColorFor(ThemeCode.legacyPrimary), + return LayoutBuilder( + builder: (context, constraints) { + final isCompact = constraints.maxWidth < 320; + + return Container( + width: isCompact ? constraints.maxWidth * 0.85 : 340, + margin: EdgeInsets.only(bottom: isCompact ? 8 : 16), + padding: EdgeInsets.symmetric( + horizontal: isCompact ? 8 : 12, + vertical: isCompact ? 6 : 10, ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - addressText, - overflow: TextOverflow.ellipsis, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(isCompact ? 10 : 16), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.1), + blurRadius: isCompact ? 6 : 10, + offset: const Offset(0, 2), + ), + ], + ), + child: Row( + children: [ + if (initial != null) + Container( + width: isCompact ? 30 : 42, + height: isCompact ? 30 : 42, + decoration: BoxDecoration( + color: primaryColor.withValues(alpha: 0.12), + shape: BoxShape.circle, + ), + child: Center( + child: Text( + initial, + style: TextStyle( + fontSize: isCompact ? 13 : 18, + fontWeight: FontWeight.w700, + color: primaryColor, + ), + ), + ), ), - Row( + SizedBox(width: isCompact ? 6 : 10), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, children: [ - Flexible( - child: Text( - dateText, + if (deviceName != null) + Text( + deviceName, style: TextStyle( - fontSize: SizeUtils.getByScreen(small: 12, big: 11), + fontSize: isCompact ? 12 : 14, + fontWeight: FontWeight.w600, + color: Colors.grey.shade800, ), overflow: TextOverflow.ellipsis, ), - ), - if (position.networks.isNotEmpty) - Text( - ' | ${position.networks.first.signal}', - style: TextStyle( - fontSize: SizeUtils.getByScreen(small: 12, big: 11), + if (addressText.isNotEmpty) + Padding( + padding: EdgeInsets.only( + top: deviceName != null ? 1 : 0), + child: Text( + addressText, + style: TextStyle( + fontSize: isCompact ? 9 : 11, + color: Colors.grey.shade500, + ), + overflow: TextOverflow.ellipsis, ), ), - Icon(batteryIcon), - Text( - '$battery%', - style: TextStyle( - fontSize: SizeUtils.getByScreen(small: 12, big: 11), - ), - ), ], ), - ], - ), + ), + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + batteryIcon, + size: isCompact ? 13 : 16, + color: batteryValue > 20 + ? primaryColor + : Colors.orange, + ), + const SizedBox(width: 2), + Text( + '$batteryValue%', + style: TextStyle( + fontSize: isCompact ? 10 : 12, + fontWeight: FontWeight.w600, + color: batteryValue > 20 + ? primaryColor + : Colors.orange, + ), + ), + ], + ), + if (!isCompact) + Padding( + padding: const EdgeInsets.only(top: 3), + child: Text( + dateText, + style: TextStyle( + fontSize: 10, + color: Colors.grey.shade400, + ), + ), + ), + ], + ), + ], ), - ], - ), + ); + }, ); } } + diff --git a/modules/legacy/modules/location/lib/src/core/data/datasource/location_remote_datasource.dart b/modules/legacy/modules/location/lib/src/core/data/datasource/location_remote_datasource.dart new file mode 100644 index 00000000..291ecc58 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/datasource/location_remote_datasource.dart @@ -0,0 +1,25 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:location/src/core/data/models/create_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/create_geofence_request_model.dart'; +import 'package:location/src/core/data/models/update_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/update_geofence_request_model.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; + +abstract class LocationRemoteDatasource { + Future> getGeofences({required String deviceId}); + Future createGeofence({required CreateGeofenceRequestModel request}); + Future updateGeofence({required UpdateGeofenceRequestModel request}); + Future deleteGeofence({required String geofenceId}); + + Future> getFrequentPlaces({required String deviceId}); + Future createFrequentPlace({required CreateFrequentPlaceRequestModel request}); + Future updateFrequentPlace({required UpdateFrequentPlaceRequestModel request}); + Future deleteFrequentPlace({required String frequentPlaceId}); + + Future> getPositionHistory({ + required String deviceIdentificator, + required DateTime from, + required DateTime to, + }); +} diff --git a/modules/legacy/modules/location/lib/src/core/data/datasource/location_remote_datasource_impl.dart b/modules/legacy/modules/location/lib/src/core/data/datasource/location_remote_datasource_impl.dart new file mode 100644 index 00000000..3fb84e6c --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/datasource/location_remote_datasource_impl.dart @@ -0,0 +1,204 @@ +import 'dart:convert'; + +import 'package:control_panel/control_panel.dart'; +import 'package:dio/dio.dart'; +import 'package:legacy_shared/legacy_shared.dart'; +import 'package:location/src/core/data/datasource/location_remote_datasource.dart'; +import 'package:location/src/core/data/models/create_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/create_frequent_place_response_model.dart'; +import 'package:location/src/core/data/models/create_geofence_request_model.dart'; +import 'package:location/src/core/data/models/create_geofence_response_model.dart'; +import 'package:location/src/core/data/models/position_history_response_model.dart'; +import 'package:location/src/core/data/models/update_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/update_frequent_place_response_model.dart'; +import 'package:location/src/core/data/models/update_geofence_request_model.dart'; +import 'package:location/src/core/data/models/update_geofence_response_model.dart'; +import 'package:location/src/core/data/models/geofences_response_model.dart'; +import 'package:location/src/core/data/models/frequent_places_response_model.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; +import 'package:sf_infrastructure/sf_infrastructure.dart'; + +class LocationRemoteDatasourceImpl implements LocationRemoteDatasource { + LocationRemoteDatasourceImpl(this._repository); + + final QuestiaRepository _repository; + + @override + Future> getGeofences({ + required String deviceId, + }) async { + try { + final response = await _repository.get>( + '/devices/$deviceId/geofences', + ); + final data = response.data; + if (data == null || data.isEmpty) return []; + final model = GeofencesResponseModel.fromJson(data); + return model.toEntity(); + } on DioException catch (e) { + if (e.response?.statusCode == 404) return []; + throw mapDioError(e, defaultMessage: 'Error getting geofences'); + } + } + + @override + Future createGeofence({ + required CreateGeofenceRequestModel request, + }) async { + try { + final response = await _repository.post>( + '/geofences', + body: request.toJson(), + ); + final data = response.data; + if (data == null) throw Exception('Empty response from server'); + return CreateGeofenceResponseModel.fromJson(data).toEntity(); + } on DioException catch (e) { + throw mapDioError(e, defaultMessage: 'Error creating geofence'); + } + } + + @override + Future updateGeofence({ + required UpdateGeofenceRequestModel request, + }) async { + try { + final response = await _repository.put>( + '/geofences/${request.id}', + body: request.toJson(), + ); + final data = response.data; + if (data == null) throw Exception('Empty response from server'); + return UpdateGeofenceResponseModel.fromJson(data).toEntity(); + } on DioException catch (e) { + throw mapDioError(e, defaultMessage: 'Error updating geofence'); + } + } + + @override + Future deleteGeofence({required String geofenceId}) async { + try { + await _repository.delete>( + '/geofences/$geofenceId', + ); + } on DioException catch (e) { + throw mapDioError(e, defaultMessage: 'Error deleting geofence'); + } + } + + @override + Future> getFrequentPlaces({ + required String deviceId, + }) async { + try { + final response = await _repository.get>( + '/devices/$deviceId/frequent-places', + ); + final data = response.data; + if (data == null || data.isEmpty) return []; + final model = FrequentPlacesResponseModel.fromJson(data); + return model.toEntity(); + } on DioException catch (e) { + if (e.response?.statusCode == 404) return []; + throw mapDioError(e, defaultMessage: 'Error getting frequent places'); + } + } + + @override + Future createFrequentPlace({ + required CreateFrequentPlaceRequestModel request, + }) async { + try { + final response = await _repository.post>( + '/frequent-places', + body: request.toJson(), + ); + final data = response.data; + if (data == null) throw Exception('Empty response from server'); + return CreateFrequentPlaceResponseModel.fromJson(data).toEntity(); + } on DioException catch (e) { + throw mapDioError(e, defaultMessage: 'Error creating frequent place'); + } + } + + @override + Future updateFrequentPlace({ + required UpdateFrequentPlaceRequestModel request, + }) async { + try { + final response = await _repository.put>( + '/frequent-places/${request.id}', + body: request.toJson(), + ); + final data = response.data; + if (data == null) throw Exception('Empty response from server'); + return UpdateFrequentPlaceResponseModel.fromJson(data).toEntity(); + } on DioException catch (e) { + throw mapDioError(e, defaultMessage: 'Error updating frequent place'); + } + } + + @override + Future deleteFrequentPlace({required String frequentPlaceId}) async { + try { + await _repository.delete>( + '/frequent-places/$frequentPlaceId', + ); + } on DioException catch (e) { + throw mapDioError(e, defaultMessage: 'Error deleting frequent place'); + } + } + + @override + Future> getPositionHistory({ + required String deviceIdentificator, + required DateTime from, + required DateTime to, + }) async { + try { + final fromMs = from.millisecondsSinceEpoch; + final toMs = to.millisecondsSinceEpoch; + + final filters = base64Encode(utf8.encode(jsonEncode([ + {'field': 'positionDate', 'operator': 'gte', 'value': fromMs}, + {'field': 'positionDate', 'operator': 'lte', 'value': toMs}, + ]))); + + final orderBy = base64Encode(utf8.encode(jsonEncode([ + {'field': 'positionDate', 'sortDirection': 'ASC'}, + ]))); + + final allPositions = []; + int currentPage = 1; + int totalPages = 1; + + while (currentPage <= totalPages) { + final response = await _repository.get>( + '/devices/identificator/$deviceIdentificator/positions', + queryParameters: { + 'page': currentPage, + 'pageSize': 1000, + 'filters': filters, + 'orderBy': orderBy, + }, + ); + + final data = response.data; + if (data == null || data.isEmpty) break; + + final model = PositionHistoryResponseModel.fromJson(data); + allPositions.addAll(model.toEntity()); + totalPages = model.pages; + currentPage++; + } + + return allPositions + .where((p) => p.latitude != 0 || p.longitude != 0) + .toList(); + } on DioException catch (e) { + if (e.response?.statusCode == 404) return []; + throw mapDioError(e, defaultMessage: 'Error getting position history'); + } + } +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.dart new file mode 100644 index 00000000..1eac7664 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.dart @@ -0,0 +1,25 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/data/models/frequent_places_response_model.dart'; + +part 'create_frequent_place_request_model.freezed.dart'; +part 'create_frequent_place_request_model.g.dart'; + +@freezed +abstract class CreateFrequentPlaceRequestModel + with _$CreateFrequentPlaceRequestModel { + const factory CreateFrequentPlaceRequestModel({ + required String id, + required String name, + required double lat, + required double lng, + @Default([]) List wifiList, + String? userId, + String? delegationId, + String? groupId, + String? deviceId, + }) = _CreateFrequentPlaceRequestModel; + + factory CreateFrequentPlaceRequestModel.fromJson( + Map json) => + _$CreateFrequentPlaceRequestModelFromJson(json); +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.freezed.dart new file mode 100644 index 00000000..38d5cc8e --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.freezed.dart @@ -0,0 +1,307 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'create_frequent_place_request_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CreateFrequentPlaceRequestModel { + + String get id; String get name; double get lat; double get lng; List get wifiList; String? get userId; String? get delegationId; String? get groupId; String? get deviceId; +/// Create a copy of CreateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CreateFrequentPlaceRequestModelCopyWith get copyWith => _$CreateFrequentPlaceRequestModelCopyWithImpl(this as CreateFrequentPlaceRequestModel, _$identity); + + /// Serializes this CreateFrequentPlaceRequestModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateFrequentPlaceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other.wifiList, wifiList)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,lat,lng,const DeepCollectionEquality().hash(wifiList),userId,delegationId,groupId,deviceId); + +@override +String toString() { + return 'CreateFrequentPlaceRequestModel(id: $id, name: $name, lat: $lat, lng: $lng, wifiList: $wifiList, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId)'; +} + + +} + +/// @nodoc +abstract mixin class $CreateFrequentPlaceRequestModelCopyWith<$Res> { + factory $CreateFrequentPlaceRequestModelCopyWith(CreateFrequentPlaceRequestModel value, $Res Function(CreateFrequentPlaceRequestModel) _then) = _$CreateFrequentPlaceRequestModelCopyWithImpl; +@useResult +$Res call({ + String id, String name, double lat, double lng, List wifiList, String? userId, String? delegationId, String? groupId, String? deviceId +}); + + + + +} +/// @nodoc +class _$CreateFrequentPlaceRequestModelCopyWithImpl<$Res> + implements $CreateFrequentPlaceRequestModelCopyWith<$Res> { + _$CreateFrequentPlaceRequestModelCopyWithImpl(this._self, this._then); + + final CreateFrequentPlaceRequestModel _self; + final $Res Function(CreateFrequentPlaceRequestModel) _then; + +/// Create a copy of CreateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? lat = null,Object? lng = null,Object? wifiList = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self.wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [CreateFrequentPlaceRequestModel]. +extension CreateFrequentPlaceRequestModelPatterns on CreateFrequentPlaceRequestModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _CreateFrequentPlaceRequestModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _CreateFrequentPlaceRequestModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _CreateFrequentPlaceRequestModel value) $default,){ +final _that = this; +switch (_that) { +case _CreateFrequentPlaceRequestModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _CreateFrequentPlaceRequestModel value)? $default,){ +final _that = this; +switch (_that) { +case _CreateFrequentPlaceRequestModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, double lat, double lng, List wifiList, String? userId, String? delegationId, String? groupId, String? deviceId)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _CreateFrequentPlaceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList,_that.userId,_that.delegationId,_that.groupId,_that.deviceId);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, double lat, double lng, List wifiList, String? userId, String? delegationId, String? groupId, String? deviceId) $default,) {final _that = this; +switch (_that) { +case _CreateFrequentPlaceRequestModel(): +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList,_that.userId,_that.delegationId,_that.groupId,_that.deviceId);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, double lat, double lng, List wifiList, String? userId, String? delegationId, String? groupId, String? deviceId)? $default,) {final _that = this; +switch (_that) { +case _CreateFrequentPlaceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList,_that.userId,_that.delegationId,_that.groupId,_that.deviceId);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _CreateFrequentPlaceRequestModel implements CreateFrequentPlaceRequestModel { + const _CreateFrequentPlaceRequestModel({required this.id, required this.name, required this.lat, required this.lng, final List wifiList = const [], this.userId, this.delegationId, this.groupId, this.deviceId}): _wifiList = wifiList; + factory _CreateFrequentPlaceRequestModel.fromJson(Map json) => _$CreateFrequentPlaceRequestModelFromJson(json); + +@override final String id; +@override final String name; +@override final double lat; +@override final double lng; + final List _wifiList; +@override@JsonKey() List get wifiList { + if (_wifiList is EqualUnmodifiableListView) return _wifiList; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_wifiList); +} + +@override final String? userId; +@override final String? delegationId; +@override final String? groupId; +@override final String? deviceId; + +/// Create a copy of CreateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CreateFrequentPlaceRequestModelCopyWith<_CreateFrequentPlaceRequestModel> get copyWith => __$CreateFrequentPlaceRequestModelCopyWithImpl<_CreateFrequentPlaceRequestModel>(this, _$identity); + +@override +Map toJson() { + return _$CreateFrequentPlaceRequestModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateFrequentPlaceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other._wifiList, _wifiList)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,lat,lng,const DeepCollectionEquality().hash(_wifiList),userId,delegationId,groupId,deviceId); + +@override +String toString() { + return 'CreateFrequentPlaceRequestModel(id: $id, name: $name, lat: $lat, lng: $lng, wifiList: $wifiList, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId)'; +} + + +} + +/// @nodoc +abstract mixin class _$CreateFrequentPlaceRequestModelCopyWith<$Res> implements $CreateFrequentPlaceRequestModelCopyWith<$Res> { + factory _$CreateFrequentPlaceRequestModelCopyWith(_CreateFrequentPlaceRequestModel value, $Res Function(_CreateFrequentPlaceRequestModel) _then) = __$CreateFrequentPlaceRequestModelCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, double lat, double lng, List wifiList, String? userId, String? delegationId, String? groupId, String? deviceId +}); + + + + +} +/// @nodoc +class __$CreateFrequentPlaceRequestModelCopyWithImpl<$Res> + implements _$CreateFrequentPlaceRequestModelCopyWith<$Res> { + __$CreateFrequentPlaceRequestModelCopyWithImpl(this._self, this._then); + + final _CreateFrequentPlaceRequestModel _self; + final $Res Function(_CreateFrequentPlaceRequestModel) _then; + +/// Create a copy of CreateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? lat = null,Object? lng = null,Object? wifiList = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,}) { + return _then(_CreateFrequentPlaceRequestModel( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self._wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.g.dart new file mode 100644 index 00000000..85f5ebf5 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_request_model.g.dart @@ -0,0 +1,41 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_frequent_place_request_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_CreateFrequentPlaceRequestModel _$CreateFrequentPlaceRequestModelFromJson( + Map json, +) => _CreateFrequentPlaceRequestModel( + id: json['id'] as String, + name: json['name'] as String, + lat: (json['lat'] as num).toDouble(), + lng: (json['lng'] as num).toDouble(), + wifiList: + (json['wifiList'] as List?) + ?.map( + (e) => WifiInfoResponseModel.fromJson(e as Map), + ) + .toList() ?? + const [], + userId: json['userId'] as String?, + delegationId: json['delegationId'] as String?, + groupId: json['groupId'] as String?, + deviceId: json['deviceId'] as String?, +); + +Map _$CreateFrequentPlaceRequestModelToJson( + _CreateFrequentPlaceRequestModel instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'lat': instance.lat, + 'lng': instance.lng, + 'wifiList': instance.wifiList, + 'userId': instance.userId, + 'delegationId': instance.delegationId, + 'groupId': instance.groupId, + 'deviceId': instance.deviceId, +}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.dart new file mode 100644 index 00000000..915773f9 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.dart @@ -0,0 +1,24 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/data/models/frequent_places_response_model.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; + +part 'create_frequent_place_response_model.freezed.dart'; +part 'create_frequent_place_response_model.g.dart'; + +@freezed +abstract class CreateFrequentPlaceResponseModel + with _$CreateFrequentPlaceResponseModel { + const factory CreateFrequentPlaceResponseModel({ + required bool isCreated, + required FrequentPlaceItemResponseModel item, + }) = _CreateFrequentPlaceResponseModel; + + factory CreateFrequentPlaceResponseModel.fromJson( + Map json) => + _$CreateFrequentPlaceResponseModelFromJson(json); +} + +extension CreateFrequentPlaceResponseModelMapper + on CreateFrequentPlaceResponseModel { + FrequentPlaceEntity toEntity() => item.toEntity(); +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.freezed.dart new file mode 100644 index 00000000..f650743b --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.freezed.dart @@ -0,0 +1,298 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'create_frequent_place_response_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CreateFrequentPlaceResponseModel { + + bool get isCreated; FrequentPlaceItemResponseModel get item; +/// Create a copy of CreateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CreateFrequentPlaceResponseModelCopyWith get copyWith => _$CreateFrequentPlaceResponseModelCopyWithImpl(this as CreateFrequentPlaceResponseModel, _$identity); + + /// Serializes this CreateFrequentPlaceResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateFrequentPlaceResponseModel&&(identical(other.isCreated, isCreated) || other.isCreated == isCreated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isCreated,item); + +@override +String toString() { + return 'CreateFrequentPlaceResponseModel(isCreated: $isCreated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class $CreateFrequentPlaceResponseModelCopyWith<$Res> { + factory $CreateFrequentPlaceResponseModelCopyWith(CreateFrequentPlaceResponseModel value, $Res Function(CreateFrequentPlaceResponseModel) _then) = _$CreateFrequentPlaceResponseModelCopyWithImpl; +@useResult +$Res call({ + bool isCreated, FrequentPlaceItemResponseModel item +}); + + +$FrequentPlaceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class _$CreateFrequentPlaceResponseModelCopyWithImpl<$Res> + implements $CreateFrequentPlaceResponseModelCopyWith<$Res> { + _$CreateFrequentPlaceResponseModelCopyWithImpl(this._self, this._then); + + final CreateFrequentPlaceResponseModel _self; + final $Res Function(CreateFrequentPlaceResponseModel) _then; + +/// Create a copy of CreateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? isCreated = null,Object? item = null,}) { + return _then(_self.copyWith( +isCreated: null == isCreated ? _self.isCreated : isCreated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as FrequentPlaceItemResponseModel, + )); +} +/// Create a copy of CreateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$FrequentPlaceItemResponseModelCopyWith<$Res> get item { + + return $FrequentPlaceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [CreateFrequentPlaceResponseModel]. +extension CreateFrequentPlaceResponseModelPatterns on CreateFrequentPlaceResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _CreateFrequentPlaceResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _CreateFrequentPlaceResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _CreateFrequentPlaceResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _CreateFrequentPlaceResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _CreateFrequentPlaceResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _CreateFrequentPlaceResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isCreated, FrequentPlaceItemResponseModel item)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _CreateFrequentPlaceResponseModel() when $default != null: +return $default(_that.isCreated,_that.item);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isCreated, FrequentPlaceItemResponseModel item) $default,) {final _that = this; +switch (_that) { +case _CreateFrequentPlaceResponseModel(): +return $default(_that.isCreated,_that.item);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isCreated, FrequentPlaceItemResponseModel item)? $default,) {final _that = this; +switch (_that) { +case _CreateFrequentPlaceResponseModel() when $default != null: +return $default(_that.isCreated,_that.item);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _CreateFrequentPlaceResponseModel implements CreateFrequentPlaceResponseModel { + const _CreateFrequentPlaceResponseModel({required this.isCreated, required this.item}); + factory _CreateFrequentPlaceResponseModel.fromJson(Map json) => _$CreateFrequentPlaceResponseModelFromJson(json); + +@override final bool isCreated; +@override final FrequentPlaceItemResponseModel item; + +/// Create a copy of CreateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CreateFrequentPlaceResponseModelCopyWith<_CreateFrequentPlaceResponseModel> get copyWith => __$CreateFrequentPlaceResponseModelCopyWithImpl<_CreateFrequentPlaceResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$CreateFrequentPlaceResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateFrequentPlaceResponseModel&&(identical(other.isCreated, isCreated) || other.isCreated == isCreated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isCreated,item); + +@override +String toString() { + return 'CreateFrequentPlaceResponseModel(isCreated: $isCreated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class _$CreateFrequentPlaceResponseModelCopyWith<$Res> implements $CreateFrequentPlaceResponseModelCopyWith<$Res> { + factory _$CreateFrequentPlaceResponseModelCopyWith(_CreateFrequentPlaceResponseModel value, $Res Function(_CreateFrequentPlaceResponseModel) _then) = __$CreateFrequentPlaceResponseModelCopyWithImpl; +@override @useResult +$Res call({ + bool isCreated, FrequentPlaceItemResponseModel item +}); + + +@override $FrequentPlaceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class __$CreateFrequentPlaceResponseModelCopyWithImpl<$Res> + implements _$CreateFrequentPlaceResponseModelCopyWith<$Res> { + __$CreateFrequentPlaceResponseModelCopyWithImpl(this._self, this._then); + + final _CreateFrequentPlaceResponseModel _self; + final $Res Function(_CreateFrequentPlaceResponseModel) _then; + +/// Create a copy of CreateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? isCreated = null,Object? item = null,}) { + return _then(_CreateFrequentPlaceResponseModel( +isCreated: null == isCreated ? _self.isCreated : isCreated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as FrequentPlaceItemResponseModel, + )); +} + +/// Create a copy of CreateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$FrequentPlaceItemResponseModelCopyWith<$Res> get item { + + return $FrequentPlaceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.g.dart new file mode 100644 index 00000000..01caad14 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_frequent_place_response_model.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_frequent_place_response_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_CreateFrequentPlaceResponseModel _$CreateFrequentPlaceResponseModelFromJson( + Map json, +) => _CreateFrequentPlaceResponseModel( + isCreated: json['isCreated'] as bool, + item: FrequentPlaceItemResponseModel.fromJson( + json['item'] as Map, + ), +); + +Map _$CreateFrequentPlaceResponseModelToJson( + _CreateFrequentPlaceResponseModel instance, +) => {'isCreated': instance.isCreated, 'item': instance.item}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.dart new file mode 100644 index 00000000..76b289b0 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.dart @@ -0,0 +1,23 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'create_geofence_request_model.freezed.dart'; +part 'create_geofence_request_model.g.dart'; + +@freezed +abstract class CreateGeofenceRequestModel with _$CreateGeofenceRequestModel { + const factory CreateGeofenceRequestModel({ + required String id, + required String name, + String? description, + required double latitude, + required double longitude, + required double radius, + String? userId, + String? delegationId, + String? groupId, + String? deviceId, + }) = _CreateGeofenceRequestModel; + + factory CreateGeofenceRequestModel.fromJson(Map json) => + _$CreateGeofenceRequestModelFromJson(json); +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.freezed.dart new file mode 100644 index 00000000..f9d000d5 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.freezed.dart @@ -0,0 +1,304 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'create_geofence_request_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CreateGeofenceRequestModel { + + String get id; String get name; String? get description; double get latitude; double get longitude; double get radius; String? get userId; String? get delegationId; String? get groupId; String? get deviceId; +/// Create a copy of CreateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CreateGeofenceRequestModelCopyWith get copyWith => _$CreateGeofenceRequestModelCopyWithImpl(this as CreateGeofenceRequestModel, _$identity); + + /// Serializes this CreateGeofenceRequestModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateGeofenceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius,userId,delegationId,groupId,deviceId); + +@override +String toString() { + return 'CreateGeofenceRequestModel(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId)'; +} + + +} + +/// @nodoc +abstract mixin class $CreateGeofenceRequestModelCopyWith<$Res> { + factory $CreateGeofenceRequestModelCopyWith(CreateGeofenceRequestModel value, $Res Function(CreateGeofenceRequestModel) _then) = _$CreateGeofenceRequestModelCopyWithImpl; +@useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId +}); + + + + +} +/// @nodoc +class _$CreateGeofenceRequestModelCopyWithImpl<$Res> + implements $CreateGeofenceRequestModelCopyWith<$Res> { + _$CreateGeofenceRequestModelCopyWithImpl(this._self, this._then); + + final CreateGeofenceRequestModel _self; + final $Res Function(CreateGeofenceRequestModel) _then; + +/// Create a copy of CreateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [CreateGeofenceRequestModel]. +extension CreateGeofenceRequestModelPatterns on CreateGeofenceRequestModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _CreateGeofenceRequestModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _CreateGeofenceRequestModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _CreateGeofenceRequestModel value) $default,){ +final _that = this; +switch (_that) { +case _CreateGeofenceRequestModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _CreateGeofenceRequestModel value)? $default,){ +final _that = this; +switch (_that) { +case _CreateGeofenceRequestModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _CreateGeofenceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.userId,_that.delegationId,_that.groupId,_that.deviceId);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId) $default,) {final _that = this; +switch (_that) { +case _CreateGeofenceRequestModel(): +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.userId,_that.delegationId,_that.groupId,_that.deviceId);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId)? $default,) {final _that = this; +switch (_that) { +case _CreateGeofenceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.userId,_that.delegationId,_that.groupId,_that.deviceId);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _CreateGeofenceRequestModel implements CreateGeofenceRequestModel { + const _CreateGeofenceRequestModel({required this.id, required this.name, this.description, required this.latitude, required this.longitude, required this.radius, this.userId, this.delegationId, this.groupId, this.deviceId}); + factory _CreateGeofenceRequestModel.fromJson(Map json) => _$CreateGeofenceRequestModelFromJson(json); + +@override final String id; +@override final String name; +@override final String? description; +@override final double latitude; +@override final double longitude; +@override final double radius; +@override final String? userId; +@override final String? delegationId; +@override final String? groupId; +@override final String? deviceId; + +/// Create a copy of CreateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CreateGeofenceRequestModelCopyWith<_CreateGeofenceRequestModel> get copyWith => __$CreateGeofenceRequestModelCopyWithImpl<_CreateGeofenceRequestModel>(this, _$identity); + +@override +Map toJson() { + return _$CreateGeofenceRequestModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateGeofenceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius,userId,delegationId,groupId,deviceId); + +@override +String toString() { + return 'CreateGeofenceRequestModel(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId)'; +} + + +} + +/// @nodoc +abstract mixin class _$CreateGeofenceRequestModelCopyWith<$Res> implements $CreateGeofenceRequestModelCopyWith<$Res> { + factory _$CreateGeofenceRequestModelCopyWith(_CreateGeofenceRequestModel value, $Res Function(_CreateGeofenceRequestModel) _then) = __$CreateGeofenceRequestModelCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId +}); + + + + +} +/// @nodoc +class __$CreateGeofenceRequestModelCopyWithImpl<$Res> + implements _$CreateGeofenceRequestModelCopyWith<$Res> { + __$CreateGeofenceRequestModelCopyWithImpl(this._self, this._then); + + final _CreateGeofenceRequestModel _self; + final $Res Function(_CreateGeofenceRequestModel) _then; + +/// Create a copy of CreateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,}) { + return _then(_CreateGeofenceRequestModel( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.g.dart new file mode 100644 index 00000000..44d4ee78 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_request_model.g.dart @@ -0,0 +1,37 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_geofence_request_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_CreateGeofenceRequestModel _$CreateGeofenceRequestModelFromJson( + Map json, +) => _CreateGeofenceRequestModel( + id: json['id'] as String, + name: json['name'] as String, + description: json['description'] as String?, + latitude: (json['latitude'] as num).toDouble(), + longitude: (json['longitude'] as num).toDouble(), + radius: (json['radius'] as num).toDouble(), + userId: json['userId'] as String?, + delegationId: json['delegationId'] as String?, + groupId: json['groupId'] as String?, + deviceId: json['deviceId'] as String?, +); + +Map _$CreateGeofenceRequestModelToJson( + _CreateGeofenceRequestModel instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'description': instance.description, + 'latitude': instance.latitude, + 'longitude': instance.longitude, + 'radius': instance.radius, + 'userId': instance.userId, + 'delegationId': instance.delegationId, + 'groupId': instance.groupId, + 'deviceId': instance.deviceId, +}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.dart new file mode 100644 index 00000000..2230f786 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.dart @@ -0,0 +1,34 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/data/models/geofences_response_model.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; + +part 'create_geofence_response_model.freezed.dart'; +part 'create_geofence_response_model.g.dart'; + +@freezed +abstract class CreateGeofenceResponseModel with _$CreateGeofenceResponseModel { + const factory CreateGeofenceResponseModel({ + required bool isCreated, + required GeofenceItemResponseModel item, + }) = _CreateGeofenceResponseModel; + + factory CreateGeofenceResponseModel.fromJson(Map json) => + _$CreateGeofenceResponseModelFromJson(json); +} + +extension CreateGeofenceResponseModelMapper on CreateGeofenceResponseModel { + GeofenceEntity toEntity() { + return GeofenceEntity( + id: item.id, + name: item.name, + description: item.description, + latitude: item.latitude, + longitude: item.longitude, + radius: item.radius, + isActive: item.isActive, + deviceId: item.deviceId, + createdAt: item.createdAt, + updatedAt: item.updatedAt, + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.freezed.dart new file mode 100644 index 00000000..87862ca7 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.freezed.dart @@ -0,0 +1,298 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'create_geofence_response_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CreateGeofenceResponseModel { + + bool get isCreated; GeofenceItemResponseModel get item; +/// Create a copy of CreateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CreateGeofenceResponseModelCopyWith get copyWith => _$CreateGeofenceResponseModelCopyWithImpl(this as CreateGeofenceResponseModel, _$identity); + + /// Serializes this CreateGeofenceResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateGeofenceResponseModel&&(identical(other.isCreated, isCreated) || other.isCreated == isCreated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isCreated,item); + +@override +String toString() { + return 'CreateGeofenceResponseModel(isCreated: $isCreated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class $CreateGeofenceResponseModelCopyWith<$Res> { + factory $CreateGeofenceResponseModelCopyWith(CreateGeofenceResponseModel value, $Res Function(CreateGeofenceResponseModel) _then) = _$CreateGeofenceResponseModelCopyWithImpl; +@useResult +$Res call({ + bool isCreated, GeofenceItemResponseModel item +}); + + +$GeofenceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class _$CreateGeofenceResponseModelCopyWithImpl<$Res> + implements $CreateGeofenceResponseModelCopyWith<$Res> { + _$CreateGeofenceResponseModelCopyWithImpl(this._self, this._then); + + final CreateGeofenceResponseModel _self; + final $Res Function(CreateGeofenceResponseModel) _then; + +/// Create a copy of CreateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? isCreated = null,Object? item = null,}) { + return _then(_self.copyWith( +isCreated: null == isCreated ? _self.isCreated : isCreated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as GeofenceItemResponseModel, + )); +} +/// Create a copy of CreateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceItemResponseModelCopyWith<$Res> get item { + + return $GeofenceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [CreateGeofenceResponseModel]. +extension CreateGeofenceResponseModelPatterns on CreateGeofenceResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _CreateGeofenceResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _CreateGeofenceResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _CreateGeofenceResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _CreateGeofenceResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _CreateGeofenceResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _CreateGeofenceResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isCreated, GeofenceItemResponseModel item)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _CreateGeofenceResponseModel() when $default != null: +return $default(_that.isCreated,_that.item);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isCreated, GeofenceItemResponseModel item) $default,) {final _that = this; +switch (_that) { +case _CreateGeofenceResponseModel(): +return $default(_that.isCreated,_that.item);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isCreated, GeofenceItemResponseModel item)? $default,) {final _that = this; +switch (_that) { +case _CreateGeofenceResponseModel() when $default != null: +return $default(_that.isCreated,_that.item);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _CreateGeofenceResponseModel implements CreateGeofenceResponseModel { + const _CreateGeofenceResponseModel({required this.isCreated, required this.item}); + factory _CreateGeofenceResponseModel.fromJson(Map json) => _$CreateGeofenceResponseModelFromJson(json); + +@override final bool isCreated; +@override final GeofenceItemResponseModel item; + +/// Create a copy of CreateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CreateGeofenceResponseModelCopyWith<_CreateGeofenceResponseModel> get copyWith => __$CreateGeofenceResponseModelCopyWithImpl<_CreateGeofenceResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$CreateGeofenceResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateGeofenceResponseModel&&(identical(other.isCreated, isCreated) || other.isCreated == isCreated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isCreated,item); + +@override +String toString() { + return 'CreateGeofenceResponseModel(isCreated: $isCreated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class _$CreateGeofenceResponseModelCopyWith<$Res> implements $CreateGeofenceResponseModelCopyWith<$Res> { + factory _$CreateGeofenceResponseModelCopyWith(_CreateGeofenceResponseModel value, $Res Function(_CreateGeofenceResponseModel) _then) = __$CreateGeofenceResponseModelCopyWithImpl; +@override @useResult +$Res call({ + bool isCreated, GeofenceItemResponseModel item +}); + + +@override $GeofenceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class __$CreateGeofenceResponseModelCopyWithImpl<$Res> + implements _$CreateGeofenceResponseModelCopyWith<$Res> { + __$CreateGeofenceResponseModelCopyWithImpl(this._self, this._then); + + final _CreateGeofenceResponseModel _self; + final $Res Function(_CreateGeofenceResponseModel) _then; + +/// Create a copy of CreateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? isCreated = null,Object? item = null,}) { + return _then(_CreateGeofenceResponseModel( +isCreated: null == isCreated ? _self.isCreated : isCreated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as GeofenceItemResponseModel, + )); +} + +/// Create a copy of CreateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceItemResponseModelCopyWith<$Res> get item { + + return $GeofenceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.g.dart new file mode 100644 index 00000000..0e1a0e00 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/create_geofence_response_model.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_geofence_response_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_CreateGeofenceResponseModel _$CreateGeofenceResponseModelFromJson( + Map json, +) => _CreateGeofenceResponseModel( + isCreated: json['isCreated'] as bool, + item: GeofenceItemResponseModel.fromJson( + json['item'] as Map, + ), +); + +Map _$CreateGeofenceResponseModelToJson( + _CreateGeofenceResponseModel instance, +) => {'isCreated': instance.isCreated, 'item': instance.item}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.dart new file mode 100644 index 00000000..3e2f63dc --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.dart @@ -0,0 +1,81 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; + +part 'frequent_places_response_model.freezed.dart'; +part 'frequent_places_response_model.g.dart'; + +@freezed +abstract class FrequentPlacesResponseModel with _$FrequentPlacesResponseModel { + const factory FrequentPlacesResponseModel({ + required List items, + int? total, + int? page, + int? pages, + }) = _FrequentPlacesResponseModel; + + factory FrequentPlacesResponseModel.fromJson(Map json) => + _$FrequentPlacesResponseModelFromJson(json); +} + +@freezed +abstract class FrequentPlaceItemResponseModel + with _$FrequentPlaceItemResponseModel { + const factory FrequentPlaceItemResponseModel({ + required String id, + required String name, + String? userId, + String? delegationId, + String? groupId, + String? deviceId, + required double lat, + required double lng, + @Default([]) List wifiList, + required int createdAt, + int? updatedAt, + }) = _FrequentPlaceItemResponseModel; + + factory FrequentPlaceItemResponseModel.fromJson(Map json) => + _$FrequentPlaceItemResponseModelFromJson(json); +} + +@freezed +abstract class WifiInfoResponseModel with _$WifiInfoResponseModel { + const factory WifiInfoResponseModel({ + required String SSID, + required String BSSID, + required String signal, + }) = _WifiInfoResponseModel; + + factory WifiInfoResponseModel.fromJson(Map json) => + _$WifiInfoResponseModelFromJson(json); +} + +extension FrequentPlacesResponseModelMapper on FrequentPlacesResponseModel { + List toEntity() { + return items.map((item) => item.toEntity()).toList(); + } +} + +extension FrequentPlaceItemResponseModelMapper + on FrequentPlaceItemResponseModel { + FrequentPlaceEntity toEntity() { + return FrequentPlaceEntity( + id: id, + name: name, + lat: lat, + lng: lng, + wifiList: wifiList + .map( + (w) => WifiInfoEntity( + ssid: w.SSID, + bssid: w.BSSID, + signal: w.signal, + ), + ) + .toList(), + deviceId: deviceId, + createdAt: createdAt, + updatedAt: updatedAt, + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.freezed.dart new file mode 100644 index 00000000..0c4b72ae --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.freezed.dart @@ -0,0 +1,860 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'frequent_places_response_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$FrequentPlacesResponseModel { + + List get items; int? get total; int? get page; int? get pages; +/// Create a copy of FrequentPlacesResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$FrequentPlacesResponseModelCopyWith get copyWith => _$FrequentPlacesResponseModelCopyWithImpl(this as FrequentPlacesResponseModel, _$identity); + + /// Serializes this FrequentPlacesResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is FrequentPlacesResponseModel&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(items),total,page,pages); + +@override +String toString() { + return 'FrequentPlacesResponseModel(items: $items, total: $total, page: $page, pages: $pages)'; +} + + +} + +/// @nodoc +abstract mixin class $FrequentPlacesResponseModelCopyWith<$Res> { + factory $FrequentPlacesResponseModelCopyWith(FrequentPlacesResponseModel value, $Res Function(FrequentPlacesResponseModel) _then) = _$FrequentPlacesResponseModelCopyWithImpl; +@useResult +$Res call({ + List items, int? total, int? page, int? pages +}); + + + + +} +/// @nodoc +class _$FrequentPlacesResponseModelCopyWithImpl<$Res> + implements $FrequentPlacesResponseModelCopyWith<$Res> { + _$FrequentPlacesResponseModelCopyWithImpl(this._self, this._then); + + final FrequentPlacesResponseModel _self; + final $Res Function(FrequentPlacesResponseModel) _then; + +/// Create a copy of FrequentPlacesResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? items = null,Object? total = freezed,Object? page = freezed,Object? pages = freezed,}) { + return _then(_self.copyWith( +items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable +as List,total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as int?,page: freezed == page ? _self.page : page // ignore: cast_nullable_to_non_nullable +as int?,pages: freezed == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [FrequentPlacesResponseModel]. +extension FrequentPlacesResponseModelPatterns on FrequentPlacesResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FrequentPlacesResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FrequentPlacesResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FrequentPlacesResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _FrequentPlacesResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FrequentPlacesResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _FrequentPlacesResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List items, int? total, int? page, int? pages)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FrequentPlacesResponseModel() when $default != null: +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List items, int? total, int? page, int? pages) $default,) {final _that = this; +switch (_that) { +case _FrequentPlacesResponseModel(): +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List items, int? total, int? page, int? pages)? $default,) {final _that = this; +switch (_that) { +case _FrequentPlacesResponseModel() when $default != null: +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _FrequentPlacesResponseModel implements FrequentPlacesResponseModel { + const _FrequentPlacesResponseModel({required final List items, this.total, this.page, this.pages}): _items = items; + factory _FrequentPlacesResponseModel.fromJson(Map json) => _$FrequentPlacesResponseModelFromJson(json); + + final List _items; +@override List get items { + if (_items is EqualUnmodifiableListView) return _items; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_items); +} + +@override final int? total; +@override final int? page; +@override final int? pages; + +/// Create a copy of FrequentPlacesResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FrequentPlacesResponseModelCopyWith<_FrequentPlacesResponseModel> get copyWith => __$FrequentPlacesResponseModelCopyWithImpl<_FrequentPlacesResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$FrequentPlacesResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FrequentPlacesResponseModel&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_items),total,page,pages); + +@override +String toString() { + return 'FrequentPlacesResponseModel(items: $items, total: $total, page: $page, pages: $pages)'; +} + + +} + +/// @nodoc +abstract mixin class _$FrequentPlacesResponseModelCopyWith<$Res> implements $FrequentPlacesResponseModelCopyWith<$Res> { + factory _$FrequentPlacesResponseModelCopyWith(_FrequentPlacesResponseModel value, $Res Function(_FrequentPlacesResponseModel) _then) = __$FrequentPlacesResponseModelCopyWithImpl; +@override @useResult +$Res call({ + List items, int? total, int? page, int? pages +}); + + + + +} +/// @nodoc +class __$FrequentPlacesResponseModelCopyWithImpl<$Res> + implements _$FrequentPlacesResponseModelCopyWith<$Res> { + __$FrequentPlacesResponseModelCopyWithImpl(this._self, this._then); + + final _FrequentPlacesResponseModel _self; + final $Res Function(_FrequentPlacesResponseModel) _then; + +/// Create a copy of FrequentPlacesResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? items = null,Object? total = freezed,Object? page = freezed,Object? pages = freezed,}) { + return _then(_FrequentPlacesResponseModel( +items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable +as List,total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as int?,page: freezed == page ? _self.page : page // ignore: cast_nullable_to_non_nullable +as int?,pages: freezed == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + +} + + +/// @nodoc +mixin _$FrequentPlaceItemResponseModel { + + String get id; String get name; String? get userId; String? get delegationId; String? get groupId; String? get deviceId; double get lat; double get lng; List get wifiList; int get createdAt; int? get updatedAt; +/// Create a copy of FrequentPlaceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$FrequentPlaceItemResponseModelCopyWith get copyWith => _$FrequentPlaceItemResponseModelCopyWithImpl(this as FrequentPlaceItemResponseModel, _$identity); + + /// Serializes this FrequentPlaceItemResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is FrequentPlaceItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other.wifiList, wifiList)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,userId,delegationId,groupId,deviceId,lat,lng,const DeepCollectionEquality().hash(wifiList),createdAt,updatedAt); + +@override +String toString() { + return 'FrequentPlaceItemResponseModel(id: $id, name: $name, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId, lat: $lat, lng: $lng, wifiList: $wifiList, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class $FrequentPlaceItemResponseModelCopyWith<$Res> { + factory $FrequentPlaceItemResponseModelCopyWith(FrequentPlaceItemResponseModel value, $Res Function(FrequentPlaceItemResponseModel) _then) = _$FrequentPlaceItemResponseModelCopyWithImpl; +@useResult +$Res call({ + String id, String name, String? userId, String? delegationId, String? groupId, String? deviceId, double lat, double lng, List wifiList, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class _$FrequentPlaceItemResponseModelCopyWithImpl<$Res> + implements $FrequentPlaceItemResponseModelCopyWith<$Res> { + _$FrequentPlaceItemResponseModelCopyWithImpl(this._self, this._then); + + final FrequentPlaceItemResponseModel _self; + final $Res Function(FrequentPlaceItemResponseModel) _then; + +/// Create a copy of FrequentPlaceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,Object? lat = null,Object? lng = null,Object? wifiList = null,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self.wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [FrequentPlaceItemResponseModel]. +extension FrequentPlaceItemResponseModelPatterns on FrequentPlaceItemResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FrequentPlaceItemResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FrequentPlaceItemResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FrequentPlaceItemResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _FrequentPlaceItemResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FrequentPlaceItemResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _FrequentPlaceItemResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, String? userId, String? delegationId, String? groupId, String? deviceId, double lat, double lng, List wifiList, int createdAt, int? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FrequentPlaceItemResponseModel() when $default != null: +return $default(_that.id,_that.name,_that.userId,_that.delegationId,_that.groupId,_that.deviceId,_that.lat,_that.lng,_that.wifiList,_that.createdAt,_that.updatedAt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, String? userId, String? delegationId, String? groupId, String? deviceId, double lat, double lng, List wifiList, int createdAt, int? updatedAt) $default,) {final _that = this; +switch (_that) { +case _FrequentPlaceItemResponseModel(): +return $default(_that.id,_that.name,_that.userId,_that.delegationId,_that.groupId,_that.deviceId,_that.lat,_that.lng,_that.wifiList,_that.createdAt,_that.updatedAt);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, String? userId, String? delegationId, String? groupId, String? deviceId, double lat, double lng, List wifiList, int createdAt, int? updatedAt)? $default,) {final _that = this; +switch (_that) { +case _FrequentPlaceItemResponseModel() when $default != null: +return $default(_that.id,_that.name,_that.userId,_that.delegationId,_that.groupId,_that.deviceId,_that.lat,_that.lng,_that.wifiList,_that.createdAt,_that.updatedAt);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _FrequentPlaceItemResponseModel implements FrequentPlaceItemResponseModel { + const _FrequentPlaceItemResponseModel({required this.id, required this.name, this.userId, this.delegationId, this.groupId, this.deviceId, required this.lat, required this.lng, final List wifiList = const [], required this.createdAt, this.updatedAt}): _wifiList = wifiList; + factory _FrequentPlaceItemResponseModel.fromJson(Map json) => _$FrequentPlaceItemResponseModelFromJson(json); + +@override final String id; +@override final String name; +@override final String? userId; +@override final String? delegationId; +@override final String? groupId; +@override final String? deviceId; +@override final double lat; +@override final double lng; + final List _wifiList; +@override@JsonKey() List get wifiList { + if (_wifiList is EqualUnmodifiableListView) return _wifiList; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_wifiList); +} + +@override final int createdAt; +@override final int? updatedAt; + +/// Create a copy of FrequentPlaceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FrequentPlaceItemResponseModelCopyWith<_FrequentPlaceItemResponseModel> get copyWith => __$FrequentPlaceItemResponseModelCopyWithImpl<_FrequentPlaceItemResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$FrequentPlaceItemResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FrequentPlaceItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other._wifiList, _wifiList)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,userId,delegationId,groupId,deviceId,lat,lng,const DeepCollectionEquality().hash(_wifiList),createdAt,updatedAt); + +@override +String toString() { + return 'FrequentPlaceItemResponseModel(id: $id, name: $name, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId, lat: $lat, lng: $lng, wifiList: $wifiList, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class _$FrequentPlaceItemResponseModelCopyWith<$Res> implements $FrequentPlaceItemResponseModelCopyWith<$Res> { + factory _$FrequentPlaceItemResponseModelCopyWith(_FrequentPlaceItemResponseModel value, $Res Function(_FrequentPlaceItemResponseModel) _then) = __$FrequentPlaceItemResponseModelCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, String? userId, String? delegationId, String? groupId, String? deviceId, double lat, double lng, List wifiList, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class __$FrequentPlaceItemResponseModelCopyWithImpl<$Res> + implements _$FrequentPlaceItemResponseModelCopyWith<$Res> { + __$FrequentPlaceItemResponseModelCopyWithImpl(this._self, this._then); + + final _FrequentPlaceItemResponseModel _self; + final $Res Function(_FrequentPlaceItemResponseModel) _then; + +/// Create a copy of FrequentPlaceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,Object? lat = null,Object? lng = null,Object? wifiList = null,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_FrequentPlaceItemResponseModel( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self._wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + +} + + +/// @nodoc +mixin _$WifiInfoResponseModel { + + String get SSID; String get BSSID; String get signal; +/// Create a copy of WifiInfoResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$WifiInfoResponseModelCopyWith get copyWith => _$WifiInfoResponseModelCopyWithImpl(this as WifiInfoResponseModel, _$identity); + + /// Serializes this WifiInfoResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WifiInfoResponseModel&&(identical(other.SSID, SSID) || other.SSID == SSID)&&(identical(other.BSSID, BSSID) || other.BSSID == BSSID)&&(identical(other.signal, signal) || other.signal == signal)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,SSID,BSSID,signal); + +@override +String toString() { + return 'WifiInfoResponseModel(SSID: $SSID, BSSID: $BSSID, signal: $signal)'; +} + + +} + +/// @nodoc +abstract mixin class $WifiInfoResponseModelCopyWith<$Res> { + factory $WifiInfoResponseModelCopyWith(WifiInfoResponseModel value, $Res Function(WifiInfoResponseModel) _then) = _$WifiInfoResponseModelCopyWithImpl; +@useResult +$Res call({ + String SSID, String BSSID, String signal +}); + + + + +} +/// @nodoc +class _$WifiInfoResponseModelCopyWithImpl<$Res> + implements $WifiInfoResponseModelCopyWith<$Res> { + _$WifiInfoResponseModelCopyWithImpl(this._self, this._then); + + final WifiInfoResponseModel _self; + final $Res Function(WifiInfoResponseModel) _then; + +/// Create a copy of WifiInfoResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? SSID = null,Object? BSSID = null,Object? signal = null,}) { + return _then(_self.copyWith( +SSID: null == SSID ? _self.SSID : SSID // ignore: cast_nullable_to_non_nullable +as String,BSSID: null == BSSID ? _self.BSSID : BSSID // ignore: cast_nullable_to_non_nullable +as String,signal: null == signal ? _self.signal : signal // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [WifiInfoResponseModel]. +extension WifiInfoResponseModelPatterns on WifiInfoResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _WifiInfoResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _WifiInfoResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _WifiInfoResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _WifiInfoResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _WifiInfoResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _WifiInfoResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String SSID, String BSSID, String signal)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _WifiInfoResponseModel() when $default != null: +return $default(_that.SSID,_that.BSSID,_that.signal);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String SSID, String BSSID, String signal) $default,) {final _that = this; +switch (_that) { +case _WifiInfoResponseModel(): +return $default(_that.SSID,_that.BSSID,_that.signal);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String SSID, String BSSID, String signal)? $default,) {final _that = this; +switch (_that) { +case _WifiInfoResponseModel() when $default != null: +return $default(_that.SSID,_that.BSSID,_that.signal);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _WifiInfoResponseModel implements WifiInfoResponseModel { + const _WifiInfoResponseModel({required this.SSID, required this.BSSID, required this.signal}); + factory _WifiInfoResponseModel.fromJson(Map json) => _$WifiInfoResponseModelFromJson(json); + +@override final String SSID; +@override final String BSSID; +@override final String signal; + +/// Create a copy of WifiInfoResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$WifiInfoResponseModelCopyWith<_WifiInfoResponseModel> get copyWith => __$WifiInfoResponseModelCopyWithImpl<_WifiInfoResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$WifiInfoResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _WifiInfoResponseModel&&(identical(other.SSID, SSID) || other.SSID == SSID)&&(identical(other.BSSID, BSSID) || other.BSSID == BSSID)&&(identical(other.signal, signal) || other.signal == signal)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,SSID,BSSID,signal); + +@override +String toString() { + return 'WifiInfoResponseModel(SSID: $SSID, BSSID: $BSSID, signal: $signal)'; +} + + +} + +/// @nodoc +abstract mixin class _$WifiInfoResponseModelCopyWith<$Res> implements $WifiInfoResponseModelCopyWith<$Res> { + factory _$WifiInfoResponseModelCopyWith(_WifiInfoResponseModel value, $Res Function(_WifiInfoResponseModel) _then) = __$WifiInfoResponseModelCopyWithImpl; +@override @useResult +$Res call({ + String SSID, String BSSID, String signal +}); + + + + +} +/// @nodoc +class __$WifiInfoResponseModelCopyWithImpl<$Res> + implements _$WifiInfoResponseModelCopyWith<$Res> { + __$WifiInfoResponseModelCopyWithImpl(this._self, this._then); + + final _WifiInfoResponseModel _self; + final $Res Function(_WifiInfoResponseModel) _then; + +/// Create a copy of WifiInfoResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? SSID = null,Object? BSSID = null,Object? signal = null,}) { + return _then(_WifiInfoResponseModel( +SSID: null == SSID ? _self.SSID : SSID // ignore: cast_nullable_to_non_nullable +as String,BSSID: null == BSSID ? _self.BSSID : BSSID // ignore: cast_nullable_to_non_nullable +as String,signal: null == signal ? _self.signal : signal // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.g.dart new file mode 100644 index 00000000..adf77c5d --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/frequent_places_response_model.g.dart @@ -0,0 +1,84 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'frequent_places_response_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_FrequentPlacesResponseModel _$FrequentPlacesResponseModelFromJson( + Map json, +) => _FrequentPlacesResponseModel( + items: (json['items'] as List) + .map( + (e) => + FrequentPlaceItemResponseModel.fromJson(e as Map), + ) + .toList(), + total: (json['total'] as num?)?.toInt(), + page: (json['page'] as num?)?.toInt(), + pages: (json['pages'] as num?)?.toInt(), +); + +Map _$FrequentPlacesResponseModelToJson( + _FrequentPlacesResponseModel instance, +) => { + 'items': instance.items, + 'total': instance.total, + 'page': instance.page, + 'pages': instance.pages, +}; + +_FrequentPlaceItemResponseModel _$FrequentPlaceItemResponseModelFromJson( + Map json, +) => _FrequentPlaceItemResponseModel( + id: json['id'] as String, + name: json['name'] as String, + userId: json['userId'] as String?, + delegationId: json['delegationId'] as String?, + groupId: json['groupId'] as String?, + deviceId: json['deviceId'] as String?, + lat: (json['lat'] as num).toDouble(), + lng: (json['lng'] as num).toDouble(), + wifiList: + (json['wifiList'] as List?) + ?.map( + (e) => WifiInfoResponseModel.fromJson(e as Map), + ) + .toList() ?? + const [], + createdAt: (json['createdAt'] as num).toInt(), + updatedAt: (json['updatedAt'] as num?)?.toInt(), +); + +Map _$FrequentPlaceItemResponseModelToJson( + _FrequentPlaceItemResponseModel instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'userId': instance.userId, + 'delegationId': instance.delegationId, + 'groupId': instance.groupId, + 'deviceId': instance.deviceId, + 'lat': instance.lat, + 'lng': instance.lng, + 'wifiList': instance.wifiList, + 'createdAt': instance.createdAt, + 'updatedAt': instance.updatedAt, +}; + +_WifiInfoResponseModel _$WifiInfoResponseModelFromJson( + Map json, +) => _WifiInfoResponseModel( + SSID: json['SSID'] as String, + BSSID: json['BSSID'] as String, + signal: json['signal'] as String, +); + +Map _$WifiInfoResponseModelToJson( + _WifiInfoResponseModel instance, +) => { + 'SSID': instance.SSID, + 'BSSID': instance.BSSID, + 'signal': instance.signal, +}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.dart new file mode 100644 index 00000000..680e2f5d --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.dart @@ -0,0 +1,61 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; + +part 'geofences_response_model.freezed.dart'; +part 'geofences_response_model.g.dart'; + +@freezed +abstract class GeofencesResponseModel with _$GeofencesResponseModel { + const factory GeofencesResponseModel({ + required List items, + int? total, + int? page, + int? pages, + }) = _GeofencesResponseModel; + + factory GeofencesResponseModel.fromJson(Map json) => + _$GeofencesResponseModelFromJson(json); +} + +@freezed +abstract class GeofenceItemResponseModel with _$GeofenceItemResponseModel { + const factory GeofenceItemResponseModel({ + required String id, + required String name, + String? description, + required double latitude, + required double longitude, + required double radius, + String? userId, + String? delegationId, + String? groupId, + String? deviceId, + required bool isActive, + required int createdAt, + int? updatedAt, + }) = _GeofenceItemResponseModel; + + factory GeofenceItemResponseModel.fromJson(Map json) => + _$GeofenceItemResponseModelFromJson(json); +} + +extension GeofencesResponseModelMapper on GeofencesResponseModel { + List toEntity() { + return items + .map( + (item) => GeofenceEntity( + id: item.id, + name: item.name, + description: item.description, + latitude: item.latitude, + longitude: item.longitude, + radius: item.radius, + isActive: item.isActive, + deviceId: item.deviceId, + createdAt: item.createdAt, + updatedAt: item.updatedAt, + ), + ) + .toList(); + } +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.freezed.dart new file mode 100644 index 00000000..9f81feb6 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.freezed.dart @@ -0,0 +1,591 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'geofences_response_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$GeofencesResponseModel { + + List get items; int? get total; int? get page; int? get pages; +/// Create a copy of GeofencesResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$GeofencesResponseModelCopyWith get copyWith => _$GeofencesResponseModelCopyWithImpl(this as GeofencesResponseModel, _$identity); + + /// Serializes this GeofencesResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is GeofencesResponseModel&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(items),total,page,pages); + +@override +String toString() { + return 'GeofencesResponseModel(items: $items, total: $total, page: $page, pages: $pages)'; +} + + +} + +/// @nodoc +abstract mixin class $GeofencesResponseModelCopyWith<$Res> { + factory $GeofencesResponseModelCopyWith(GeofencesResponseModel value, $Res Function(GeofencesResponseModel) _then) = _$GeofencesResponseModelCopyWithImpl; +@useResult +$Res call({ + List items, int? total, int? page, int? pages +}); + + + + +} +/// @nodoc +class _$GeofencesResponseModelCopyWithImpl<$Res> + implements $GeofencesResponseModelCopyWith<$Res> { + _$GeofencesResponseModelCopyWithImpl(this._self, this._then); + + final GeofencesResponseModel _self; + final $Res Function(GeofencesResponseModel) _then; + +/// Create a copy of GeofencesResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? items = null,Object? total = freezed,Object? page = freezed,Object? pages = freezed,}) { + return _then(_self.copyWith( +items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable +as List,total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as int?,page: freezed == page ? _self.page : page // ignore: cast_nullable_to_non_nullable +as int?,pages: freezed == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [GeofencesResponseModel]. +extension GeofencesResponseModelPatterns on GeofencesResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _GeofencesResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _GeofencesResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _GeofencesResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _GeofencesResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _GeofencesResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _GeofencesResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List items, int? total, int? page, int? pages)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _GeofencesResponseModel() when $default != null: +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List items, int? total, int? page, int? pages) $default,) {final _that = this; +switch (_that) { +case _GeofencesResponseModel(): +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List items, int? total, int? page, int? pages)? $default,) {final _that = this; +switch (_that) { +case _GeofencesResponseModel() when $default != null: +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _GeofencesResponseModel implements GeofencesResponseModel { + const _GeofencesResponseModel({required final List items, this.total, this.page, this.pages}): _items = items; + factory _GeofencesResponseModel.fromJson(Map json) => _$GeofencesResponseModelFromJson(json); + + final List _items; +@override List get items { + if (_items is EqualUnmodifiableListView) return _items; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_items); +} + +@override final int? total; +@override final int? page; +@override final int? pages; + +/// Create a copy of GeofencesResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$GeofencesResponseModelCopyWith<_GeofencesResponseModel> get copyWith => __$GeofencesResponseModelCopyWithImpl<_GeofencesResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$GeofencesResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _GeofencesResponseModel&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_items),total,page,pages); + +@override +String toString() { + return 'GeofencesResponseModel(items: $items, total: $total, page: $page, pages: $pages)'; +} + + +} + +/// @nodoc +abstract mixin class _$GeofencesResponseModelCopyWith<$Res> implements $GeofencesResponseModelCopyWith<$Res> { + factory _$GeofencesResponseModelCopyWith(_GeofencesResponseModel value, $Res Function(_GeofencesResponseModel) _then) = __$GeofencesResponseModelCopyWithImpl; +@override @useResult +$Res call({ + List items, int? total, int? page, int? pages +}); + + + + +} +/// @nodoc +class __$GeofencesResponseModelCopyWithImpl<$Res> + implements _$GeofencesResponseModelCopyWith<$Res> { + __$GeofencesResponseModelCopyWithImpl(this._self, this._then); + + final _GeofencesResponseModel _self; + final $Res Function(_GeofencesResponseModel) _then; + +/// Create a copy of GeofencesResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? items = null,Object? total = freezed,Object? page = freezed,Object? pages = freezed,}) { + return _then(_GeofencesResponseModel( +items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable +as List,total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as int?,page: freezed == page ? _self.page : page // ignore: cast_nullable_to_non_nullable +as int?,pages: freezed == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + +} + + +/// @nodoc +mixin _$GeofenceItemResponseModel { + + String get id; String get name; String? get description; double get latitude; double get longitude; double get radius; String? get userId; String? get delegationId; String? get groupId; String? get deviceId; bool get isActive; int get createdAt; int? get updatedAt; +/// Create a copy of GeofenceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$GeofenceItemResponseModelCopyWith get copyWith => _$GeofenceItemResponseModelCopyWithImpl(this as GeofenceItemResponseModel, _$identity); + + /// Serializes this GeofenceItemResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is GeofenceItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius,userId,delegationId,groupId,deviceId,isActive,createdAt,updatedAt); + +@override +String toString() { + return 'GeofenceItemResponseModel(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class $GeofenceItemResponseModelCopyWith<$Res> { + factory $GeofenceItemResponseModelCopyWith(GeofenceItemResponseModel value, $Res Function(GeofenceItemResponseModel) _then) = _$GeofenceItemResponseModelCopyWithImpl; +@useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId, bool isActive, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class _$GeofenceItemResponseModelCopyWithImpl<$Res> + implements $GeofenceItemResponseModelCopyWith<$Res> { + _$GeofenceItemResponseModelCopyWithImpl(this._self, this._then); + + final GeofenceItemResponseModel _self; + final $Res Function(GeofenceItemResponseModel) _then; + +/// Create a copy of GeofenceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,Object? isActive = null,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable +as bool,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [GeofenceItemResponseModel]. +extension GeofenceItemResponseModelPatterns on GeofenceItemResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _GeofenceItemResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _GeofenceItemResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _GeofenceItemResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _GeofenceItemResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _GeofenceItemResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _GeofenceItemResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId, bool isActive, int createdAt, int? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _GeofenceItemResponseModel() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.userId,_that.delegationId,_that.groupId,_that.deviceId,_that.isActive,_that.createdAt,_that.updatedAt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId, bool isActive, int createdAt, int? updatedAt) $default,) {final _that = this; +switch (_that) { +case _GeofenceItemResponseModel(): +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.userId,_that.delegationId,_that.groupId,_that.deviceId,_that.isActive,_that.createdAt,_that.updatedAt);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId, bool isActive, int createdAt, int? updatedAt)? $default,) {final _that = this; +switch (_that) { +case _GeofenceItemResponseModel() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.userId,_that.delegationId,_that.groupId,_that.deviceId,_that.isActive,_that.createdAt,_that.updatedAt);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _GeofenceItemResponseModel implements GeofenceItemResponseModel { + const _GeofenceItemResponseModel({required this.id, required this.name, this.description, required this.latitude, required this.longitude, required this.radius, this.userId, this.delegationId, this.groupId, this.deviceId, required this.isActive, required this.createdAt, this.updatedAt}); + factory _GeofenceItemResponseModel.fromJson(Map json) => _$GeofenceItemResponseModelFromJson(json); + +@override final String id; +@override final String name; +@override final String? description; +@override final double latitude; +@override final double longitude; +@override final double radius; +@override final String? userId; +@override final String? delegationId; +@override final String? groupId; +@override final String? deviceId; +@override final bool isActive; +@override final int createdAt; +@override final int? updatedAt; + +/// Create a copy of GeofenceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$GeofenceItemResponseModelCopyWith<_GeofenceItemResponseModel> get copyWith => __$GeofenceItemResponseModelCopyWithImpl<_GeofenceItemResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$GeofenceItemResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _GeofenceItemResponseModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius,userId,delegationId,groupId,deviceId,isActive,createdAt,updatedAt); + +@override +String toString() { + return 'GeofenceItemResponseModel(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius, userId: $userId, delegationId: $delegationId, groupId: $groupId, deviceId: $deviceId, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class _$GeofenceItemResponseModelCopyWith<$Res> implements $GeofenceItemResponseModelCopyWith<$Res> { + factory _$GeofenceItemResponseModelCopyWith(_GeofenceItemResponseModel value, $Res Function(_GeofenceItemResponseModel) _then) = __$GeofenceItemResponseModelCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius, String? userId, String? delegationId, String? groupId, String? deviceId, bool isActive, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class __$GeofenceItemResponseModelCopyWithImpl<$Res> + implements _$GeofenceItemResponseModelCopyWith<$Res> { + __$GeofenceItemResponseModelCopyWithImpl(this._self, this._then); + + final _GeofenceItemResponseModel _self; + final $Res Function(_GeofenceItemResponseModel) _then; + +/// Create a copy of GeofenceItemResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,Object? userId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? deviceId = freezed,Object? isActive = null,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_GeofenceItemResponseModel( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable +as String?,delegationId: freezed == delegationId ? _self.delegationId : delegationId // ignore: cast_nullable_to_non_nullable +as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable +as String?,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable +as bool,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.g.dart new file mode 100644 index 00000000..afcd75c7 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/geofences_response_model.g.dart @@ -0,0 +1,63 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'geofences_response_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_GeofencesResponseModel _$GeofencesResponseModelFromJson( + Map json, +) => _GeofencesResponseModel( + items: (json['items'] as List) + .map((e) => GeofenceItemResponseModel.fromJson(e as Map)) + .toList(), + total: (json['total'] as num?)?.toInt(), + page: (json['page'] as num?)?.toInt(), + pages: (json['pages'] as num?)?.toInt(), +); + +Map _$GeofencesResponseModelToJson( + _GeofencesResponseModel instance, +) => { + 'items': instance.items, + 'total': instance.total, + 'page': instance.page, + 'pages': instance.pages, +}; + +_GeofenceItemResponseModel _$GeofenceItemResponseModelFromJson( + Map json, +) => _GeofenceItemResponseModel( + id: json['id'] as String, + name: json['name'] as String, + description: json['description'] as String?, + latitude: (json['latitude'] as num).toDouble(), + longitude: (json['longitude'] as num).toDouble(), + radius: (json['radius'] as num).toDouble(), + userId: json['userId'] as String?, + delegationId: json['delegationId'] as String?, + groupId: json['groupId'] as String?, + deviceId: json['deviceId'] as String?, + isActive: json['isActive'] as bool, + createdAt: (json['createdAt'] as num).toInt(), + updatedAt: (json['updatedAt'] as num?)?.toInt(), +); + +Map _$GeofenceItemResponseModelToJson( + _GeofenceItemResponseModel instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'description': instance.description, + 'latitude': instance.latitude, + 'longitude': instance.longitude, + 'radius': instance.radius, + 'userId': instance.userId, + 'delegationId': instance.delegationId, + 'groupId': instance.groupId, + 'deviceId': instance.deviceId, + 'isActive': instance.isActive, + 'createdAt': instance.createdAt, + 'updatedAt': instance.updatedAt, +}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.dart new file mode 100644 index 00000000..5cbc03d8 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.dart @@ -0,0 +1,25 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'position_history_response_model.freezed.dart'; +part 'position_history_response_model.g.dart'; + +@freezed +abstract class PositionHistoryResponseModel + with _$PositionHistoryResponseModel { + const factory PositionHistoryResponseModel({ + required List items, + required int total, + required int page, + required int pages, + }) = _PositionHistoryResponseModel; + + factory PositionHistoryResponseModel.fromJson(Map json) => + _$PositionHistoryResponseModelFromJson(json); +} + +extension PositionHistoryResponseModelMapper on PositionHistoryResponseModel { + List toEntity() { + return LatestPositionsResponseModel(items: items).toEntity(); + } +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.freezed.dart new file mode 100644 index 00000000..48f9faf8 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.freezed.dart @@ -0,0 +1,292 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'position_history_response_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$PositionHistoryResponseModel { + + List get items; int get total; int get page; int get pages; +/// Create a copy of PositionHistoryResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PositionHistoryResponseModelCopyWith get copyWith => _$PositionHistoryResponseModelCopyWithImpl(this as PositionHistoryResponseModel, _$identity); + + /// Serializes this PositionHistoryResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PositionHistoryResponseModel&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(items),total,page,pages); + +@override +String toString() { + return 'PositionHistoryResponseModel(items: $items, total: $total, page: $page, pages: $pages)'; +} + + +} + +/// @nodoc +abstract mixin class $PositionHistoryResponseModelCopyWith<$Res> { + factory $PositionHistoryResponseModelCopyWith(PositionHistoryResponseModel value, $Res Function(PositionHistoryResponseModel) _then) = _$PositionHistoryResponseModelCopyWithImpl; +@useResult +$Res call({ + List items, int total, int page, int pages +}); + + + + +} +/// @nodoc +class _$PositionHistoryResponseModelCopyWithImpl<$Res> + implements $PositionHistoryResponseModelCopyWith<$Res> { + _$PositionHistoryResponseModelCopyWithImpl(this._self, this._then); + + final PositionHistoryResponseModel _self; + final $Res Function(PositionHistoryResponseModel) _then; + +/// Create a copy of PositionHistoryResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? items = null,Object? total = null,Object? page = null,Object? pages = null,}) { + return _then(_self.copyWith( +items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable +as List,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as int,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable +as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [PositionHistoryResponseModel]. +extension PositionHistoryResponseModelPatterns on PositionHistoryResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _PositionHistoryResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _PositionHistoryResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _PositionHistoryResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _PositionHistoryResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _PositionHistoryResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _PositionHistoryResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List items, int total, int page, int pages)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _PositionHistoryResponseModel() when $default != null: +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List items, int total, int page, int pages) $default,) {final _that = this; +switch (_that) { +case _PositionHistoryResponseModel(): +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List items, int total, int page, int pages)? $default,) {final _that = this; +switch (_that) { +case _PositionHistoryResponseModel() when $default != null: +return $default(_that.items,_that.total,_that.page,_that.pages);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _PositionHistoryResponseModel implements PositionHistoryResponseModel { + const _PositionHistoryResponseModel({required final List items, required this.total, required this.page, required this.pages}): _items = items; + factory _PositionHistoryResponseModel.fromJson(Map json) => _$PositionHistoryResponseModelFromJson(json); + + final List _items; +@override List get items { + if (_items is EqualUnmodifiableListView) return _items; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_items); +} + +@override final int total; +@override final int page; +@override final int pages; + +/// Create a copy of PositionHistoryResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PositionHistoryResponseModelCopyWith<_PositionHistoryResponseModel> get copyWith => __$PositionHistoryResponseModelCopyWithImpl<_PositionHistoryResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$PositionHistoryResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PositionHistoryResponseModel&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_items),total,page,pages); + +@override +String toString() { + return 'PositionHistoryResponseModel(items: $items, total: $total, page: $page, pages: $pages)'; +} + + +} + +/// @nodoc +abstract mixin class _$PositionHistoryResponseModelCopyWith<$Res> implements $PositionHistoryResponseModelCopyWith<$Res> { + factory _$PositionHistoryResponseModelCopyWith(_PositionHistoryResponseModel value, $Res Function(_PositionHistoryResponseModel) _then) = __$PositionHistoryResponseModelCopyWithImpl; +@override @useResult +$Res call({ + List items, int total, int page, int pages +}); + + + + +} +/// @nodoc +class __$PositionHistoryResponseModelCopyWithImpl<$Res> + implements _$PositionHistoryResponseModelCopyWith<$Res> { + __$PositionHistoryResponseModelCopyWithImpl(this._self, this._then); + + final _PositionHistoryResponseModel _self; + final $Res Function(_PositionHistoryResponseModel) _then; + +/// Create a copy of PositionHistoryResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? items = null,Object? total = null,Object? page = null,Object? pages = null,}) { + return _then(_PositionHistoryResponseModel( +items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable +as List,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as int,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable +as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.g.dart new file mode 100644 index 00000000..38cbf0b9 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/position_history_response_model.g.dart @@ -0,0 +1,31 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'position_history_response_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_PositionHistoryResponseModel _$PositionHistoryResponseModelFromJson( + Map json, +) => _PositionHistoryResponseModel( + items: (json['items'] as List) + .map( + (e) => LatestPositionsItemResponseModel.fromJson( + e as Map, + ), + ) + .toList(), + total: (json['total'] as num).toInt(), + page: (json['page'] as num).toInt(), + pages: (json['pages'] as num).toInt(), +); + +Map _$PositionHistoryResponseModelToJson( + _PositionHistoryResponseModel instance, +) => { + 'items': instance.items, + 'total': instance.total, + 'page': instance.page, + 'pages': instance.pages, +}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.dart new file mode 100644 index 00000000..f789c1a1 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.dart @@ -0,0 +1,21 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/data/models/frequent_places_response_model.dart'; + +part 'update_frequent_place_request_model.freezed.dart'; +part 'update_frequent_place_request_model.g.dart'; + +@freezed +abstract class UpdateFrequentPlaceRequestModel + with _$UpdateFrequentPlaceRequestModel { + const factory UpdateFrequentPlaceRequestModel({ + required String id, + required String name, + required double lat, + required double lng, + @Default([]) List wifiList, + }) = _UpdateFrequentPlaceRequestModel; + + factory UpdateFrequentPlaceRequestModel.fromJson( + Map json) => + _$UpdateFrequentPlaceRequestModelFromJson(json); +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.freezed.dart new file mode 100644 index 00000000..55c51064 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.freezed.dart @@ -0,0 +1,295 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'update_frequent_place_request_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UpdateFrequentPlaceRequestModel { + + String get id; String get name; double get lat; double get lng; List get wifiList; +/// Create a copy of UpdateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$UpdateFrequentPlaceRequestModelCopyWith get copyWith => _$UpdateFrequentPlaceRequestModelCopyWithImpl(this as UpdateFrequentPlaceRequestModel, _$identity); + + /// Serializes this UpdateFrequentPlaceRequestModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateFrequentPlaceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other.wifiList, wifiList)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,lat,lng,const DeepCollectionEquality().hash(wifiList)); + +@override +String toString() { + return 'UpdateFrequentPlaceRequestModel(id: $id, name: $name, lat: $lat, lng: $lng, wifiList: $wifiList)'; +} + + +} + +/// @nodoc +abstract mixin class $UpdateFrequentPlaceRequestModelCopyWith<$Res> { + factory $UpdateFrequentPlaceRequestModelCopyWith(UpdateFrequentPlaceRequestModel value, $Res Function(UpdateFrequentPlaceRequestModel) _then) = _$UpdateFrequentPlaceRequestModelCopyWithImpl; +@useResult +$Res call({ + String id, String name, double lat, double lng, List wifiList +}); + + + + +} +/// @nodoc +class _$UpdateFrequentPlaceRequestModelCopyWithImpl<$Res> + implements $UpdateFrequentPlaceRequestModelCopyWith<$Res> { + _$UpdateFrequentPlaceRequestModelCopyWithImpl(this._self, this._then); + + final UpdateFrequentPlaceRequestModel _self; + final $Res Function(UpdateFrequentPlaceRequestModel) _then; + +/// Create a copy of UpdateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? lat = null,Object? lng = null,Object? wifiList = null,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self.wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [UpdateFrequentPlaceRequestModel]. +extension UpdateFrequentPlaceRequestModelPatterns on UpdateFrequentPlaceRequestModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _UpdateFrequentPlaceRequestModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _UpdateFrequentPlaceRequestModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _UpdateFrequentPlaceRequestModel value) $default,){ +final _that = this; +switch (_that) { +case _UpdateFrequentPlaceRequestModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _UpdateFrequentPlaceRequestModel value)? $default,){ +final _that = this; +switch (_that) { +case _UpdateFrequentPlaceRequestModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, double lat, double lng, List wifiList)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _UpdateFrequentPlaceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, double lat, double lng, List wifiList) $default,) {final _that = this; +switch (_that) { +case _UpdateFrequentPlaceRequestModel(): +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, double lat, double lng, List wifiList)? $default,) {final _that = this; +switch (_that) { +case _UpdateFrequentPlaceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _UpdateFrequentPlaceRequestModel implements UpdateFrequentPlaceRequestModel { + const _UpdateFrequentPlaceRequestModel({required this.id, required this.name, required this.lat, required this.lng, final List wifiList = const []}): _wifiList = wifiList; + factory _UpdateFrequentPlaceRequestModel.fromJson(Map json) => _$UpdateFrequentPlaceRequestModelFromJson(json); + +@override final String id; +@override final String name; +@override final double lat; +@override final double lng; + final List _wifiList; +@override@JsonKey() List get wifiList { + if (_wifiList is EqualUnmodifiableListView) return _wifiList; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_wifiList); +} + + +/// Create a copy of UpdateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$UpdateFrequentPlaceRequestModelCopyWith<_UpdateFrequentPlaceRequestModel> get copyWith => __$UpdateFrequentPlaceRequestModelCopyWithImpl<_UpdateFrequentPlaceRequestModel>(this, _$identity); + +@override +Map toJson() { + return _$UpdateFrequentPlaceRequestModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateFrequentPlaceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other._wifiList, _wifiList)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,lat,lng,const DeepCollectionEquality().hash(_wifiList)); + +@override +String toString() { + return 'UpdateFrequentPlaceRequestModel(id: $id, name: $name, lat: $lat, lng: $lng, wifiList: $wifiList)'; +} + + +} + +/// @nodoc +abstract mixin class _$UpdateFrequentPlaceRequestModelCopyWith<$Res> implements $UpdateFrequentPlaceRequestModelCopyWith<$Res> { + factory _$UpdateFrequentPlaceRequestModelCopyWith(_UpdateFrequentPlaceRequestModel value, $Res Function(_UpdateFrequentPlaceRequestModel) _then) = __$UpdateFrequentPlaceRequestModelCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, double lat, double lng, List wifiList +}); + + + + +} +/// @nodoc +class __$UpdateFrequentPlaceRequestModelCopyWithImpl<$Res> + implements _$UpdateFrequentPlaceRequestModelCopyWith<$Res> { + __$UpdateFrequentPlaceRequestModelCopyWithImpl(this._self, this._then); + + final _UpdateFrequentPlaceRequestModel _self; + final $Res Function(_UpdateFrequentPlaceRequestModel) _then; + +/// Create a copy of UpdateFrequentPlaceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? lat = null,Object? lng = null,Object? wifiList = null,}) { + return _then(_UpdateFrequentPlaceRequestModel( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self._wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.g.dart new file mode 100644 index 00000000..3558c62a --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_request_model.g.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'update_frequent_place_request_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_UpdateFrequentPlaceRequestModel _$UpdateFrequentPlaceRequestModelFromJson( + Map json, +) => _UpdateFrequentPlaceRequestModel( + id: json['id'] as String, + name: json['name'] as String, + lat: (json['lat'] as num).toDouble(), + lng: (json['lng'] as num).toDouble(), + wifiList: + (json['wifiList'] as List?) + ?.map( + (e) => WifiInfoResponseModel.fromJson(e as Map), + ) + .toList() ?? + const [], +); + +Map _$UpdateFrequentPlaceRequestModelToJson( + _UpdateFrequentPlaceRequestModel instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'lat': instance.lat, + 'lng': instance.lng, + 'wifiList': instance.wifiList, +}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.dart new file mode 100644 index 00000000..7a11c48c --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.dart @@ -0,0 +1,24 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/data/models/frequent_places_response_model.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; + +part 'update_frequent_place_response_model.freezed.dart'; +part 'update_frequent_place_response_model.g.dart'; + +@freezed +abstract class UpdateFrequentPlaceResponseModel + with _$UpdateFrequentPlaceResponseModel { + const factory UpdateFrequentPlaceResponseModel({ + required bool isUpdated, + required FrequentPlaceItemResponseModel item, + }) = _UpdateFrequentPlaceResponseModel; + + factory UpdateFrequentPlaceResponseModel.fromJson( + Map json) => + _$UpdateFrequentPlaceResponseModelFromJson(json); +} + +extension UpdateFrequentPlaceResponseModelMapper + on UpdateFrequentPlaceResponseModel { + FrequentPlaceEntity toEntity() => item.toEntity(); +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.freezed.dart new file mode 100644 index 00000000..74c725d1 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.freezed.dart @@ -0,0 +1,298 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'update_frequent_place_response_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UpdateFrequentPlaceResponseModel { + + bool get isUpdated; FrequentPlaceItemResponseModel get item; +/// Create a copy of UpdateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$UpdateFrequentPlaceResponseModelCopyWith get copyWith => _$UpdateFrequentPlaceResponseModelCopyWithImpl(this as UpdateFrequentPlaceResponseModel, _$identity); + + /// Serializes this UpdateFrequentPlaceResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateFrequentPlaceResponseModel&&(identical(other.isUpdated, isUpdated) || other.isUpdated == isUpdated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isUpdated,item); + +@override +String toString() { + return 'UpdateFrequentPlaceResponseModel(isUpdated: $isUpdated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class $UpdateFrequentPlaceResponseModelCopyWith<$Res> { + factory $UpdateFrequentPlaceResponseModelCopyWith(UpdateFrequentPlaceResponseModel value, $Res Function(UpdateFrequentPlaceResponseModel) _then) = _$UpdateFrequentPlaceResponseModelCopyWithImpl; +@useResult +$Res call({ + bool isUpdated, FrequentPlaceItemResponseModel item +}); + + +$FrequentPlaceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class _$UpdateFrequentPlaceResponseModelCopyWithImpl<$Res> + implements $UpdateFrequentPlaceResponseModelCopyWith<$Res> { + _$UpdateFrequentPlaceResponseModelCopyWithImpl(this._self, this._then); + + final UpdateFrequentPlaceResponseModel _self; + final $Res Function(UpdateFrequentPlaceResponseModel) _then; + +/// Create a copy of UpdateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? isUpdated = null,Object? item = null,}) { + return _then(_self.copyWith( +isUpdated: null == isUpdated ? _self.isUpdated : isUpdated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as FrequentPlaceItemResponseModel, + )); +} +/// Create a copy of UpdateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$FrequentPlaceItemResponseModelCopyWith<$Res> get item { + + return $FrequentPlaceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [UpdateFrequentPlaceResponseModel]. +extension UpdateFrequentPlaceResponseModelPatterns on UpdateFrequentPlaceResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _UpdateFrequentPlaceResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _UpdateFrequentPlaceResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _UpdateFrequentPlaceResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _UpdateFrequentPlaceResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _UpdateFrequentPlaceResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _UpdateFrequentPlaceResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isUpdated, FrequentPlaceItemResponseModel item)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _UpdateFrequentPlaceResponseModel() when $default != null: +return $default(_that.isUpdated,_that.item);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isUpdated, FrequentPlaceItemResponseModel item) $default,) {final _that = this; +switch (_that) { +case _UpdateFrequentPlaceResponseModel(): +return $default(_that.isUpdated,_that.item);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isUpdated, FrequentPlaceItemResponseModel item)? $default,) {final _that = this; +switch (_that) { +case _UpdateFrequentPlaceResponseModel() when $default != null: +return $default(_that.isUpdated,_that.item);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _UpdateFrequentPlaceResponseModel implements UpdateFrequentPlaceResponseModel { + const _UpdateFrequentPlaceResponseModel({required this.isUpdated, required this.item}); + factory _UpdateFrequentPlaceResponseModel.fromJson(Map json) => _$UpdateFrequentPlaceResponseModelFromJson(json); + +@override final bool isUpdated; +@override final FrequentPlaceItemResponseModel item; + +/// Create a copy of UpdateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$UpdateFrequentPlaceResponseModelCopyWith<_UpdateFrequentPlaceResponseModel> get copyWith => __$UpdateFrequentPlaceResponseModelCopyWithImpl<_UpdateFrequentPlaceResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$UpdateFrequentPlaceResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateFrequentPlaceResponseModel&&(identical(other.isUpdated, isUpdated) || other.isUpdated == isUpdated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isUpdated,item); + +@override +String toString() { + return 'UpdateFrequentPlaceResponseModel(isUpdated: $isUpdated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class _$UpdateFrequentPlaceResponseModelCopyWith<$Res> implements $UpdateFrequentPlaceResponseModelCopyWith<$Res> { + factory _$UpdateFrequentPlaceResponseModelCopyWith(_UpdateFrequentPlaceResponseModel value, $Res Function(_UpdateFrequentPlaceResponseModel) _then) = __$UpdateFrequentPlaceResponseModelCopyWithImpl; +@override @useResult +$Res call({ + bool isUpdated, FrequentPlaceItemResponseModel item +}); + + +@override $FrequentPlaceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class __$UpdateFrequentPlaceResponseModelCopyWithImpl<$Res> + implements _$UpdateFrequentPlaceResponseModelCopyWith<$Res> { + __$UpdateFrequentPlaceResponseModelCopyWithImpl(this._self, this._then); + + final _UpdateFrequentPlaceResponseModel _self; + final $Res Function(_UpdateFrequentPlaceResponseModel) _then; + +/// Create a copy of UpdateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? isUpdated = null,Object? item = null,}) { + return _then(_UpdateFrequentPlaceResponseModel( +isUpdated: null == isUpdated ? _self.isUpdated : isUpdated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as FrequentPlaceItemResponseModel, + )); +} + +/// Create a copy of UpdateFrequentPlaceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$FrequentPlaceItemResponseModelCopyWith<$Res> get item { + + return $FrequentPlaceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.g.dart new file mode 100644 index 00000000..656668af --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_frequent_place_response_model.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'update_frequent_place_response_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_UpdateFrequentPlaceResponseModel _$UpdateFrequentPlaceResponseModelFromJson( + Map json, +) => _UpdateFrequentPlaceResponseModel( + isUpdated: json['isUpdated'] as bool, + item: FrequentPlaceItemResponseModel.fromJson( + json['item'] as Map, + ), +); + +Map _$UpdateFrequentPlaceResponseModelToJson( + _UpdateFrequentPlaceResponseModel instance, +) => {'isUpdated': instance.isUpdated, 'item': instance.item}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.dart new file mode 100644 index 00000000..16222980 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.dart @@ -0,0 +1,19 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'update_geofence_request_model.freezed.dart'; +part 'update_geofence_request_model.g.dart'; + +@freezed +abstract class UpdateGeofenceRequestModel with _$UpdateGeofenceRequestModel { + const factory UpdateGeofenceRequestModel({ + required String id, + required String name, + String? description, + required double latitude, + required double longitude, + required double radius, + }) = _UpdateGeofenceRequestModel; + + factory UpdateGeofenceRequestModel.fromJson(Map json) => + _$UpdateGeofenceRequestModelFromJson(json); +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.freezed.dart new file mode 100644 index 00000000..4899a86c --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.freezed.dart @@ -0,0 +1,292 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'update_geofence_request_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UpdateGeofenceRequestModel { + + String get id; String get name; String? get description; double get latitude; double get longitude; double get radius; +/// Create a copy of UpdateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$UpdateGeofenceRequestModelCopyWith get copyWith => _$UpdateGeofenceRequestModelCopyWithImpl(this as UpdateGeofenceRequestModel, _$identity); + + /// Serializes this UpdateGeofenceRequestModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateGeofenceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius); + +@override +String toString() { + return 'UpdateGeofenceRequestModel(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius)'; +} + + +} + +/// @nodoc +abstract mixin class $UpdateGeofenceRequestModelCopyWith<$Res> { + factory $UpdateGeofenceRequestModelCopyWith(UpdateGeofenceRequestModel value, $Res Function(UpdateGeofenceRequestModel) _then) = _$UpdateGeofenceRequestModelCopyWithImpl; +@useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius +}); + + + + +} +/// @nodoc +class _$UpdateGeofenceRequestModelCopyWithImpl<$Res> + implements $UpdateGeofenceRequestModelCopyWith<$Res> { + _$UpdateGeofenceRequestModelCopyWithImpl(this._self, this._then); + + final UpdateGeofenceRequestModel _self; + final $Res Function(UpdateGeofenceRequestModel) _then; + +/// Create a copy of UpdateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double, + )); +} + +} + + +/// Adds pattern-matching-related methods to [UpdateGeofenceRequestModel]. +extension UpdateGeofenceRequestModelPatterns on UpdateGeofenceRequestModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _UpdateGeofenceRequestModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _UpdateGeofenceRequestModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _UpdateGeofenceRequestModel value) $default,){ +final _that = this; +switch (_that) { +case _UpdateGeofenceRequestModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _UpdateGeofenceRequestModel value)? $default,){ +final _that = this; +switch (_that) { +case _UpdateGeofenceRequestModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _UpdateGeofenceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius) $default,) {final _that = this; +switch (_that) { +case _UpdateGeofenceRequestModel(): +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, String? description, double latitude, double longitude, double radius)? $default,) {final _that = this; +switch (_that) { +case _UpdateGeofenceRequestModel() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _UpdateGeofenceRequestModel implements UpdateGeofenceRequestModel { + const _UpdateGeofenceRequestModel({required this.id, required this.name, this.description, required this.latitude, required this.longitude, required this.radius}); + factory _UpdateGeofenceRequestModel.fromJson(Map json) => _$UpdateGeofenceRequestModelFromJson(json); + +@override final String id; +@override final String name; +@override final String? description; +@override final double latitude; +@override final double longitude; +@override final double radius; + +/// Create a copy of UpdateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$UpdateGeofenceRequestModelCopyWith<_UpdateGeofenceRequestModel> get copyWith => __$UpdateGeofenceRequestModelCopyWithImpl<_UpdateGeofenceRequestModel>(this, _$identity); + +@override +Map toJson() { + return _$UpdateGeofenceRequestModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateGeofenceRequestModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius); + +@override +String toString() { + return 'UpdateGeofenceRequestModel(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius)'; +} + + +} + +/// @nodoc +abstract mixin class _$UpdateGeofenceRequestModelCopyWith<$Res> implements $UpdateGeofenceRequestModelCopyWith<$Res> { + factory _$UpdateGeofenceRequestModelCopyWith(_UpdateGeofenceRequestModel value, $Res Function(_UpdateGeofenceRequestModel) _then) = __$UpdateGeofenceRequestModelCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius +}); + + + + +} +/// @nodoc +class __$UpdateGeofenceRequestModelCopyWithImpl<$Res> + implements _$UpdateGeofenceRequestModelCopyWith<$Res> { + __$UpdateGeofenceRequestModelCopyWithImpl(this._self, this._then); + + final _UpdateGeofenceRequestModel _self; + final $Res Function(_UpdateGeofenceRequestModel) _then; + +/// Create a copy of UpdateGeofenceRequestModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,}) { + return _then(_UpdateGeofenceRequestModel( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.g.dart new file mode 100644 index 00000000..023e7dc2 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_request_model.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'update_geofence_request_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_UpdateGeofenceRequestModel _$UpdateGeofenceRequestModelFromJson( + Map json, +) => _UpdateGeofenceRequestModel( + id: json['id'] as String, + name: json['name'] as String, + description: json['description'] as String?, + latitude: (json['latitude'] as num).toDouble(), + longitude: (json['longitude'] as num).toDouble(), + radius: (json['radius'] as num).toDouble(), +); + +Map _$UpdateGeofenceRequestModelToJson( + _UpdateGeofenceRequestModel instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'description': instance.description, + 'latitude': instance.latitude, + 'longitude': instance.longitude, + 'radius': instance.radius, +}; diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.dart new file mode 100644 index 00000000..ed9ba335 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.dart @@ -0,0 +1,34 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/data/models/geofences_response_model.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; + +part 'update_geofence_response_model.freezed.dart'; +part 'update_geofence_response_model.g.dart'; + +@freezed +abstract class UpdateGeofenceResponseModel with _$UpdateGeofenceResponseModel { + const factory UpdateGeofenceResponseModel({ + required bool isUpdated, + required GeofenceItemResponseModel item, + }) = _UpdateGeofenceResponseModel; + + factory UpdateGeofenceResponseModel.fromJson(Map json) => + _$UpdateGeofenceResponseModelFromJson(json); +} + +extension UpdateGeofenceResponseModelMapper on UpdateGeofenceResponseModel { + GeofenceEntity toEntity() { + return GeofenceEntity( + id: item.id, + name: item.name, + description: item.description, + latitude: item.latitude, + longitude: item.longitude, + radius: item.radius, + isActive: item.isActive, + deviceId: item.deviceId, + createdAt: item.createdAt, + updatedAt: item.updatedAt, + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.freezed.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.freezed.dart new file mode 100644 index 00000000..79bf840b --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.freezed.dart @@ -0,0 +1,298 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'update_geofence_response_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UpdateGeofenceResponseModel { + + bool get isUpdated; GeofenceItemResponseModel get item; +/// Create a copy of UpdateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$UpdateGeofenceResponseModelCopyWith get copyWith => _$UpdateGeofenceResponseModelCopyWithImpl(this as UpdateGeofenceResponseModel, _$identity); + + /// Serializes this UpdateGeofenceResponseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateGeofenceResponseModel&&(identical(other.isUpdated, isUpdated) || other.isUpdated == isUpdated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isUpdated,item); + +@override +String toString() { + return 'UpdateGeofenceResponseModel(isUpdated: $isUpdated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class $UpdateGeofenceResponseModelCopyWith<$Res> { + factory $UpdateGeofenceResponseModelCopyWith(UpdateGeofenceResponseModel value, $Res Function(UpdateGeofenceResponseModel) _then) = _$UpdateGeofenceResponseModelCopyWithImpl; +@useResult +$Res call({ + bool isUpdated, GeofenceItemResponseModel item +}); + + +$GeofenceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class _$UpdateGeofenceResponseModelCopyWithImpl<$Res> + implements $UpdateGeofenceResponseModelCopyWith<$Res> { + _$UpdateGeofenceResponseModelCopyWithImpl(this._self, this._then); + + final UpdateGeofenceResponseModel _self; + final $Res Function(UpdateGeofenceResponseModel) _then; + +/// Create a copy of UpdateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? isUpdated = null,Object? item = null,}) { + return _then(_self.copyWith( +isUpdated: null == isUpdated ? _self.isUpdated : isUpdated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as GeofenceItemResponseModel, + )); +} +/// Create a copy of UpdateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceItemResponseModelCopyWith<$Res> get item { + + return $GeofenceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [UpdateGeofenceResponseModel]. +extension UpdateGeofenceResponseModelPatterns on UpdateGeofenceResponseModel { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _UpdateGeofenceResponseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _UpdateGeofenceResponseModel() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _UpdateGeofenceResponseModel value) $default,){ +final _that = this; +switch (_that) { +case _UpdateGeofenceResponseModel(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _UpdateGeofenceResponseModel value)? $default,){ +final _that = this; +switch (_that) { +case _UpdateGeofenceResponseModel() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isUpdated, GeofenceItemResponseModel item)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _UpdateGeofenceResponseModel() when $default != null: +return $default(_that.isUpdated,_that.item);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isUpdated, GeofenceItemResponseModel item) $default,) {final _that = this; +switch (_that) { +case _UpdateGeofenceResponseModel(): +return $default(_that.isUpdated,_that.item);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isUpdated, GeofenceItemResponseModel item)? $default,) {final _that = this; +switch (_that) { +case _UpdateGeofenceResponseModel() when $default != null: +return $default(_that.isUpdated,_that.item);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _UpdateGeofenceResponseModel implements UpdateGeofenceResponseModel { + const _UpdateGeofenceResponseModel({required this.isUpdated, required this.item}); + factory _UpdateGeofenceResponseModel.fromJson(Map json) => _$UpdateGeofenceResponseModelFromJson(json); + +@override final bool isUpdated; +@override final GeofenceItemResponseModel item; + +/// Create a copy of UpdateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$UpdateGeofenceResponseModelCopyWith<_UpdateGeofenceResponseModel> get copyWith => __$UpdateGeofenceResponseModelCopyWithImpl<_UpdateGeofenceResponseModel>(this, _$identity); + +@override +Map toJson() { + return _$UpdateGeofenceResponseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateGeofenceResponseModel&&(identical(other.isUpdated, isUpdated) || other.isUpdated == isUpdated)&&(identical(other.item, item) || other.item == item)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isUpdated,item); + +@override +String toString() { + return 'UpdateGeofenceResponseModel(isUpdated: $isUpdated, item: $item)'; +} + + +} + +/// @nodoc +abstract mixin class _$UpdateGeofenceResponseModelCopyWith<$Res> implements $UpdateGeofenceResponseModelCopyWith<$Res> { + factory _$UpdateGeofenceResponseModelCopyWith(_UpdateGeofenceResponseModel value, $Res Function(_UpdateGeofenceResponseModel) _then) = __$UpdateGeofenceResponseModelCopyWithImpl; +@override @useResult +$Res call({ + bool isUpdated, GeofenceItemResponseModel item +}); + + +@override $GeofenceItemResponseModelCopyWith<$Res> get item; + +} +/// @nodoc +class __$UpdateGeofenceResponseModelCopyWithImpl<$Res> + implements _$UpdateGeofenceResponseModelCopyWith<$Res> { + __$UpdateGeofenceResponseModelCopyWithImpl(this._self, this._then); + + final _UpdateGeofenceResponseModel _self; + final $Res Function(_UpdateGeofenceResponseModel) _then; + +/// Create a copy of UpdateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? isUpdated = null,Object? item = null,}) { + return _then(_UpdateGeofenceResponseModel( +isUpdated: null == isUpdated ? _self.isUpdated : isUpdated // ignore: cast_nullable_to_non_nullable +as bool,item: null == item ? _self.item : item // ignore: cast_nullable_to_non_nullable +as GeofenceItemResponseModel, + )); +} + +/// Create a copy of UpdateGeofenceResponseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceItemResponseModelCopyWith<$Res> get item { + + return $GeofenceItemResponseModelCopyWith<$Res>(_self.item, (value) { + return _then(_self.copyWith(item: value)); + }); +} +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.g.dart b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.g.dart new file mode 100644 index 00000000..eaa1a63d --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/models/update_geofence_response_model.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'update_geofence_response_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_UpdateGeofenceResponseModel _$UpdateGeofenceResponseModelFromJson( + Map json, +) => _UpdateGeofenceResponseModel( + isUpdated: json['isUpdated'] as bool, + item: GeofenceItemResponseModel.fromJson( + json['item'] as Map, + ), +); + +Map _$UpdateGeofenceResponseModelToJson( + _UpdateGeofenceResponseModel instance, +) => {'isUpdated': instance.isUpdated, 'item': instance.item}; diff --git a/modules/legacy/modules/location/lib/src/core/data/repositories/location_repository_impl.dart b/modules/legacy/modules/location/lib/src/core/data/repositories/location_repository_impl.dart new file mode 100644 index 00000000..18b46883 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/data/repositories/location_repository_impl.dart @@ -0,0 +1,64 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:location/src/core/data/datasource/location_remote_datasource.dart'; +import 'package:location/src/core/data/models/create_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/create_geofence_request_model.dart'; +import 'package:location/src/core/data/models/update_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/update_geofence_request_model.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; +import 'package:location/src/core/domain/repositories/location_repository.dart'; + +class LocationRepositoryImpl implements LocationRepository { + const LocationRepositoryImpl(this._remote); + + final LocationRemoteDatasource _remote; + + @override + Future> getGeofences({required String deviceId}) async => + _remote.getGeofences(deviceId: deviceId); + + @override + Future createGeofence( + {required CreateGeofenceRequestModel request}) async => + _remote.createGeofence(request: request); + + @override + Future updateGeofence( + {required UpdateGeofenceRequestModel request}) async => + _remote.updateGeofence(request: request); + + @override + Future deleteGeofence({required String geofenceId}) async => + _remote.deleteGeofence(geofenceId: geofenceId); + + @override + Future> getFrequentPlaces( + {required String deviceId}) async => + _remote.getFrequentPlaces(deviceId: deviceId); + + @override + Future createFrequentPlace( + {required CreateFrequentPlaceRequestModel request}) async => + _remote.createFrequentPlace(request: request); + + @override + Future updateFrequentPlace( + {required UpdateFrequentPlaceRequestModel request}) async => + _remote.updateFrequentPlace(request: request); + + @override + Future deleteFrequentPlace({required String frequentPlaceId}) async => + _remote.deleteFrequentPlace(frequentPlaceId: frequentPlaceId); + + @override + Future> getPositionHistory({ + required String deviceIdentificator, + required DateTime from, + required DateTime to, + }) async => + _remote.getPositionHistory( + deviceIdentificator: deviceIdentificator, + from: from, + to: to, + ); +} diff --git a/modules/legacy/modules/location/lib/src/core/domain/entities/frequent_place_entity.dart b/modules/legacy/modules/location/lib/src/core/domain/entities/frequent_place_entity.dart new file mode 100644 index 00000000..f5b466d4 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/domain/entities/frequent_place_entity.dart @@ -0,0 +1,26 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'frequent_place_entity.freezed.dart'; + +@freezed +abstract class WifiInfoEntity with _$WifiInfoEntity { + const factory WifiInfoEntity({ + required String ssid, + required String bssid, + required String signal, + }) = _WifiInfoEntity; +} + +@freezed +abstract class FrequentPlaceEntity with _$FrequentPlaceEntity { + const factory FrequentPlaceEntity({ + required String id, + required String name, + required double lat, + required double lng, + @Default([]) List wifiList, + String? deviceId, + required int createdAt, + int? updatedAt, + }) = _FrequentPlaceEntity; +} diff --git a/modules/legacy/modules/location/lib/src/core/domain/entities/frequent_place_entity.freezed.dart b/modules/legacy/modules/location/lib/src/core/domain/entities/frequent_place_entity.freezed.dart new file mode 100644 index 00000000..edd2da48 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/domain/entities/frequent_place_entity.freezed.dart @@ -0,0 +1,561 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'frequent_place_entity.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$WifiInfoEntity { + + String get ssid; String get bssid; String get signal; +/// Create a copy of WifiInfoEntity +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$WifiInfoEntityCopyWith get copyWith => _$WifiInfoEntityCopyWithImpl(this as WifiInfoEntity, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WifiInfoEntity&&(identical(other.ssid, ssid) || other.ssid == ssid)&&(identical(other.bssid, bssid) || other.bssid == bssid)&&(identical(other.signal, signal) || other.signal == signal)); +} + + +@override +int get hashCode => Object.hash(runtimeType,ssid,bssid,signal); + +@override +String toString() { + return 'WifiInfoEntity(ssid: $ssid, bssid: $bssid, signal: $signal)'; +} + + +} + +/// @nodoc +abstract mixin class $WifiInfoEntityCopyWith<$Res> { + factory $WifiInfoEntityCopyWith(WifiInfoEntity value, $Res Function(WifiInfoEntity) _then) = _$WifiInfoEntityCopyWithImpl; +@useResult +$Res call({ + String ssid, String bssid, String signal +}); + + + + +} +/// @nodoc +class _$WifiInfoEntityCopyWithImpl<$Res> + implements $WifiInfoEntityCopyWith<$Res> { + _$WifiInfoEntityCopyWithImpl(this._self, this._then); + + final WifiInfoEntity _self; + final $Res Function(WifiInfoEntity) _then; + +/// Create a copy of WifiInfoEntity +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? ssid = null,Object? bssid = null,Object? signal = null,}) { + return _then(_self.copyWith( +ssid: null == ssid ? _self.ssid : ssid // ignore: cast_nullable_to_non_nullable +as String,bssid: null == bssid ? _self.bssid : bssid // ignore: cast_nullable_to_non_nullable +as String,signal: null == signal ? _self.signal : signal // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [WifiInfoEntity]. +extension WifiInfoEntityPatterns on WifiInfoEntity { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _WifiInfoEntity value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _WifiInfoEntity() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _WifiInfoEntity value) $default,){ +final _that = this; +switch (_that) { +case _WifiInfoEntity(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _WifiInfoEntity value)? $default,){ +final _that = this; +switch (_that) { +case _WifiInfoEntity() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String ssid, String bssid, String signal)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _WifiInfoEntity() when $default != null: +return $default(_that.ssid,_that.bssid,_that.signal);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String ssid, String bssid, String signal) $default,) {final _that = this; +switch (_that) { +case _WifiInfoEntity(): +return $default(_that.ssid,_that.bssid,_that.signal);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String ssid, String bssid, String signal)? $default,) {final _that = this; +switch (_that) { +case _WifiInfoEntity() when $default != null: +return $default(_that.ssid,_that.bssid,_that.signal);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _WifiInfoEntity implements WifiInfoEntity { + const _WifiInfoEntity({required this.ssid, required this.bssid, required this.signal}); + + +@override final String ssid; +@override final String bssid; +@override final String signal; + +/// Create a copy of WifiInfoEntity +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$WifiInfoEntityCopyWith<_WifiInfoEntity> get copyWith => __$WifiInfoEntityCopyWithImpl<_WifiInfoEntity>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _WifiInfoEntity&&(identical(other.ssid, ssid) || other.ssid == ssid)&&(identical(other.bssid, bssid) || other.bssid == bssid)&&(identical(other.signal, signal) || other.signal == signal)); +} + + +@override +int get hashCode => Object.hash(runtimeType,ssid,bssid,signal); + +@override +String toString() { + return 'WifiInfoEntity(ssid: $ssid, bssid: $bssid, signal: $signal)'; +} + + +} + +/// @nodoc +abstract mixin class _$WifiInfoEntityCopyWith<$Res> implements $WifiInfoEntityCopyWith<$Res> { + factory _$WifiInfoEntityCopyWith(_WifiInfoEntity value, $Res Function(_WifiInfoEntity) _then) = __$WifiInfoEntityCopyWithImpl; +@override @useResult +$Res call({ + String ssid, String bssid, String signal +}); + + + + +} +/// @nodoc +class __$WifiInfoEntityCopyWithImpl<$Res> + implements _$WifiInfoEntityCopyWith<$Res> { + __$WifiInfoEntityCopyWithImpl(this._self, this._then); + + final _WifiInfoEntity _self; + final $Res Function(_WifiInfoEntity) _then; + +/// Create a copy of WifiInfoEntity +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? ssid = null,Object? bssid = null,Object? signal = null,}) { + return _then(_WifiInfoEntity( +ssid: null == ssid ? _self.ssid : ssid // ignore: cast_nullable_to_non_nullable +as String,bssid: null == bssid ? _self.bssid : bssid // ignore: cast_nullable_to_non_nullable +as String,signal: null == signal ? _self.signal : signal // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + +/// @nodoc +mixin _$FrequentPlaceEntity { + + String get id; String get name; double get lat; double get lng; List get wifiList; String? get deviceId; int get createdAt; int? get updatedAt; +/// Create a copy of FrequentPlaceEntity +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$FrequentPlaceEntityCopyWith get copyWith => _$FrequentPlaceEntityCopyWithImpl(this as FrequentPlaceEntity, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is FrequentPlaceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other.wifiList, wifiList)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + + +@override +int get hashCode => Object.hash(runtimeType,id,name,lat,lng,const DeepCollectionEquality().hash(wifiList),deviceId,createdAt,updatedAt); + +@override +String toString() { + return 'FrequentPlaceEntity(id: $id, name: $name, lat: $lat, lng: $lng, wifiList: $wifiList, deviceId: $deviceId, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class $FrequentPlaceEntityCopyWith<$Res> { + factory $FrequentPlaceEntityCopyWith(FrequentPlaceEntity value, $Res Function(FrequentPlaceEntity) _then) = _$FrequentPlaceEntityCopyWithImpl; +@useResult +$Res call({ + String id, String name, double lat, double lng, List wifiList, String? deviceId, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class _$FrequentPlaceEntityCopyWithImpl<$Res> + implements $FrequentPlaceEntityCopyWith<$Res> { + _$FrequentPlaceEntityCopyWithImpl(this._self, this._then); + + final FrequentPlaceEntity _self; + final $Res Function(FrequentPlaceEntity) _then; + +/// Create a copy of FrequentPlaceEntity +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? lat = null,Object? lng = null,Object? wifiList = null,Object? deviceId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self.wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [FrequentPlaceEntity]. +extension FrequentPlaceEntityPatterns on FrequentPlaceEntity { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FrequentPlaceEntity value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FrequentPlaceEntity() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FrequentPlaceEntity value) $default,){ +final _that = this; +switch (_that) { +case _FrequentPlaceEntity(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FrequentPlaceEntity value)? $default,){ +final _that = this; +switch (_that) { +case _FrequentPlaceEntity() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, double lat, double lng, List wifiList, String? deviceId, int createdAt, int? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FrequentPlaceEntity() when $default != null: +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList,_that.deviceId,_that.createdAt,_that.updatedAt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, double lat, double lng, List wifiList, String? deviceId, int createdAt, int? updatedAt) $default,) {final _that = this; +switch (_that) { +case _FrequentPlaceEntity(): +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList,_that.deviceId,_that.createdAt,_that.updatedAt);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, double lat, double lng, List wifiList, String? deviceId, int createdAt, int? updatedAt)? $default,) {final _that = this; +switch (_that) { +case _FrequentPlaceEntity() when $default != null: +return $default(_that.id,_that.name,_that.lat,_that.lng,_that.wifiList,_that.deviceId,_that.createdAt,_that.updatedAt);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _FrequentPlaceEntity implements FrequentPlaceEntity { + const _FrequentPlaceEntity({required this.id, required this.name, required this.lat, required this.lng, final List wifiList = const [], this.deviceId, required this.createdAt, this.updatedAt}): _wifiList = wifiList; + + +@override final String id; +@override final String name; +@override final double lat; +@override final double lng; + final List _wifiList; +@override@JsonKey() List get wifiList { + if (_wifiList is EqualUnmodifiableListView) return _wifiList; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_wifiList); +} + +@override final String? deviceId; +@override final int createdAt; +@override final int? updatedAt; + +/// Create a copy of FrequentPlaceEntity +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FrequentPlaceEntityCopyWith<_FrequentPlaceEntity> get copyWith => __$FrequentPlaceEntityCopyWithImpl<_FrequentPlaceEntity>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FrequentPlaceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lng, lng) || other.lng == lng)&&const DeepCollectionEquality().equals(other._wifiList, _wifiList)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + + +@override +int get hashCode => Object.hash(runtimeType,id,name,lat,lng,const DeepCollectionEquality().hash(_wifiList),deviceId,createdAt,updatedAt); + +@override +String toString() { + return 'FrequentPlaceEntity(id: $id, name: $name, lat: $lat, lng: $lng, wifiList: $wifiList, deviceId: $deviceId, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class _$FrequentPlaceEntityCopyWith<$Res> implements $FrequentPlaceEntityCopyWith<$Res> { + factory _$FrequentPlaceEntityCopyWith(_FrequentPlaceEntity value, $Res Function(_FrequentPlaceEntity) _then) = __$FrequentPlaceEntityCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, double lat, double lng, List wifiList, String? deviceId, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class __$FrequentPlaceEntityCopyWithImpl<$Res> + implements _$FrequentPlaceEntityCopyWith<$Res> { + __$FrequentPlaceEntityCopyWithImpl(this._self, this._then); + + final _FrequentPlaceEntity _self; + final $Res Function(_FrequentPlaceEntity) _then; + +/// Create a copy of FrequentPlaceEntity +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? lat = null,Object? lng = null,Object? wifiList = null,Object? deviceId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_FrequentPlaceEntity( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,lat: null == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double,lng: null == lng ? _self.lng : lng // ignore: cast_nullable_to_non_nullable +as double,wifiList: null == wifiList ? _self._wifiList : wifiList // ignore: cast_nullable_to_non_nullable +as List,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/domain/entities/geofence_entity.dart b/modules/legacy/modules/location/lib/src/core/domain/entities/geofence_entity.dart new file mode 100644 index 00000000..19ac4a83 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/domain/entities/geofence_entity.dart @@ -0,0 +1,19 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'geofence_entity.freezed.dart'; + +@freezed +abstract class GeofenceEntity with _$GeofenceEntity { + const factory GeofenceEntity({ + required String id, + required String name, + String? description, + required double latitude, + required double longitude, + required double radius, + required bool isActive, + String? deviceId, + required int createdAt, + int? updatedAt, + }) = _GeofenceEntity; +} diff --git a/modules/legacy/modules/location/lib/src/core/domain/entities/geofence_entity.freezed.dart b/modules/legacy/modules/location/lib/src/core/domain/entities/geofence_entity.freezed.dart new file mode 100644 index 00000000..4991fb7f --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/domain/entities/geofence_entity.freezed.dart @@ -0,0 +1,298 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'geofence_entity.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$GeofenceEntity { + + String get id; String get name; String? get description; double get latitude; double get longitude; double get radius; bool get isActive; String? get deviceId; int get createdAt; int? get updatedAt; +/// Create a copy of GeofenceEntity +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$GeofenceEntityCopyWith get copyWith => _$GeofenceEntityCopyWithImpl(this as GeofenceEntity, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is GeofenceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + + +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius,isActive,deviceId,createdAt,updatedAt); + +@override +String toString() { + return 'GeofenceEntity(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius, isActive: $isActive, deviceId: $deviceId, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class $GeofenceEntityCopyWith<$Res> { + factory $GeofenceEntityCopyWith(GeofenceEntity value, $Res Function(GeofenceEntity) _then) = _$GeofenceEntityCopyWithImpl; +@useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius, bool isActive, String? deviceId, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class _$GeofenceEntityCopyWithImpl<$Res> + implements $GeofenceEntityCopyWith<$Res> { + _$GeofenceEntityCopyWithImpl(this._self, this._then); + + final GeofenceEntity _self; + final $Res Function(GeofenceEntity) _then; + +/// Create a copy of GeofenceEntity +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,Object? isActive = null,Object? deviceId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable +as bool,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [GeofenceEntity]. +extension GeofenceEntityPatterns on GeofenceEntity { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _GeofenceEntity value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _GeofenceEntity() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _GeofenceEntity value) $default,){ +final _that = this; +switch (_that) { +case _GeofenceEntity(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _GeofenceEntity value)? $default,){ +final _that = this; +switch (_that) { +case _GeofenceEntity() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius, bool isActive, String? deviceId, int createdAt, int? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _GeofenceEntity() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.isActive,_that.deviceId,_that.createdAt,_that.updatedAt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, String name, String? description, double latitude, double longitude, double radius, bool isActive, String? deviceId, int createdAt, int? updatedAt) $default,) {final _that = this; +switch (_that) { +case _GeofenceEntity(): +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.isActive,_that.deviceId,_that.createdAt,_that.updatedAt);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, String? description, double latitude, double longitude, double radius, bool isActive, String? deviceId, int createdAt, int? updatedAt)? $default,) {final _that = this; +switch (_that) { +case _GeofenceEntity() when $default != null: +return $default(_that.id,_that.name,_that.description,_that.latitude,_that.longitude,_that.radius,_that.isActive,_that.deviceId,_that.createdAt,_that.updatedAt);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _GeofenceEntity implements GeofenceEntity { + const _GeofenceEntity({required this.id, required this.name, this.description, required this.latitude, required this.longitude, required this.radius, required this.isActive, this.deviceId, required this.createdAt, this.updatedAt}); + + +@override final String id; +@override final String name; +@override final String? description; +@override final double latitude; +@override final double longitude; +@override final double radius; +@override final bool isActive; +@override final String? deviceId; +@override final int createdAt; +@override final int? updatedAt; + +/// Create a copy of GeofenceEntity +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$GeofenceEntityCopyWith<_GeofenceEntity> get copyWith => __$GeofenceEntityCopyWithImpl<_GeofenceEntity>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _GeofenceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.latitude, latitude) || other.latitude == latitude)&&(identical(other.longitude, longitude) || other.longitude == longitude)&&(identical(other.radius, radius) || other.radius == radius)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); +} + + +@override +int get hashCode => Object.hash(runtimeType,id,name,description,latitude,longitude,radius,isActive,deviceId,createdAt,updatedAt); + +@override +String toString() { + return 'GeofenceEntity(id: $id, name: $name, description: $description, latitude: $latitude, longitude: $longitude, radius: $radius, isActive: $isActive, deviceId: $deviceId, createdAt: $createdAt, updatedAt: $updatedAt)'; +} + + +} + +/// @nodoc +abstract mixin class _$GeofenceEntityCopyWith<$Res> implements $GeofenceEntityCopyWith<$Res> { + factory _$GeofenceEntityCopyWith(_GeofenceEntity value, $Res Function(_GeofenceEntity) _then) = __$GeofenceEntityCopyWithImpl; +@override @useResult +$Res call({ + String id, String name, String? description, double latitude, double longitude, double radius, bool isActive, String? deviceId, int createdAt, int? updatedAt +}); + + + + +} +/// @nodoc +class __$GeofenceEntityCopyWithImpl<$Res> + implements _$GeofenceEntityCopyWith<$Res> { + __$GeofenceEntityCopyWithImpl(this._self, this._then); + + final _GeofenceEntity _self; + final $Res Function(_GeofenceEntity) _then; + +/// Create a copy of GeofenceEntity +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = freezed,Object? latitude = null,Object? longitude = null,Object? radius = null,Object? isActive = null,Object? deviceId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { + return _then(_GeofenceEntity( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,latitude: null == latitude ? _self.latitude : latitude // ignore: cast_nullable_to_non_nullable +as double,longitude: null == longitude ? _self.longitude : longitude // ignore: cast_nullable_to_non_nullable +as double,radius: null == radius ? _self.radius : radius // ignore: cast_nullable_to_non_nullable +as double,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable +as bool,deviceId: freezed == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable +as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/core/domain/repositories/location_repository.dart b/modules/legacy/modules/location/lib/src/core/domain/repositories/location_repository.dart new file mode 100644 index 00000000..3ac8dd8f --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/domain/repositories/location_repository.dart @@ -0,0 +1,25 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:location/src/core/data/models/create_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/create_geofence_request_model.dart'; +import 'package:location/src/core/data/models/update_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/update_geofence_request_model.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; + +abstract class LocationRepository { + Future> getGeofences({required String deviceId}); + Future createGeofence({required CreateGeofenceRequestModel request}); + Future updateGeofence({required UpdateGeofenceRequestModel request}); + Future deleteGeofence({required String geofenceId}); + + Future> getFrequentPlaces({required String deviceId}); + Future createFrequentPlace({required CreateFrequentPlaceRequestModel request}); + Future updateFrequentPlace({required UpdateFrequentPlaceRequestModel request}); + Future deleteFrequentPlace({required String frequentPlaceId}); + + Future> getPositionHistory({ + required String deviceIdentificator, + required DateTime from, + required DateTime to, + }); +} diff --git a/modules/legacy/modules/location/lib/src/core/providers/location_remote_datasource_provider.dart b/modules/legacy/modules/location/lib/src/core/providers/location_remote_datasource_provider.dart new file mode 100644 index 00000000..b3d8ea20 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/providers/location_remote_datasource_provider.dart @@ -0,0 +1,10 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:location/src/core/data/datasource/location_remote_datasource.dart'; +import 'package:location/src/core/data/datasource/location_remote_datasource_impl.dart'; +import 'package:sf_infrastructure/sf_infrastructure.dart'; + +final locationRemoteDatasourceProvider = + Provider((ref) { + final questiaRepository = getIt(); + return LocationRemoteDatasourceImpl(questiaRepository); +}); diff --git a/modules/legacy/modules/location/lib/src/core/providers/location_repository_provider.dart b/modules/legacy/modules/location/lib/src/core/providers/location_repository_provider.dart new file mode 100644 index 00000000..aedfe3fb --- /dev/null +++ b/modules/legacy/modules/location/lib/src/core/providers/location_repository_provider.dart @@ -0,0 +1,9 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:location/src/core/data/repositories/location_repository_impl.dart'; +import 'package:location/src/core/domain/repositories/location_repository.dart'; +import 'package:location/src/core/providers/location_remote_datasource_provider.dart'; + +final locationRepositoryProvider = Provider((ref) { + final remote = ref.read(locationRemoteDatasourceProvider); + return LocationRepositoryImpl(remote); +}); diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/location_screen.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/location_screen.dart index 16d598d1..b687e73c 100644 --- a/modules/legacy/modules/location/lib/src/features/location/presentation/location_screen.dart +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/location_screen.dart @@ -2,8 +2,10 @@ import 'package:control_panel/control_panel.dart'; import 'package:design_system/design_system.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:legacy_shared/legacy_shared.dart'; +import 'package:location/src/features/location/presentation/state/location_view_model.dart'; +import 'package:location/src/features/location/presentation/widgets/location_map.dart'; import 'package:sf_localizations/sf_localizations.dart'; -import 'package:utils/utils.dart'; class LocationScreen extends ConsumerWidget { const LocationScreen({super.key}); @@ -11,33 +13,41 @@ class LocationScreen extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final theme = ref.watch(themePortProvider); - final state = ref.watch(controlPanelViewModelProvider); + final controlPanelState = ref.watch(controlPanelViewModelProvider); + final locationState = ref.watch(locationViewModelProvider); - if (state.isLoading) { - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary), + if (controlPanelState.isLoading) { + return LegacyPageLayout( + theme: theme, + title: context.translate(I18n.location), + showBack: false, body: const Center(child: CircularProgressIndicator()), ); } - return Scaffold( - backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary), - body: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.symmetric( - horizontal: 14, - vertical: SizeUtils.getByScreen(small: 12, big: 14), - ), - ), - Expanded( - child: DeviceMap( - selectedPosition: state.selectedPosition, - selectedDevice: state.selectedDevice, - ), - ), - ], + return LegacyPageLayout( + theme: theme, + title: context.translate(I18n.location), + showBack: false, + body: LocationMap( + selectedPosition: controlPanelState.selectedPosition, + selectedDevice: controlPanelState.selectedDevice, + devices: controlPanelState.devices, + geofences: locationState.geofences, + frequentPlaces: locationState.frequentPlaces, + positionHistory: locationState.positionHistory, + showRouteTrail: locationState.showRouteTrail, + isLoadingHistory: locationState.isLoadingHistory, + onDeviceChanged: (device) { + ref + .read(controlPanelViewModelProvider.notifier) + .setSelectedDevice(device); + }, + onRefreshPosition: () { + ref + .read(controlPanelViewModelProvider.notifier) + .refreshPositions(); + }, ), ); } diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_model.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_model.dart new file mode 100644 index 00000000..10eb2bf9 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_model.dart @@ -0,0 +1,109 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:latlong2/latlong.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; +import 'package:location/src/features/location/presentation/state/location_map_view_state.dart'; + +final locationMapViewModelProvider = + NotifierProvider.autoDispose( + LocationMapViewModel.new, +); + +class LocationMapViewModel extends Notifier { + @override + LocationMapViewState build() { + return const LocationMapViewState(); + } + + void toggleGeofences() { + state = state.copyWith(showGeofences: !state.showGeofences); + } + + void toggleFrequentPlaces() { + state = state.copyWith(showFrequentPlaces: !state.showFrequentPlaces); + } + + void startPlacing(PlacingMode mode) { + state = state.copyWith(placingMode: mode); + } + + void cancelPlacing() { + state = state.copyWith( + placingMode: PlacingMode.none, + adjustingRadius: false, + previewPoint: null, + ); + } + + void confirmGeofencePlacement(LatLng center) { + state = state.copyWith( + placingMode: PlacingMode.none, + adjustingRadius: true, + previewPoint: center, + previewRadius: 200, + ); + } + + void confirmFrequentPlacePlacement() { + state = state.copyWith( + placingMode: PlacingMode.none, + previewPoint: null, + ); + } + + void updatePreviewRadius(double radius) { + state = state.copyWith(previewRadius: radius); + } + + void confirmRadius() { + state = state.copyWith( + adjustingRadius: false, + editingGeofence: null, + ); + } + + void clearPreviewPoint() { + state = state.copyWith(previewPoint: null); + } + + void selectGeofence(GeofenceEntity geofence) { + state = state.copyWith( + selectedGeofence: geofence, + selectedFrequentPlace: null, + ); + } + + void clearSelectedGeofence() { + state = state.copyWith(selectedGeofence: null); + } + + void startEditingGeofence(GeofenceEntity geofence) { + state = state.copyWith( + selectedGeofence: null, + editingGeofence: geofence, + previewPoint: LatLng(geofence.latitude, geofence.longitude), + previewRadius: geofence.radius, + adjustingRadius: true, + ); + } + + void selectFrequentPlace(FrequentPlaceEntity place) { + state = state.copyWith( + selectedFrequentPlace: place, + selectedGeofence: null, + ); + } + + void clearSelectedFrequentPlace() { + state = state.copyWith(selectedFrequentPlace: null); + } + + void selectHistoryPosition(PositionEntity position) { + state = state.copyWith(selectedHistoryPosition: position); + } + + void clearSelectedHistoryPosition() { + state = state.copyWith(selectedHistoryPosition: null); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_state.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_state.dart new file mode 100644 index 00000000..fcc20433 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_state.dart @@ -0,0 +1,25 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:latlong2/latlong.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; + +part 'location_map_view_state.freezed.dart'; + +enum PlacingMode { none, geofence, frequentPlace } + +@freezed +abstract class LocationMapViewState with _$LocationMapViewState { + const factory LocationMapViewState({ + @Default(true) bool showGeofences, + @Default(true) bool showFrequentPlaces, + @Default(PlacingMode.none) PlacingMode placingMode, + @Default(false) bool adjustingRadius, + @Default(200.0) double previewRadius, + LatLng? previewPoint, + GeofenceEntity? selectedGeofence, + GeofenceEntity? editingGeofence, + FrequentPlaceEntity? selectedFrequentPlace, + PositionEntity? selectedHistoryPosition, + }) = _LocationMapViewState; +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_state.freezed.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_state.freezed.dart new file mode 100644 index 00000000..ee8e1ab9 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_map_view_state.freezed.dart @@ -0,0 +1,394 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'location_map_view_state.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$LocationMapViewState { + + bool get showGeofences; bool get showFrequentPlaces; PlacingMode get placingMode; bool get adjustingRadius; double get previewRadius; LatLng? get previewPoint; GeofenceEntity? get selectedGeofence; GeofenceEntity? get editingGeofence; FrequentPlaceEntity? get selectedFrequentPlace; PositionEntity? get selectedHistoryPosition; +/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LocationMapViewStateCopyWith get copyWith => _$LocationMapViewStateCopyWithImpl(this as LocationMapViewState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LocationMapViewState&&(identical(other.showGeofences, showGeofences) || other.showGeofences == showGeofences)&&(identical(other.showFrequentPlaces, showFrequentPlaces) || other.showFrequentPlaces == showFrequentPlaces)&&(identical(other.placingMode, placingMode) || other.placingMode == placingMode)&&(identical(other.adjustingRadius, adjustingRadius) || other.adjustingRadius == adjustingRadius)&&(identical(other.previewRadius, previewRadius) || other.previewRadius == previewRadius)&&(identical(other.previewPoint, previewPoint) || other.previewPoint == previewPoint)&&(identical(other.selectedGeofence, selectedGeofence) || other.selectedGeofence == selectedGeofence)&&(identical(other.editingGeofence, editingGeofence) || other.editingGeofence == editingGeofence)&&(identical(other.selectedFrequentPlace, selectedFrequentPlace) || other.selectedFrequentPlace == selectedFrequentPlace)&&(identical(other.selectedHistoryPosition, selectedHistoryPosition) || other.selectedHistoryPosition == selectedHistoryPosition)); +} + + +@override +int get hashCode => Object.hash(runtimeType,showGeofences,showFrequentPlaces,placingMode,adjustingRadius,previewRadius,previewPoint,selectedGeofence,editingGeofence,selectedFrequentPlace,selectedHistoryPosition); + +@override +String toString() { + return 'LocationMapViewState(showGeofences: $showGeofences, showFrequentPlaces: $showFrequentPlaces, placingMode: $placingMode, adjustingRadius: $adjustingRadius, previewRadius: $previewRadius, previewPoint: $previewPoint, selectedGeofence: $selectedGeofence, editingGeofence: $editingGeofence, selectedFrequentPlace: $selectedFrequentPlace, selectedHistoryPosition: $selectedHistoryPosition)'; +} + + +} + +/// @nodoc +abstract mixin class $LocationMapViewStateCopyWith<$Res> { + factory $LocationMapViewStateCopyWith(LocationMapViewState value, $Res Function(LocationMapViewState) _then) = _$LocationMapViewStateCopyWithImpl; +@useResult +$Res call({ + bool showGeofences, bool showFrequentPlaces, PlacingMode placingMode, bool adjustingRadius, double previewRadius, LatLng? previewPoint, GeofenceEntity? selectedGeofence, GeofenceEntity? editingGeofence, FrequentPlaceEntity? selectedFrequentPlace, PositionEntity? selectedHistoryPosition +}); + + +$GeofenceEntityCopyWith<$Res>? get selectedGeofence;$GeofenceEntityCopyWith<$Res>? get editingGeofence;$FrequentPlaceEntityCopyWith<$Res>? get selectedFrequentPlace;$PositionEntityCopyWith<$Res>? get selectedHistoryPosition; + +} +/// @nodoc +class _$LocationMapViewStateCopyWithImpl<$Res> + implements $LocationMapViewStateCopyWith<$Res> { + _$LocationMapViewStateCopyWithImpl(this._self, this._then); + + final LocationMapViewState _self; + final $Res Function(LocationMapViewState) _then; + +/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? showGeofences = null,Object? showFrequentPlaces = null,Object? placingMode = null,Object? adjustingRadius = null,Object? previewRadius = null,Object? previewPoint = freezed,Object? selectedGeofence = freezed,Object? editingGeofence = freezed,Object? selectedFrequentPlace = freezed,Object? selectedHistoryPosition = freezed,}) { + return _then(_self.copyWith( +showGeofences: null == showGeofences ? _self.showGeofences : showGeofences // ignore: cast_nullable_to_non_nullable +as bool,showFrequentPlaces: null == showFrequentPlaces ? _self.showFrequentPlaces : showFrequentPlaces // ignore: cast_nullable_to_non_nullable +as bool,placingMode: null == placingMode ? _self.placingMode : placingMode // ignore: cast_nullable_to_non_nullable +as PlacingMode,adjustingRadius: null == adjustingRadius ? _self.adjustingRadius : adjustingRadius // ignore: cast_nullable_to_non_nullable +as bool,previewRadius: null == previewRadius ? _self.previewRadius : previewRadius // ignore: cast_nullable_to_non_nullable +as double,previewPoint: freezed == previewPoint ? _self.previewPoint : previewPoint // ignore: cast_nullable_to_non_nullable +as LatLng?,selectedGeofence: freezed == selectedGeofence ? _self.selectedGeofence : selectedGeofence // ignore: cast_nullable_to_non_nullable +as GeofenceEntity?,editingGeofence: freezed == editingGeofence ? _self.editingGeofence : editingGeofence // ignore: cast_nullable_to_non_nullable +as GeofenceEntity?,selectedFrequentPlace: freezed == selectedFrequentPlace ? _self.selectedFrequentPlace : selectedFrequentPlace // ignore: cast_nullable_to_non_nullable +as FrequentPlaceEntity?,selectedHistoryPosition: freezed == selectedHistoryPosition ? _self.selectedHistoryPosition : selectedHistoryPosition // ignore: cast_nullable_to_non_nullable +as PositionEntity?, + )); +} +/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceEntityCopyWith<$Res>? get selectedGeofence { + if (_self.selectedGeofence == null) { + return null; + } + + return $GeofenceEntityCopyWith<$Res>(_self.selectedGeofence!, (value) { + return _then(_self.copyWith(selectedGeofence: value)); + }); +}/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceEntityCopyWith<$Res>? get editingGeofence { + if (_self.editingGeofence == null) { + return null; + } + + return $GeofenceEntityCopyWith<$Res>(_self.editingGeofence!, (value) { + return _then(_self.copyWith(editingGeofence: value)); + }); +}/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$FrequentPlaceEntityCopyWith<$Res>? get selectedFrequentPlace { + if (_self.selectedFrequentPlace == null) { + return null; + } + + return $FrequentPlaceEntityCopyWith<$Res>(_self.selectedFrequentPlace!, (value) { + return _then(_self.copyWith(selectedFrequentPlace: value)); + }); +}/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PositionEntityCopyWith<$Res>? get selectedHistoryPosition { + if (_self.selectedHistoryPosition == null) { + return null; + } + + return $PositionEntityCopyWith<$Res>(_self.selectedHistoryPosition!, (value) { + return _then(_self.copyWith(selectedHistoryPosition: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [LocationMapViewState]. +extension LocationMapViewStatePatterns on LocationMapViewState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LocationMapViewState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LocationMapViewState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LocationMapViewState value) $default,){ +final _that = this; +switch (_that) { +case _LocationMapViewState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LocationMapViewState value)? $default,){ +final _that = this; +switch (_that) { +case _LocationMapViewState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool showGeofences, bool showFrequentPlaces, PlacingMode placingMode, bool adjustingRadius, double previewRadius, LatLng? previewPoint, GeofenceEntity? selectedGeofence, GeofenceEntity? editingGeofence, FrequentPlaceEntity? selectedFrequentPlace, PositionEntity? selectedHistoryPosition)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LocationMapViewState() when $default != null: +return $default(_that.showGeofences,_that.showFrequentPlaces,_that.placingMode,_that.adjustingRadius,_that.previewRadius,_that.previewPoint,_that.selectedGeofence,_that.editingGeofence,_that.selectedFrequentPlace,_that.selectedHistoryPosition);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool showGeofences, bool showFrequentPlaces, PlacingMode placingMode, bool adjustingRadius, double previewRadius, LatLng? previewPoint, GeofenceEntity? selectedGeofence, GeofenceEntity? editingGeofence, FrequentPlaceEntity? selectedFrequentPlace, PositionEntity? selectedHistoryPosition) $default,) {final _that = this; +switch (_that) { +case _LocationMapViewState(): +return $default(_that.showGeofences,_that.showFrequentPlaces,_that.placingMode,_that.adjustingRadius,_that.previewRadius,_that.previewPoint,_that.selectedGeofence,_that.editingGeofence,_that.selectedFrequentPlace,_that.selectedHistoryPosition);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool showGeofences, bool showFrequentPlaces, PlacingMode placingMode, bool adjustingRadius, double previewRadius, LatLng? previewPoint, GeofenceEntity? selectedGeofence, GeofenceEntity? editingGeofence, FrequentPlaceEntity? selectedFrequentPlace, PositionEntity? selectedHistoryPosition)? $default,) {final _that = this; +switch (_that) { +case _LocationMapViewState() when $default != null: +return $default(_that.showGeofences,_that.showFrequentPlaces,_that.placingMode,_that.adjustingRadius,_that.previewRadius,_that.previewPoint,_that.selectedGeofence,_that.editingGeofence,_that.selectedFrequentPlace,_that.selectedHistoryPosition);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _LocationMapViewState implements LocationMapViewState { + const _LocationMapViewState({this.showGeofences = true, this.showFrequentPlaces = true, this.placingMode = PlacingMode.none, this.adjustingRadius = false, this.previewRadius = 200.0, this.previewPoint, this.selectedGeofence, this.editingGeofence, this.selectedFrequentPlace, this.selectedHistoryPosition}); + + +@override@JsonKey() final bool showGeofences; +@override@JsonKey() final bool showFrequentPlaces; +@override@JsonKey() final PlacingMode placingMode; +@override@JsonKey() final bool adjustingRadius; +@override@JsonKey() final double previewRadius; +@override final LatLng? previewPoint; +@override final GeofenceEntity? selectedGeofence; +@override final GeofenceEntity? editingGeofence; +@override final FrequentPlaceEntity? selectedFrequentPlace; +@override final PositionEntity? selectedHistoryPosition; + +/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LocationMapViewStateCopyWith<_LocationMapViewState> get copyWith => __$LocationMapViewStateCopyWithImpl<_LocationMapViewState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LocationMapViewState&&(identical(other.showGeofences, showGeofences) || other.showGeofences == showGeofences)&&(identical(other.showFrequentPlaces, showFrequentPlaces) || other.showFrequentPlaces == showFrequentPlaces)&&(identical(other.placingMode, placingMode) || other.placingMode == placingMode)&&(identical(other.adjustingRadius, adjustingRadius) || other.adjustingRadius == adjustingRadius)&&(identical(other.previewRadius, previewRadius) || other.previewRadius == previewRadius)&&(identical(other.previewPoint, previewPoint) || other.previewPoint == previewPoint)&&(identical(other.selectedGeofence, selectedGeofence) || other.selectedGeofence == selectedGeofence)&&(identical(other.editingGeofence, editingGeofence) || other.editingGeofence == editingGeofence)&&(identical(other.selectedFrequentPlace, selectedFrequentPlace) || other.selectedFrequentPlace == selectedFrequentPlace)&&(identical(other.selectedHistoryPosition, selectedHistoryPosition) || other.selectedHistoryPosition == selectedHistoryPosition)); +} + + +@override +int get hashCode => Object.hash(runtimeType,showGeofences,showFrequentPlaces,placingMode,adjustingRadius,previewRadius,previewPoint,selectedGeofence,editingGeofence,selectedFrequentPlace,selectedHistoryPosition); + +@override +String toString() { + return 'LocationMapViewState(showGeofences: $showGeofences, showFrequentPlaces: $showFrequentPlaces, placingMode: $placingMode, adjustingRadius: $adjustingRadius, previewRadius: $previewRadius, previewPoint: $previewPoint, selectedGeofence: $selectedGeofence, editingGeofence: $editingGeofence, selectedFrequentPlace: $selectedFrequentPlace, selectedHistoryPosition: $selectedHistoryPosition)'; +} + + +} + +/// @nodoc +abstract mixin class _$LocationMapViewStateCopyWith<$Res> implements $LocationMapViewStateCopyWith<$Res> { + factory _$LocationMapViewStateCopyWith(_LocationMapViewState value, $Res Function(_LocationMapViewState) _then) = __$LocationMapViewStateCopyWithImpl; +@override @useResult +$Res call({ + bool showGeofences, bool showFrequentPlaces, PlacingMode placingMode, bool adjustingRadius, double previewRadius, LatLng? previewPoint, GeofenceEntity? selectedGeofence, GeofenceEntity? editingGeofence, FrequentPlaceEntity? selectedFrequentPlace, PositionEntity? selectedHistoryPosition +}); + + +@override $GeofenceEntityCopyWith<$Res>? get selectedGeofence;@override $GeofenceEntityCopyWith<$Res>? get editingGeofence;@override $FrequentPlaceEntityCopyWith<$Res>? get selectedFrequentPlace;@override $PositionEntityCopyWith<$Res>? get selectedHistoryPosition; + +} +/// @nodoc +class __$LocationMapViewStateCopyWithImpl<$Res> + implements _$LocationMapViewStateCopyWith<$Res> { + __$LocationMapViewStateCopyWithImpl(this._self, this._then); + + final _LocationMapViewState _self; + final $Res Function(_LocationMapViewState) _then; + +/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? showGeofences = null,Object? showFrequentPlaces = null,Object? placingMode = null,Object? adjustingRadius = null,Object? previewRadius = null,Object? previewPoint = freezed,Object? selectedGeofence = freezed,Object? editingGeofence = freezed,Object? selectedFrequentPlace = freezed,Object? selectedHistoryPosition = freezed,}) { + return _then(_LocationMapViewState( +showGeofences: null == showGeofences ? _self.showGeofences : showGeofences // ignore: cast_nullable_to_non_nullable +as bool,showFrequentPlaces: null == showFrequentPlaces ? _self.showFrequentPlaces : showFrequentPlaces // ignore: cast_nullable_to_non_nullable +as bool,placingMode: null == placingMode ? _self.placingMode : placingMode // ignore: cast_nullable_to_non_nullable +as PlacingMode,adjustingRadius: null == adjustingRadius ? _self.adjustingRadius : adjustingRadius // ignore: cast_nullable_to_non_nullable +as bool,previewRadius: null == previewRadius ? _self.previewRadius : previewRadius // ignore: cast_nullable_to_non_nullable +as double,previewPoint: freezed == previewPoint ? _self.previewPoint : previewPoint // ignore: cast_nullable_to_non_nullable +as LatLng?,selectedGeofence: freezed == selectedGeofence ? _self.selectedGeofence : selectedGeofence // ignore: cast_nullable_to_non_nullable +as GeofenceEntity?,editingGeofence: freezed == editingGeofence ? _self.editingGeofence : editingGeofence // ignore: cast_nullable_to_non_nullable +as GeofenceEntity?,selectedFrequentPlace: freezed == selectedFrequentPlace ? _self.selectedFrequentPlace : selectedFrequentPlace // ignore: cast_nullable_to_non_nullable +as FrequentPlaceEntity?,selectedHistoryPosition: freezed == selectedHistoryPosition ? _self.selectedHistoryPosition : selectedHistoryPosition // ignore: cast_nullable_to_non_nullable +as PositionEntity?, + )); +} + +/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceEntityCopyWith<$Res>? get selectedGeofence { + if (_self.selectedGeofence == null) { + return null; + } + + return $GeofenceEntityCopyWith<$Res>(_self.selectedGeofence!, (value) { + return _then(_self.copyWith(selectedGeofence: value)); + }); +}/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GeofenceEntityCopyWith<$Res>? get editingGeofence { + if (_self.editingGeofence == null) { + return null; + } + + return $GeofenceEntityCopyWith<$Res>(_self.editingGeofence!, (value) { + return _then(_self.copyWith(editingGeofence: value)); + }); +}/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$FrequentPlaceEntityCopyWith<$Res>? get selectedFrequentPlace { + if (_self.selectedFrequentPlace == null) { + return null; + } + + return $FrequentPlaceEntityCopyWith<$Res>(_self.selectedFrequentPlace!, (value) { + return _then(_self.copyWith(selectedFrequentPlace: value)); + }); +}/// Create a copy of LocationMapViewState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PositionEntityCopyWith<$Res>? get selectedHistoryPosition { + if (_self.selectedHistoryPosition == null) { + return null; + } + + return $PositionEntityCopyWith<$Res>(_self.selectedHistoryPosition!, (value) { + return _then(_self.copyWith(selectedHistoryPosition: value)); + }); +} +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_model.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_model.dart new file mode 100644 index 00000000..177f90cd --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_model.dart @@ -0,0 +1,278 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:legacy_shared/legacy_shared.dart'; +import 'package:location/src/core/data/models/create_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/create_geofence_request_model.dart'; +import 'package:location/src/core/data/models/frequent_places_response_model.dart'; +import 'package:location/src/core/data/models/update_frequent_place_request_model.dart'; +import 'package:location/src/core/data/models/update_geofence_request_model.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; +import 'package:location/src/core/domain/repositories/location_repository.dart'; +import 'package:location/src/core/providers/location_repository_provider.dart'; +import 'package:location/src/features/location/presentation/state/location_view_state.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:uuid/uuid.dart'; + +final locationViewModelProvider = + NotifierProvider.autoDispose( + LocationViewModel.new, +); + +class LocationViewModel extends Notifier { + late final LocationRepository _locationRepository; + + @override + LocationViewState build() { + _locationRepository = ref.read(locationRepositoryProvider); + final device = ref.watch(selectedDeviceProvider); + if (device != null) { + _fetchData(device.id); + } + return const LocationViewState(); + } + + Future _fetchData(String deviceId) async { + try { + final results = await Future.wait([ + _locationRepository.getGeofences(deviceId: deviceId), + _locationRepository.getFrequentPlaces(deviceId: deviceId), + ]); + if (!ref.mounted) return; + state = state.copyWith( + geofences: results[0] as List, + frequentPlaces: results[1] as List, + isLoading: false, + ); + } catch (e) { + if (!ref.mounted) return; + state = state.copyWith(isLoading: false, errorMessage: _formatError(e)); + } + } + + Future createGeofence({ + required String name, + String? description, + required double latitude, + required double longitude, + required double radius, + }) async { + state = state.copyWith(isSubmitting: true, errorMessage: ''); + try { + final user = await ref.read(userInfoProvider.future); + final device = ref.read(selectedDeviceProvider); + final request = CreateGeofenceRequestModel( + id: const Uuid().v4(), + name: name, + description: description, + latitude: latitude, + longitude: longitude, + radius: radius, + userId: user.delegationId == null ? user.id : null, + delegationId: user.delegationId, + groupId: device?.groupId, + deviceId: device?.id, + ); + final created = + await _locationRepository.createGeofence(request: request); + if (!ref.mounted) return false; + state = state.copyWith( + geofences: [...state.geofences, created], + isSubmitting: false, + ); + return true; + } catch (e) { + return _handleError(e); + } + } + + Future updateGeofence({ + required String id, + required String name, + String? description, + required double latitude, + required double longitude, + required double radius, + }) async { + state = state.copyWith(isSubmitting: true, errorMessage: ''); + try { + final request = UpdateGeofenceRequestModel( + id: id, + name: name, + description: description, + latitude: latitude, + longitude: longitude, + radius: radius, + ); + final updated = + await _locationRepository.updateGeofence(request: request); + if (!ref.mounted) return false; + state = state.copyWith( + geofences: + state.geofences.map((g) => g.id == id ? updated : g).toList(), + isSubmitting: false, + ); + return true; + } catch (e) { + return _handleError(e); + } + } + + Future deleteGeofence({required String id}) async { + state = state.copyWith(errorMessage: ''); + try { + await _locationRepository.deleteGeofence(geofenceId: id); + if (!ref.mounted) return false; + state = state.copyWith( + geofences: state.geofences.where((g) => g.id != id).toList(), + ); + return true; + } catch (e) { + return _handleError(e); + } + } + + Future createFrequentPlace({ + required String name, + required double lat, + required double lng, + List wifiList = const [], + }) async { + state = state.copyWith(isSubmitting: true, errorMessage: ''); + try { + final user = await ref.read(userInfoProvider.future); + final device = ref.read(selectedDeviceProvider); + final request = CreateFrequentPlaceRequestModel( + id: const Uuid().v4(), + name: name, + lat: lat, + lng: lng, + wifiList: wifiList + .map((w) => WifiInfoResponseModel( + SSID: w.ssid, + BSSID: w.bssid, + signal: w.signal, + )) + .toList(), + userId: user.delegationId == null ? user.id : null, + delegationId: user.delegationId, + groupId: device?.groupId, + deviceId: device?.id, + ); + final created = + await _locationRepository.createFrequentPlace(request: request); + if (!ref.mounted) return false; + state = state.copyWith( + frequentPlaces: [...state.frequentPlaces, created], + isSubmitting: false, + ); + return true; + } catch (e) { + return _handleError(e); + } + } + + Future updateFrequentPlace({ + required String id, + required String name, + required double lat, + required double lng, + List wifiList = const [], + }) async { + state = state.copyWith(isSubmitting: true, errorMessage: ''); + try { + final request = UpdateFrequentPlaceRequestModel( + id: id, + name: name, + lat: lat, + lng: lng, + wifiList: wifiList + .map((w) => WifiInfoResponseModel( + SSID: w.ssid, + BSSID: w.bssid, + signal: w.signal, + )) + .toList(), + ); + final updated = + await _locationRepository.updateFrequentPlace(request: request); + if (!ref.mounted) return false; + state = state.copyWith( + frequentPlaces: + state.frequentPlaces.map((f) => f.id == id ? updated : f).toList(), + isSubmitting: false, + ); + return true; + } catch (e) { + return _handleError(e); + } + } + + Future deleteFrequentPlace({required String id}) async { + state = state.copyWith(errorMessage: ''); + try { + await _locationRepository.deleteFrequentPlace(frequentPlaceId: id); + if (!ref.mounted) return false; + state = state.copyWith( + frequentPlaces: + state.frequentPlaces.where((f) => f.id != id).toList(), + ); + return true; + } catch (e) { + return _handleError(e); + } + } + + Future loadPositionHistory({ + required DateTime from, + required DateTime to, + }) async { + final device = ref.read(selectedDeviceProvider); + if (device == null) return; + + state = state.copyWith(isLoadingHistory: true, errorMessage: ''); + try { + final positions = await _locationRepository.getPositionHistory( + deviceIdentificator: device.identificator, + from: from, + to: to, + ); + if (!ref.mounted) return; + state = state.copyWith( + positionHistory: positions, + isLoadingHistory: false, + showRouteTrail: positions.isNotEmpty, + ); + } catch (e) { + if (!ref.mounted) return; + state = state.copyWith( + isLoadingHistory: false, + errorMessage: _formatError(e), + ); + } + } + + void clearPositionHistory() { + state = state.copyWith( + positionHistory: [], + showRouteTrail: false, + ); + } + + void toggleRouteTrail() { + state = state.copyWith(showRouteTrail: !state.showRouteTrail); + } + + bool _handleError(Object e) { + if (!ref.mounted) return false; + state = state.copyWith( + isSubmitting: false, + errorMessage: _formatError(e), + ); + return false; + } + + String _formatError(Object e) { + final msg = e.toString(); + return msg.startsWith('Exception: ') ? msg.substring(11) : msg; + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_state.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_state.dart new file mode 100644 index 00000000..1c1af06e --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_state.dart @@ -0,0 +1,20 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; + +part 'location_view_state.freezed.dart'; + +@freezed +abstract class LocationViewState with _$LocationViewState { + const factory LocationViewState({ + @Default([]) List geofences, + @Default([]) List frequentPlaces, + @Default([]) List positionHistory, + @Default(true) bool isLoading, + @Default(false) bool isLoadingHistory, + @Default(false) bool isSubmitting, + @Default(false) bool showRouteTrail, + @Default('') String errorMessage, + }) = _LocationViewState; +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_state.freezed.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_state.freezed.dart new file mode 100644 index 00000000..69c30530 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/state/location_view_state.freezed.dart @@ -0,0 +1,310 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'location_view_state.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$LocationViewState { + + List get geofences; List get frequentPlaces; List get positionHistory; bool get isLoading; bool get isLoadingHistory; bool get isSubmitting; bool get showRouteTrail; String get errorMessage; +/// Create a copy of LocationViewState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LocationViewStateCopyWith get copyWith => _$LocationViewStateCopyWithImpl(this as LocationViewState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LocationViewState&&const DeepCollectionEquality().equals(other.geofences, geofences)&&const DeepCollectionEquality().equals(other.frequentPlaces, frequentPlaces)&&const DeepCollectionEquality().equals(other.positionHistory, positionHistory)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isLoadingHistory, isLoadingHistory) || other.isLoadingHistory == isLoadingHistory)&&(identical(other.isSubmitting, isSubmitting) || other.isSubmitting == isSubmitting)&&(identical(other.showRouteTrail, showRouteTrail) || other.showRouteTrail == showRouteTrail)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); +} + + +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(geofences),const DeepCollectionEquality().hash(frequentPlaces),const DeepCollectionEquality().hash(positionHistory),isLoading,isLoadingHistory,isSubmitting,showRouteTrail,errorMessage); + +@override +String toString() { + return 'LocationViewState(geofences: $geofences, frequentPlaces: $frequentPlaces, positionHistory: $positionHistory, isLoading: $isLoading, isLoadingHistory: $isLoadingHistory, isSubmitting: $isSubmitting, showRouteTrail: $showRouteTrail, errorMessage: $errorMessage)'; +} + + +} + +/// @nodoc +abstract mixin class $LocationViewStateCopyWith<$Res> { + factory $LocationViewStateCopyWith(LocationViewState value, $Res Function(LocationViewState) _then) = _$LocationViewStateCopyWithImpl; +@useResult +$Res call({ + List geofences, List frequentPlaces, List positionHistory, bool isLoading, bool isLoadingHistory, bool isSubmitting, bool showRouteTrail, String errorMessage +}); + + + + +} +/// @nodoc +class _$LocationViewStateCopyWithImpl<$Res> + implements $LocationViewStateCopyWith<$Res> { + _$LocationViewStateCopyWithImpl(this._self, this._then); + + final LocationViewState _self; + final $Res Function(LocationViewState) _then; + +/// Create a copy of LocationViewState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? geofences = null,Object? frequentPlaces = null,Object? positionHistory = null,Object? isLoading = null,Object? isLoadingHistory = null,Object? isSubmitting = null,Object? showRouteTrail = null,Object? errorMessage = null,}) { + return _then(_self.copyWith( +geofences: null == geofences ? _self.geofences : geofences // ignore: cast_nullable_to_non_nullable +as List,frequentPlaces: null == frequentPlaces ? _self.frequentPlaces : frequentPlaces // ignore: cast_nullable_to_non_nullable +as List,positionHistory: null == positionHistory ? _self.positionHistory : positionHistory // ignore: cast_nullable_to_non_nullable +as List,isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable +as bool,isLoadingHistory: null == isLoadingHistory ? _self.isLoadingHistory : isLoadingHistory // ignore: cast_nullable_to_non_nullable +as bool,isSubmitting: null == isSubmitting ? _self.isSubmitting : isSubmitting // ignore: cast_nullable_to_non_nullable +as bool,showRouteTrail: null == showRouteTrail ? _self.showRouteTrail : showRouteTrail // ignore: cast_nullable_to_non_nullable +as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LocationViewState]. +extension LocationViewStatePatterns on LocationViewState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LocationViewState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LocationViewState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LocationViewState value) $default,){ +final _that = this; +switch (_that) { +case _LocationViewState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LocationViewState value)? $default,){ +final _that = this; +switch (_that) { +case _LocationViewState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List geofences, List frequentPlaces, List positionHistory, bool isLoading, bool isLoadingHistory, bool isSubmitting, bool showRouteTrail, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LocationViewState() when $default != null: +return $default(_that.geofences,_that.frequentPlaces,_that.positionHistory,_that.isLoading,_that.isLoadingHistory,_that.isSubmitting,_that.showRouteTrail,_that.errorMessage);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List geofences, List frequentPlaces, List positionHistory, bool isLoading, bool isLoadingHistory, bool isSubmitting, bool showRouteTrail, String errorMessage) $default,) {final _that = this; +switch (_that) { +case _LocationViewState(): +return $default(_that.geofences,_that.frequentPlaces,_that.positionHistory,_that.isLoading,_that.isLoadingHistory,_that.isSubmitting,_that.showRouteTrail,_that.errorMessage);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List geofences, List frequentPlaces, List positionHistory, bool isLoading, bool isLoadingHistory, bool isSubmitting, bool showRouteTrail, String errorMessage)? $default,) {final _that = this; +switch (_that) { +case _LocationViewState() when $default != null: +return $default(_that.geofences,_that.frequentPlaces,_that.positionHistory,_that.isLoading,_that.isLoadingHistory,_that.isSubmitting,_that.showRouteTrail,_that.errorMessage);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _LocationViewState implements LocationViewState { + const _LocationViewState({final List geofences = const [], final List frequentPlaces = const [], final List positionHistory = const [], this.isLoading = true, this.isLoadingHistory = false, this.isSubmitting = false, this.showRouteTrail = false, this.errorMessage = ''}): _geofences = geofences,_frequentPlaces = frequentPlaces,_positionHistory = positionHistory; + + + final List _geofences; +@override@JsonKey() List get geofences { + if (_geofences is EqualUnmodifiableListView) return _geofences; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_geofences); +} + + final List _frequentPlaces; +@override@JsonKey() List get frequentPlaces { + if (_frequentPlaces is EqualUnmodifiableListView) return _frequentPlaces; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_frequentPlaces); +} + + final List _positionHistory; +@override@JsonKey() List get positionHistory { + if (_positionHistory is EqualUnmodifiableListView) return _positionHistory; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_positionHistory); +} + +@override@JsonKey() final bool isLoading; +@override@JsonKey() final bool isLoadingHistory; +@override@JsonKey() final bool isSubmitting; +@override@JsonKey() final bool showRouteTrail; +@override@JsonKey() final String errorMessage; + +/// Create a copy of LocationViewState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LocationViewStateCopyWith<_LocationViewState> get copyWith => __$LocationViewStateCopyWithImpl<_LocationViewState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LocationViewState&&const DeepCollectionEquality().equals(other._geofences, _geofences)&&const DeepCollectionEquality().equals(other._frequentPlaces, _frequentPlaces)&&const DeepCollectionEquality().equals(other._positionHistory, _positionHistory)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.isLoadingHistory, isLoadingHistory) || other.isLoadingHistory == isLoadingHistory)&&(identical(other.isSubmitting, isSubmitting) || other.isSubmitting == isSubmitting)&&(identical(other.showRouteTrail, showRouteTrail) || other.showRouteTrail == showRouteTrail)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); +} + + +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_geofences),const DeepCollectionEquality().hash(_frequentPlaces),const DeepCollectionEquality().hash(_positionHistory),isLoading,isLoadingHistory,isSubmitting,showRouteTrail,errorMessage); + +@override +String toString() { + return 'LocationViewState(geofences: $geofences, frequentPlaces: $frequentPlaces, positionHistory: $positionHistory, isLoading: $isLoading, isLoadingHistory: $isLoadingHistory, isSubmitting: $isSubmitting, showRouteTrail: $showRouteTrail, errorMessage: $errorMessage)'; +} + + +} + +/// @nodoc +abstract mixin class _$LocationViewStateCopyWith<$Res> implements $LocationViewStateCopyWith<$Res> { + factory _$LocationViewStateCopyWith(_LocationViewState value, $Res Function(_LocationViewState) _then) = __$LocationViewStateCopyWithImpl; +@override @useResult +$Res call({ + List geofences, List frequentPlaces, List positionHistory, bool isLoading, bool isLoadingHistory, bool isSubmitting, bool showRouteTrail, String errorMessage +}); + + + + +} +/// @nodoc +class __$LocationViewStateCopyWithImpl<$Res> + implements _$LocationViewStateCopyWith<$Res> { + __$LocationViewStateCopyWithImpl(this._self, this._then); + + final _LocationViewState _self; + final $Res Function(_LocationViewState) _then; + +/// Create a copy of LocationViewState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? geofences = null,Object? frequentPlaces = null,Object? positionHistory = null,Object? isLoading = null,Object? isLoadingHistory = null,Object? isSubmitting = null,Object? showRouteTrail = null,Object? errorMessage = null,}) { + return _then(_LocationViewState( +geofences: null == geofences ? _self._geofences : geofences // ignore: cast_nullable_to_non_nullable +as List,frequentPlaces: null == frequentPlaces ? _self._frequentPlaces : frequentPlaces // ignore: cast_nullable_to_non_nullable +as List,positionHistory: null == positionHistory ? _self._positionHistory : positionHistory // ignore: cast_nullable_to_non_nullable +as List,isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable +as bool,isLoadingHistory: null == isLoadingHistory ? _self.isLoadingHistory : isLoadingHistory // ignore: cast_nullable_to_non_nullable +as bool,isSubmitting: null == isSubmitting ? _self.isSubmitting : isSubmitting // ignore: cast_nullable_to_non_nullable +as bool,showRouteTrail: null == showRouteTrail ? _self.showRouteTrail : showRouteTrail // ignore: cast_nullable_to_non_nullable +as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + +// dart format on diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/create_frequent_place_sheet.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/create_frequent_place_sheet.dart new file mode 100644 index 00000000..8f13c111 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/create_frequent_place_sheet.dart @@ -0,0 +1,290 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:latlong2/latlong.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; +import 'package:sf_localizations/sf_localizations.dart'; +import 'package:utils/utils.dart'; + +import '../state/location_view_model.dart'; +import 'location_input_decoration.dart'; + +Future showCreateFrequentPlaceSheet( + BuildContext context, { + required LatLng point, +}) { + return showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => _FrequentPlaceSheet(point: point), + ); +} + +Future showEditFrequentPlaceSheet( + BuildContext context, { + required FrequentPlaceEntity frequentPlace, +}) { + return showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => _FrequentPlaceSheet( + point: LatLng(frequentPlace.lat, frequentPlace.lng), + editingPlace: frequentPlace, + ), + ); +} + +class _FrequentPlaceSheet extends ConsumerStatefulWidget { + final LatLng point; + final FrequentPlaceEntity? editingPlace; + + const _FrequentPlaceSheet({ + required this.point, + this.editingPlace, + }); + + @override + ConsumerState<_FrequentPlaceSheet> createState() => + _FrequentPlaceSheetState(); +} + +class _FrequentPlaceSheetState extends ConsumerState<_FrequentPlaceSheet> { + final _nameController = TextEditingController(); + late List _wifiList; + + bool get _isEditing => widget.editingPlace != null; + + @override + void initState() { + super.initState(); + if (_isEditing) { + _nameController.text = widget.editingPlace!.name; + _wifiList = List.of(widget.editingPlace!.wifiList); + } else { + _wifiList = []; + } + } + + @override + void dispose() { + _nameController.dispose(); + super.dispose(); + } + + bool get _canSave => _nameController.text.trim().isNotEmpty; + + Future _submit() async { + if (!_canSave) return; + + final vm = ref.read(locationViewModelProvider.notifier); + final bool success; + + if (_isEditing) { + success = await vm.updateFrequentPlace( + id: widget.editingPlace!.id, + name: _nameController.text.trim(), + lat: widget.point.latitude, + lng: widget.point.longitude, + wifiList: _wifiList, + ); + } else { + success = await vm.createFrequentPlace( + name: _nameController.text.trim(), + lat: widget.point.latitude, + lng: widget.point.longitude, + wifiList: _wifiList, + ); + } + + if (success && mounted) { + Navigator.pop(context); + } + } + + void _addWifi() { + setState(() { + _wifiList.add(const WifiInfoEntity(ssid: '', bssid: '', signal: '')); + }); + } + + void _removeWifi(int index) { + setState(() => _wifiList.removeAt(index)); + } + + void _updateWifi(int index, WifiInfoEntity updated) { + setState(() => _wifiList[index] = updated); + } + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + final primaryColor = theme.getColorFor(ThemeCode.legacyPrimary); + final isSubmitting = ref.watch( + locationViewModelProvider.select((s) => s.isSubmitting), + ); + final errorMessage = ref.watch( + locationViewModelProvider.select((s) => s.errorMessage), + ); + + return DraggableScrollableSheet( + initialChildSize: 0.25, + minChildSize: 0.15, + maxChildSize: 0.7, + builder: (context, scrollController) { + return Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical(top: Radius.circular(20)), + ), + child: ListView( + controller: scrollController, + padding: EdgeInsets.symmetric( + horizontal: SizeUtils.getByScreen(small: 22, big: 24), + vertical: SizeUtils.getByScreen(small: 12, big: 14), + ), + children: [ + Center( + child: Container( + width: 40, + height: 4, + decoration: BoxDecoration( + color: Colors.grey.shade300, + borderRadius: BorderRadius.circular(2), + ), + ), + ), + SizedBox(height: SizeUtils.getByScreen(small: 10, big: 12)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + _isEditing + ? context.translate(I18n.locationEditFrequentPlace) + : context.translate(I18n.locationNewFrequentPlace), + style: TextStyle( + fontSize: + SizeUtils.getByScreen(small: 18, big: 19), + fontWeight: FontWeight.w600, + color: primaryColor, + ), + ), + ), + TextButton( + onPressed: + _canSave && !isSubmitting ? _submit : null, + child: isSubmitting + ? SizedBox( + width: SizeUtils.getByScreen( + small: 20, big: 22), + height: SizeUtils.getByScreen( + small: 20, big: 22), + child: CircularProgressIndicator( + strokeWidth: 2, + color: primaryColor, + ), + ) + : Text( + _isEditing ? context.translate(I18n.locationSave) : context.translate(I18n.locationCreate), + style: TextStyle( + color: + _canSave ? primaryColor : Colors.grey, + fontWeight: FontWeight.w600, + fontSize: SizeUtils.getByScreen( + small: 16, big: 17), + ), + ), + ), + ], + ), + const SizedBox(height: 8), + Text( + context.translate(I18n.name), + style: TextStyle( + fontSize: SizeUtils.getByScreen(small: 15, big: 16), + fontWeight: FontWeight.w500, + ), + ), + const SizedBox(height: 8), + TextField( + controller: _nameController, + onChanged: (_) => setState(() {}), + decoration: locationInputDecoration( + hintText: context.translate(I18n.locationHintFrequentPlace), + primaryColor: primaryColor, + ), + ), + if (_isEditing) ...[ + SizedBox( + height: SizeUtils.getByScreen(small: 14, big: 16)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + context.translate(I18n.locationWifiNetworksOptional), + style: TextStyle( + fontSize: + SizeUtils.getByScreen(small: 15, big: 16), + fontWeight: FontWeight.w500, + ), + ), + GestureDetector( + onTap: _addWifi, + child: Icon(Icons.add_circle_outline, + color: primaryColor, size: 24), + ), + ], + ), + const SizedBox(height: 8), + ..._wifiList.asMap().entries.map((entry) { + final i = entry.key; + final wifi = entry.value; + return Padding( + padding: const EdgeInsets.only(bottom: 8), + child: Row( + children: [ + Expanded( + child: TextFormField( + initialValue: wifi.ssid, + onChanged: (v) => _updateWifi( + i, + wifi.copyWith(ssid: v), + ), + decoration: locationInputDecoration( + hintText: 'SSID', + primaryColor: primaryColor, + ), + style: const TextStyle(fontSize: 13), + ), + ), + const SizedBox(width: 8), + GestureDetector( + onTap: () => _removeWifi(i), + child: Icon(Icons.remove_circle_outline, + color: Colors.grey.shade500, size: 22), + ), + ], + ), + ); + }), + ], + if (errorMessage.isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 8), + child: Text( + errorMessage, + style: + const TextStyle(color: Colors.red, fontSize: 13), + ), + ), + SizedBox(height: SizeUtils.getByScreen(small: 8, big: 10)), + ], + ), + ); + }, + ); + } + +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/create_geofence_sheet.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/create_geofence_sheet.dart new file mode 100644 index 00000000..cec32ea7 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/create_geofence_sheet.dart @@ -0,0 +1,271 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:latlong2/latlong.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:sf_localizations/sf_localizations.dart'; +import 'package:utils/utils.dart'; + +import '../state/location_view_model.dart'; +import 'location_input_decoration.dart'; + +Future showCreateGeofenceSheet( + BuildContext context, { + required LatLng point, + required ValueNotifier previewRadius, +}) { + return showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => _GeofenceSheet( + point: point, + previewRadius: previewRadius, + ), + ); +} + +Future showEditGeofenceSheet( + BuildContext context, { + required GeofenceEntity geofence, + required ValueNotifier previewRadius, +}) { + previewRadius.value = geofence.radius; + return showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => _GeofenceSheet( + point: LatLng(geofence.latitude, geofence.longitude), + previewRadius: previewRadius, + editingGeofence: geofence, + ), + ); +} + +class _GeofenceSheet extends ConsumerStatefulWidget { + final LatLng point; + final ValueNotifier previewRadius; + final GeofenceEntity? editingGeofence; + + const _GeofenceSheet({ + required this.point, + required this.previewRadius, + this.editingGeofence, + }); + + @override + ConsumerState<_GeofenceSheet> createState() => _GeofenceSheetState(); +} + +class _GeofenceSheetState extends ConsumerState<_GeofenceSheet> { + final _nameController = TextEditingController(); + final _descriptionController = TextEditingController(); + late double _radius; + + bool get _isEditing => widget.editingGeofence != null; + + @override + void initState() { + super.initState(); + if (_isEditing) { + _nameController.text = widget.editingGeofence!.name; + _descriptionController.text = + widget.editingGeofence!.description ?? ''; + _radius = widget.editingGeofence!.radius; + } else { + _radius = 200; + } + } + + @override + void dispose() { + _nameController.dispose(); + _descriptionController.dispose(); + super.dispose(); + } + + bool get _canSave => _nameController.text.trim().isNotEmpty; + + void _onRadiusChanged(double value) { + setState(() => _radius = value); + widget.previewRadius.value = value; + } + + Future _submit() async { + if (!_canSave) return; + + final vm = ref.read(locationViewModelProvider.notifier); + final description = _descriptionController.text.trim(); + final bool success; + + if (_isEditing) { + success = await vm.updateGeofence( + id: widget.editingGeofence!.id, + name: _nameController.text.trim(), + description: description.isNotEmpty ? description : null, + latitude: widget.point.latitude, + longitude: widget.point.longitude, + radius: _radius, + ); + } else { + success = await vm.createGeofence( + name: _nameController.text.trim(), + description: description.isNotEmpty ? description : null, + latitude: widget.point.latitude, + longitude: widget.point.longitude, + radius: _radius, + ); + } + + if (success && mounted) { + Navigator.pop(context); + } + } + + @override + Widget build(BuildContext context) { + final theme = ref.watch(themePortProvider); + final primaryColor = theme.getColorFor(ThemeCode.legacyPrimary); + final isSubmitting = ref.watch( + locationViewModelProvider.select((s) => s.isSubmitting), + ); + final errorMessage = ref.watch( + locationViewModelProvider.select((s) => s.errorMessage), + ); + + return DraggableScrollableSheet( + initialChildSize: 0.35, + minChildSize: 0.15, + maxChildSize: 0.7, + builder: (context, scrollController) { + return Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical(top: Radius.circular(20)), + ), + child: ListView( + controller: scrollController, + padding: EdgeInsets.symmetric( + horizontal: SizeUtils.getByScreen(small: 22, big: 24), + vertical: SizeUtils.getByScreen(small: 12, big: 14), + ), + children: [ + Center( + child: Container( + width: 40, + height: 4, + decoration: BoxDecoration( + color: Colors.grey.shade300, + borderRadius: BorderRadius.circular(2), + ), + ), + ), + SizedBox(height: SizeUtils.getByScreen(small: 10, big: 12)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + _isEditing + ? context.translate(I18n.locationEditGeofence) + : context.translate(I18n.locationNewGeofence), + style: TextStyle( + fontSize: SizeUtils.getByScreen(small: 18, big: 19), + fontWeight: FontWeight.w600, + color: primaryColor, + ), + ), + TextButton( + onPressed: + _canSave && !isSubmitting ? _submit : null, + child: isSubmitting + ? SizedBox( + width: + SizeUtils.getByScreen(small: 20, big: 22), + height: + SizeUtils.getByScreen(small: 20, big: 22), + child: CircularProgressIndicator( + strokeWidth: 2, + color: primaryColor, + ), + ) + : Text( + _isEditing ? context.translate(I18n.locationSave) : context.translate(I18n.locationCreate), + style: TextStyle( + color: + _canSave ? primaryColor : Colors.grey, + fontWeight: FontWeight.w600, + fontSize: SizeUtils.getByScreen( + small: 16, big: 17), + ), + ), + ), + ], + ), + const SizedBox(height: 8), + Text( + '${context.translate(I18n.locationRadius)}: ${context.translate(I18n.locationRadiusMeters, args: {'radius': '${_radius.round()}'})}', + style: TextStyle( + fontSize: SizeUtils.getByScreen(small: 15, big: 16), + fontWeight: FontWeight.w500, + ), + ), + Slider( + value: _radius, + min: 50, + max: 2000, + divisions: 39, + activeColor: primaryColor, + label: '${_radius.round()} m', + onChanged: _onRadiusChanged, + ), + const SizedBox(height: 8), + Text( + context.translate(I18n.name), + style: TextStyle( + fontSize: SizeUtils.getByScreen(small: 15, big: 16), + fontWeight: FontWeight.w500, + ), + ), + const SizedBox(height: 8), + TextField( + controller: _nameController, + onChanged: (_) => setState(() {}), + decoration: locationInputDecoration( + hintText: context.translate(I18n.locationHintGeofence), + primaryColor: primaryColor, + ), + ), + SizedBox(height: SizeUtils.getByScreen(small: 14, big: 16)), + Text( + context.translate(I18n.locationHintDescription), + style: TextStyle( + fontSize: SizeUtils.getByScreen(small: 15, big: 16), + fontWeight: FontWeight.w500, + ), + ), + const SizedBox(height: 8), + TextField( + controller: _descriptionController, + decoration: locationInputDecoration( + hintText: context.translate(I18n.locationHintDescription), + primaryColor: primaryColor, + ), + ), + if (errorMessage.isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 8), + child: Text( + errorMessage, + style: const TextStyle(color: Colors.red, fontSize: 13), + ), + ), + SizedBox(height: SizeUtils.getByScreen(small: 8, big: 10)), + ], + ), + ); + }, + ); + } + +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/device_banner.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/device_banner.dart new file mode 100644 index 00000000..658a8cfc --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/device_banner.dart @@ -0,0 +1,265 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:utils/utils.dart'; + +class DeviceBanner extends ConsumerStatefulWidget { + final DeviceEntity device; + final PositionEntity? position; + final List devices; + final ValueChanged onDeviceChanged; + + const DeviceBanner({ + super.key, + required this.device, + required this.position, + required this.devices, + required this.onDeviceChanged, + }); + + @override + ConsumerState createState() => _DeviceBannerState(); +} + +class _DeviceBannerState extends ConsumerState { + late final PageController _pageController; + int _currentPage = 0; + + @override + void initState() { + super.initState(); + _currentPage = + widget.devices.indexWhere((d) => d.id == widget.device.id); + if (_currentPage < 0) _currentPage = 0; + _pageController = PageController(initialPage: _currentPage); + } + + @override + void didUpdateWidget(DeviceBanner oldWidget) { + super.didUpdateWidget(oldWidget); + final newIndex = + widget.devices.indexWhere((d) => d.id == widget.device.id); + if (newIndex >= 0 && newIndex != _currentPage) { + _currentPage = newIndex; + _pageController.animateToPage( + newIndex, + duration: const Duration(milliseconds: 300), + curve: Curves.easeInOut, + ); + } + } + + @override + void dispose() { + _pageController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final theme = ref.read(themePortProvider); + final primaryColor = theme.getColorFor(ThemeCode.legacyPrimary); + + return Container( + width: SizeUtils.getByScreen(small: 340, big: 338), + margin: EdgeInsets.only( + bottom: SizeUtils.getByScreen(small: 16, big: 14), + ), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.1), + blurRadius: 10, + offset: const Offset(0, 4), + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 72, + child: PageView.builder( + controller: _pageController, + itemCount: widget.devices.length, + onPageChanged: (index) { + setState(() => _currentPage = index); + widget.onDeviceChanged(widget.devices[index]); + }, + itemBuilder: (context, index) { + final dev = widget.devices[index]; + final isSelected = dev.id == widget.device.id; + final pos = isSelected ? widget.position : null; + return _DeviceCard( + device: dev, + position: pos, + primaryColor: primaryColor, + ); + }, + ), + ), + if (widget.devices.length > 1) + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: List.generate( + widget.devices.length, + (i) => AnimatedContainer( + duration: const Duration(milliseconds: 200), + width: i == _currentPage ? 18 : 6, + height: 6, + margin: const EdgeInsets.symmetric(horizontal: 3), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(3), + color: i == _currentPage + ? primaryColor + : Colors.grey.shade300, + ), + ), + ), + ), + ), + ], + ), + ); + } +} + +class _DeviceCard extends StatelessWidget { + final DeviceEntity device; + final PositionEntity? position; + final Color primaryColor; + + const _DeviceCard({ + required this.device, + required this.position, + required this.primaryColor, + }); + + @override + Widget build(BuildContext context) { + final name = device.carrierName; + final deviceName = + name != null && name.isNotEmpty ? name : device.identificator; + final initial = deviceName.isNotEmpty ? deviceName[0].toUpperCase() : '?'; + + final addressText = position != null + ? [ + position!.address?.street, + position!.address?.province, + ].whereType().where((s) => s.isNotEmpty).join(', ') + : ''; + + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10), + child: Row( + children: [ + Container( + width: 42, + height: 42, + decoration: BoxDecoration( + color: primaryColor.withValues(alpha: 0.12), + shape: BoxShape.circle, + ), + child: Center( + child: Text( + initial, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w700, + color: primaryColor, + ), + ), + ), + ), + const SizedBox(width: 10), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + deviceName, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.grey.shade800, + ), + overflow: TextOverflow.ellipsis, + ), + if (addressText.isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 2), + child: Row( + children: [ + Icon(Icons.location_on, + size: 12, color: Colors.grey.shade400), + const SizedBox(width: 3), + Expanded( + child: Text( + addressText, + style: TextStyle( + fontSize: 11, + color: Colors.grey.shade500, + ), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ), + ], + ), + ), + if (position != null || device.battery != null) + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + if (device.battery != null) + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + toBatteryIcon(device.battery!), + size: 16, + color: device.battery! > 20 + ? primaryColor + : Colors.orange, + ), + const SizedBox(width: 3), + Text( + '${device.battery}%', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: device.battery! > 20 + ? primaryColor + : Colors.orange, + ), + ), + ], + ), + if (position != null) + Padding( + padding: const EdgeInsets.only(top: 3), + child: Text( + formatPositionDate(position!.positionDate), + style: TextStyle( + fontSize: 10, + color: Colors.grey.shade400, + ), + ), + ), + ], + ), + ], + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/location_input_decoration.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/location_input_decoration.dart new file mode 100644 index 00000000..68029d0e --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/location_input_decoration.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; + +InputDecoration locationInputDecoration({ + required String hintText, + required Color primaryColor, +}) { + return InputDecoration( + hintText: hintText, + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + borderSide: BorderSide(color: Colors.grey.shade300), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + borderSide: BorderSide(color: Colors.grey.shade300), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + borderSide: BorderSide(color: primaryColor, width: 2), + ), + contentPadding: EdgeInsets.symmetric(horizontal: 14, vertical: 14), + ); +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/location_map.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/location_map.dart new file mode 100644 index 00000000..4006ae19 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/location_map.dart @@ -0,0 +1,546 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:latlong2/latlong.dart'; +import 'package:legacy_shared/legacy_shared.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; +import 'package:location/src/features/location/presentation/state/location_map_view_model.dart'; +import 'package:location/src/features/location/presentation/state/location_map_view_state.dart'; +import 'package:location/src/features/location/presentation/state/location_view_model.dart'; +import 'package:sf_localizations/sf_localizations.dart'; +import 'package:sf_shared/sf_shared.dart'; +import 'package:utils/utils.dart'; + +import 'device_banner.dart'; +import 'name_input_sheet.dart'; +import 'map_controls/layer_toggles.dart'; +import 'map_controls/map_action_button.dart'; +import 'map_controls/map_style_selector.dart'; +import 'map_controls/placement_banner.dart'; +import 'map_controls/radius_slider_bar.dart'; +import 'map_info_cards/frequent_place_info_card.dart'; +import 'map_info_cards/geofence_info_card.dart'; +import 'map_info_cards/history_position_info_card.dart'; +import 'modal_overlay.dart'; + +const _defaultCenter = LatLng(40.4168, -3.7038); +const _defaultZoom = 15.0; + +class LocationMap extends ConsumerStatefulWidget { + final PositionEntity? selectedPosition; + final DeviceEntity? selectedDevice; + final List devices; + final List geofences; + final List frequentPlaces; + final List positionHistory; + final bool showRouteTrail; + final bool isLoadingHistory; + final ValueChanged onDeviceChanged; + final VoidCallback onRefreshPosition; + + const LocationMap({ + super.key, + required this.selectedPosition, + required this.selectedDevice, + required this.devices, + required this.geofences, + required this.frequentPlaces, + required this.positionHistory, + required this.showRouteTrail, + required this.isLoadingHistory, + required this.onDeviceChanged, + required this.onRefreshPosition, + }); + + @override + ConsumerState createState() => _LocationMapState(); +} + +class _LocationMapState extends ConsumerState { + late final MapController _mapController; + + LocationMapViewModel get _vm => + ref.read(locationMapViewModelProvider.notifier); + + @override + void initState() { + super.initState(); + _mapController = MapController(); + } + + @override + void dispose() { + _mapController.dispose(); + super.dispose(); + } + + @override + void didUpdateWidget(LocationMap oldWidget) { + super.didUpdateWidget(oldWidget); + if (widget.selectedPosition != null && + widget.selectedPosition != oldWidget.selectedPosition) { + _centerOnDevice(); + } + } + + void _centerOnDevice() { + if (widget.selectedPosition == null) return; + _mapController.move( + LatLng( + widget.selectedPosition!.latitude, + widget.selectedPosition!.longitude, + ), + _defaultZoom, + ); + } + + void _confirmPlacement() { + final center = _mapController.camera.center; + final mapState = ref.read(locationMapViewModelProvider); + + if (mapState.placingMode == PlacingMode.geofence) { + _vm.confirmGeofencePlacement(center); + } else { + _vm.confirmFrequentPlacePlacement(); + showNameInputSheet( + context, + ref: ref, + title: context.translate(I18n.locationNewFrequentPlace), + hintText: context.translate(I18n.locationHintFrequentPlace), + onSubmit: (name, _) => ref + .read(locationViewModelProvider.notifier) + .createFrequentPlace( + name: name, lat: center.latitude, lng: center.longitude), + ); + } + } + + void _confirmRadius() { + final mapState = ref.read(locationMapViewModelProvider); + final point = mapState.previewPoint!; + final radius = mapState.previewRadius; + final editing = mapState.editingGeofence; + _vm.confirmRadius(); + + showNameInputSheet( + context, + ref: ref, + title: editing != null + ? context.translate(I18n.locationEditGeofence) + : context.translate(I18n.locationNewGeofence), + hintText: context.translate(I18n.locationHintGeofence), + initialName: editing?.name, + initialDescription: editing?.description, + showDescription: true, + submitLabel: editing != null + ? context.translate(I18n.locationSave) + : context.translate(I18n.locationCreate), + onSubmit: (name, description) { + if (editing != null) { + return ref.read(locationViewModelProvider.notifier).updateGeofence( + id: editing.id, + name: name, + description: description, + latitude: point.latitude, + longitude: point.longitude, + radius: radius, + ); + } + return ref.read(locationViewModelProvider.notifier).createGeofence( + name: name, + description: description, + latitude: point.latitude, + longitude: point.longitude, + radius: radius, + ); + }, + ).then((_) => _vm.clearPreviewPoint()); + } + + void _handleHistoryTap() { + if (widget.positionHistory.isEmpty) { + _openDateRangePicker(); + } else { + ref.read(locationViewModelProvider.notifier).toggleRouteTrail(); + } + } + + Future _openDateRangePicker() async { + final primaryColor = + ref.read(themePortProvider).getColorFor(ThemeCode.legacyPrimary); + final now = DateTime.now(); + + final picked = await showDateRangePicker( + context: context, + firstDate: now.subtract(const Duration(days: 365)), + lastDate: now, + initialDateRange: DateTimeRange( + start: now.subtract(const Duration(days: 1)), + end: now, + ), + builder: (context, child) => Theme( + data: Theme.of(context).copyWith( + colorScheme: ColorScheme.light(primary: primaryColor), + ), + child: child!, + ), + ); + + if (picked != null) { + final to = DateTime( + picked.end.year, picked.end.month, picked.end.day, 23, 59, 59); + ref + .read(locationViewModelProvider.notifier) + .loadPositionHistory(from: picked.start, to: to); + } + } + + void _onEditFrequentPlace(FrequentPlaceEntity fp) { + _vm.clearSelectedFrequentPlace(); + showNameInputSheet( + context, + ref: ref, + title: context.translate(I18n.locationEditFrequentPlace), + hintText: context.translate(I18n.locationHintFrequentPlace), + initialName: fp.name, + submitLabel: context.translate(I18n.locationSave), + onSubmit: (name, _) => ref + .read(locationViewModelProvider.notifier) + .updateFrequentPlace( + id: fp.id, name: name, lat: fp.lat, lng: fp.lng, wifiList: fp.wifiList), + ); + } + + Marker _buildHistoryMarker({ + required PositionEntity position, + required IconData icon, + required Color color, + }) { + return Marker( + point: LatLng(position.latitude, position.longitude), + width: 24, + height: 24, + child: GestureDetector( + onTap: () => _vm.selectHistoryPosition(position), + child: Container( + decoration: BoxDecoration( + color: color, + shape: BoxShape.circle, + border: Border.all(color: Colors.white, width: 2), + ), + child: Icon(icon, color: Colors.white, size: 14), + ), + ), + rotate: true, + ); + } + + List _buildMapLayers(LocationMapViewState mapState, Color primaryColor) { + return [ + TileLayer( + urlTemplate: ref.watch(mapStyleProvider).urlTemplate, + userAgentPackageName: 'com.savefamily.sf_platform', + ), + if (mapState.showGeofences) + CircleLayer( + circles: widget.geofences + .where((g) => g.isActive) + .map((g) => CircleMarker( + point: LatLng(g.latitude, g.longitude), + radius: g.radius, + useRadiusInMeter: true, + color: Colors.blue.withValues(alpha: 0.15), + borderColor: Colors.blue.withValues(alpha: 0.7), + borderStrokeWidth: 2, + )) + .toList(), + ), + if (widget.showRouteTrail && widget.positionHistory.isNotEmpty) + PolylineLayer( + polylines: [ + Polyline( + points: widget.positionHistory + .map((p) => LatLng(p.latitude, p.longitude)) + .toList(), + color: Colors.purple, + strokeWidth: 3.0, + ), + ], + ), + if (mapState.previewPoint != null) + CircleLayer( + circles: [ + CircleMarker( + point: mapState.previewPoint!, + radius: mapState.previewRadius, + useRadiusInMeter: true, + color: primaryColor.withValues(alpha: 0.2), + borderColor: primaryColor.withValues(alpha: 0.8), + borderStrokeWidth: 2, + ), + ], + ), + MarkerLayer(markers: _buildMarkers(mapState, primaryColor)), + if (widget.selectedDevice != null) + Align( + alignment: Alignment.bottomCenter, + child: DeviceBanner( + device: widget.selectedDevice!, + position: widget.selectedPosition, + devices: widget.devices, + onDeviceChanged: widget.onDeviceChanged, + ), + ), + ]; + } + + List _buildMarkers(LocationMapViewState mapState, Color primaryColor) { + return [ + if (mapState.previewPoint != null) + Marker( + point: mapState.previewPoint!, + width: 40, + height: 40, + child: Icon(Icons.add_location_alt, color: primaryColor, size: 36), + rotate: true, + ), + if (widget.showRouteTrail && widget.positionHistory.length == 1) + _buildHistoryMarker( + position: widget.positionHistory.first, + icon: Icons.location_on, + color: Colors.purple, + ), + if (widget.showRouteTrail && widget.positionHistory.length >= 2) ...[ + _buildHistoryMarker( + position: widget.positionHistory.first, + icon: Icons.play_arrow, + color: Colors.purple, + ), + _buildHistoryMarker( + position: widget.positionHistory.last, + icon: Icons.stop, + color: Colors.purple.shade800, + ), + ], + if (widget.selectedPosition != null) + Marker( + point: LatLng( + widget.selectedPosition!.latitude, + widget.selectedPosition!.longitude, + ), + width: 100, + height: 100, + child: PulsingLocationMarker(color: primaryColor), + rotate: true, + ), + if (mapState.showFrequentPlaces) + ...widget.frequentPlaces.map( + (fp) => Marker( + point: LatLng(fp.lat, fp.lng), + width: 40, + height: 40, + child: GestureDetector( + onLongPress: () => _vm.selectFrequentPlace(fp), + child: Container( + decoration: BoxDecoration( + color: Colors.orange.withValues(alpha: 0.3), + shape: BoxShape.circle, + border: Border.all( + color: Colors.orange.withValues(alpha: 0.7), width: 2), + ), + child: const Icon(Icons.home_rounded, + color: Colors.orange, size: 20), + ), + ), + rotate: true, + ), + ), + if (mapState.showGeofences) + ...widget.geofences.where((g) => g.isActive).map( + (g) => Marker( + point: LatLng(g.latitude, g.longitude), + width: 36, + height: 36, + child: GestureDetector( + onLongPress: () => _vm.selectGeofence(g), + child: Container( + decoration: BoxDecoration( + color: Colors.blue.withValues(alpha: 0.3), + shape: BoxShape.circle, + border: Border.all( + color: Colors.blue.withValues(alpha: 0.7), width: 2), + ), + child: const Icon(Icons.shield, color: Colors.blue, size: 18), + ), + ), + rotate: true, + ), + ), + ]; + } + + List _buildControls( + LocationMapViewState mapState, Color primaryColor) { + if (mapState.placingMode != PlacingMode.none) { + return [ + Center( + child: Icon(Icons.add_circle_outline, size: 48, color: primaryColor), + ), + Positioned( + top: 12, + left: 12, + right: 12, + child: PlacementBanner( + onCancel: _vm.cancelPlacing, + onConfirm: _confirmPlacement, + ), + ), + ]; + } + + if (mapState.adjustingRadius) { + return [ + Positioned( + bottom: SizeUtils.getByScreen(small: 100, big: 94), + left: 12, + right: 12, + child: RadiusSliderBar( + radius: mapState.previewRadius, + primaryColor: primaryColor, + onChanged: _vm.updatePreviewRadius, + onCancel: _vm.cancelPlacing, + onConfirm: _confirmRadius, + ), + ), + ]; + } + + return [ + Positioned( + top: 12, + left: 12, + child: const MapStyleSelector(), + ), + Positioned( + top: 12, + right: 12, + child: LayerToggles( + showGeofences: mapState.showGeofences, + showFrequentPlaces: mapState.showFrequentPlaces, + showRouteTrail: widget.showRouteTrail, + hasPositionHistory: widget.positionHistory.isNotEmpty, + isLoadingHistory: widget.isLoadingHistory, + onGeofencesToggled: _vm.toggleGeofences, + onFrequentPlacesToggled: _vm.toggleFrequentPlaces, + onHistoryTapped: _handleHistoryTap, + onHistoryLongPressed: _openDateRangePicker, + ), + ), + Positioned( + bottom: SizeUtils.getByScreen(small: 120, big: 110), + right: 12, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + MapActionButton( + icon: Icons.add_location_alt, + onTap: () => _vm.startPlacing(PlacingMode.geofence), + ), + const SizedBox(height: 8), + MapActionButton( + icon: Icons.add_home, + onTap: () => _vm.startPlacing(PlacingMode.frequentPlace), + ), + const SizedBox(height: 8), + MapActionButton( + icon: Icons.refresh, + onTap: widget.onRefreshPosition, + ), + if (widget.selectedPosition != null) ...[ + const SizedBox(height: 8), + MapActionButton( + icon: Icons.my_location, + onTap: _centerOnDevice, + ), + ], + ], + ), + ), + ]; + } + + List _buildInfoCards(LocationMapViewState mapState) { + return [ + if (mapState.selectedGeofence != null) + ModalOverlay( + onDismiss: _vm.clearSelectedGeofence, + child: GeofenceInfoCard( + geofence: mapState.selectedGeofence!, + onClose: _vm.clearSelectedGeofence, + onEdit: () => + _vm.startEditingGeofence(mapState.selectedGeofence!), + onDelete: () { + final id = mapState.selectedGeofence!.id; + _vm.clearSelectedGeofence(); + ref.read(locationViewModelProvider.notifier).deleteGeofence(id: id); + }, + ), + ), + if (mapState.selectedFrequentPlace != null) + ModalOverlay( + onDismiss: _vm.clearSelectedFrequentPlace, + child: FrequentPlaceInfoCard( + frequentPlace: mapState.selectedFrequentPlace!, + onClose: _vm.clearSelectedFrequentPlace, + onEdit: () => _onEditFrequentPlace(mapState.selectedFrequentPlace!), + onDelete: () { + final id = mapState.selectedFrequentPlace!.id; + _vm.clearSelectedFrequentPlace(); + ref.read(locationViewModelProvider.notifier).deleteFrequentPlace(id: id); + }, + ), + ), + if (mapState.selectedHistoryPosition != null) + ModalOverlay( + onDismiss: _vm.clearSelectedHistoryPosition, + child: HistoryPositionInfoCard( + position: mapState.selectedHistoryPosition!, + onClose: _vm.clearSelectedHistoryPosition, + ), + ), + ]; + } + + @override + Widget build(BuildContext context) { + final mapState = ref.watch(locationMapViewModelProvider); + final primaryColor = + ref.read(themePortProvider).getColorFor(ThemeCode.legacyPrimary); + final initialCenter = widget.selectedPosition != null + ? LatLng( + widget.selectedPosition!.latitude, + widget.selectedPosition!.longitude, + ) + : _defaultCenter; + + return Stack( + children: [ + FlutterMap( + mapController: _mapController, + options: MapOptions( + initialCenter: initialCenter, + initialZoom: _defaultZoom, + minZoom: 11, + keepAlive: true, + ), + children: _buildMapLayers(mapState, primaryColor), + ), + ..._buildControls(mapState, primaryColor), + ..._buildInfoCards(mapState), + ], + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/layer_toggles.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/layer_toggles.dart new file mode 100644 index 00000000..5b60107f --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/layer_toggles.dart @@ -0,0 +1,126 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +class LayerToggles extends ConsumerWidget { + final bool showGeofences; + final bool showFrequentPlaces; + final bool showRouteTrail; + final bool hasPositionHistory; + final bool isLoadingHistory; + final VoidCallback onGeofencesToggled; + final VoidCallback onFrequentPlacesToggled; + final VoidCallback onHistoryTapped; + final VoidCallback onHistoryLongPressed; + + const LayerToggles({ + super.key, + required this.showGeofences, + required this.showFrequentPlaces, + required this.showRouteTrail, + required this.hasPositionHistory, + required this.isLoadingHistory, + required this.onGeofencesToggled, + required this.onFrequentPlacesToggled, + required this.onHistoryTapped, + required this.onHistoryLongPressed, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + _LayerChip( + icon: Icons.circle_outlined, + label: context.translate(I18n.locationLayerGeofences), + color: Colors.blue, + isActive: showGeofences, + onTap: onGeofencesToggled, + ), + const SizedBox(height: 6), + _LayerChip( + icon: Icons.home_rounded, + label: context.translate(I18n.locationLayerFrequentPlaces), + color: Colors.orange, + isActive: showFrequentPlaces, + onTap: onFrequentPlacesToggled, + ), + const SizedBox(height: 6), + _LayerChip( + icon: isLoadingHistory ? Icons.hourglass_top : Icons.route, + label: context.translate(I18n.locationLayerHistory), + color: Colors.purple, + isActive: showRouteTrail && hasPositionHistory, + onTap: onHistoryTapped, + onLongPress: hasPositionHistory ? onHistoryLongPressed : null, + ), + ], + ); + } +} + +class _LayerChip extends StatelessWidget { + final IconData icon; + final String label; + final Color color; + final bool isActive; + final VoidCallback onTap; + final VoidCallback? onLongPress; + + const _LayerChip({ + required this.icon, + required this.label, + required this.color, + required this.isActive, + required this.onTap, + this.onLongPress, + }); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: onTap, + onLongPress: onLongPress, + child: AnimatedContainer( + duration: const Duration(milliseconds: 200), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), + decoration: BoxDecoration( + color: isActive ? color : Colors.white, + borderRadius: BorderRadius.circular(20), + border: Border.all( + color: isActive ? color : Colors.grey.shade400, + width: 1.5, + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.12), + blurRadius: 4, + offset: const Offset(0, 2), + ), + ], + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + icon, + size: 16, + color: isActive ? Colors.white : Colors.grey.shade600, + ), + const SizedBox(width: 5), + Text( + label, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: isActive ? Colors.white : Colors.grey.shade600, + ), + ), + ], + ), + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/map_action_button.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/map_action_button.dart new file mode 100644 index 00000000..405c0a4d --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/map_action_button.dart @@ -0,0 +1,38 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class MapActionButton extends ConsumerWidget { + final IconData icon; + final VoidCallback onTap; + + const MapActionButton({ + super.key, + required this.icon, + required this.onTap, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final theme = ref.read(themePortProvider); + + return Material( + color: theme.getColorFor(ThemeCode.backgroundPrimary), + borderRadius: BorderRadius.circular(8), + elevation: 2, + child: InkWell( + onTap: onTap, + borderRadius: BorderRadius.circular(8), + child: SizedBox( + width: 40, + height: 40, + child: Icon( + icon, + size: 24, + color: theme.getColorFor(ThemeCode.legacyPrimary), + ), + ), + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/map_style_selector.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/map_style_selector.dart new file mode 100644 index 00000000..21c5c12a --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/map_style_selector.dart @@ -0,0 +1,100 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:legacy_shared/legacy_shared.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +const _labelKeys = { + MapStyle.standard: I18n.locationMapStyleStandard, + MapStyle.voyager: I18n.locationMapStyleVoyager, + MapStyle.light: I18n.locationMapStyleLight, + MapStyle.dark: I18n.locationMapStyleDark, + MapStyle.satellite: I18n.locationMapStyleSatellite, +}; + +class MapStyleSelector extends ConsumerStatefulWidget { + const MapStyleSelector({super.key}); + + @override + ConsumerState createState() => _MapStyleSelectorState(); +} + +class _MapStyleSelectorState extends ConsumerState { + bool _expanded = false; + + @override + Widget build(BuildContext context) { + final currentStyle = ref.watch(mapStyleProvider); + final theme = ref.read(themePortProvider); + final primaryColor = theme.getColorFor(ThemeCode.legacyPrimary); + + if (!_expanded) { + return Material( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + elevation: 2, + child: InkWell( + onTap: () => setState(() => _expanded = true), + borderRadius: BorderRadius.circular(8), + child: const SizedBox( + width: 40, + height: 40, + child: Icon(Icons.layers, size: 22, color: Colors.grey), + ), + ), + ); + } + + return Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.15), + blurRadius: 6, + offset: const Offset(0, 2), + ), + ], + ), + padding: const EdgeInsets.symmetric(vertical: 6), + child: Column( + mainAxisSize: MainAxisSize.min, + children: MapStyle.values.map((style) { + final isSelected = style == currentStyle; + return InkWell( + onTap: () { + ref.read(mapStyleProvider.notifier).setStyle(style); + setState(() => _expanded = false); + }, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + style == MapStyle.satellite + ? Icons.satellite_alt + : Icons.map, + size: 16, + color: isSelected ? primaryColor : Colors.grey.shade600, + ), + const SizedBox(width: 8), + Text( + context.translate(_labelKeys[style]!), + style: TextStyle( + fontSize: 13, + fontWeight: + isSelected ? FontWeight.w600 : FontWeight.w400, + color: isSelected ? primaryColor : Colors.grey.shade700, + ), + ), + ], + ), + ), + ); + }).toList(), + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/placement_banner.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/placement_banner.dart new file mode 100644 index 00000000..2d31d9ad --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/placement_banner.dart @@ -0,0 +1,78 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +class PlacementBanner extends ConsumerWidget { + final VoidCallback onCancel; + final VoidCallback onConfirm; + + const PlacementBanner({ + super.key, + required this.onCancel, + required this.onConfirm, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final primaryColor = ref.read(themePortProvider).getColorFor(ThemeCode.legacyPrimary); + return Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.15), + blurRadius: 6, + offset: const Offset(0, 2), + ), + ], + ), + child: Row( + children: [ + GestureDetector( + onTap: onCancel, + child: Container( + padding: const EdgeInsets.all(6), + decoration: BoxDecoration( + color: Colors.grey.shade200, + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 20, color: Colors.grey.shade700), + ), + ), + const SizedBox(width: 12), + Expanded( + child: Text( + context.translate(I18n.locationPlacementHint), + style: const TextStyle( + fontSize: 13, + fontWeight: FontWeight.w500, + ), + ), + ), + const SizedBox(width: 12), + GestureDetector( + onTap: onConfirm, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), + decoration: BoxDecoration( + color: primaryColor, + borderRadius: BorderRadius.circular(20), + ), + child: Text( + context.translate(I18n.locationConfirm), + style: const TextStyle( + color: Colors.white, + fontSize: 13, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/radius_slider_bar.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/radius_slider_bar.dart new file mode 100644 index 00000000..2723f7e3 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_controls/radius_slider_bar.dart @@ -0,0 +1,95 @@ +import 'package:flutter/material.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +class RadiusSliderBar extends StatelessWidget { + final double radius; + final Color primaryColor; + final ValueChanged onChanged; + final VoidCallback onCancel; + final VoidCallback onConfirm; + + const RadiusSliderBar({ + super.key, + required this.radius, + required this.primaryColor, + required this.onChanged, + required this.onCancel, + required this.onConfirm, + }); + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.15), + blurRadius: 6, + offset: const Offset(0, 2), + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + GestureDetector( + onTap: onCancel, + child: Container( + padding: const EdgeInsets.all(4), + decoration: BoxDecoration( + color: Colors.grey.shade200, + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 18, color: Colors.grey.shade700), + ), + ), + const SizedBox(width: 8), + Expanded( + child: Text( + '${context.translate(I18n.locationRadius)}: ${context.translate(I18n.locationRadiusMeters, args: {'radius': '${radius.round()}'})}', + style: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + ), + ), + ), + GestureDetector( + onTap: onConfirm, + child: Container( + padding: + const EdgeInsets.symmetric(horizontal: 14, vertical: 6), + decoration: BoxDecoration( + color: primaryColor, + borderRadius: BorderRadius.circular(20), + ), + child: Text( + context.translate(I18n.locationConfirm), + style: const TextStyle( + color: Colors.white, + fontSize: 13, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ], + ), + Slider( + value: radius, + min: 50, + max: 2000, + divisions: 39, + activeColor: primaryColor, + label: '${radius.round()} m', + onChanged: onChanged, + ), + ], + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/frequent_place_info_card.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/frequent_place_info_card.dart new file mode 100644 index 00000000..1264a7f6 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/frequent_place_info_card.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; +import 'package:location/src/core/domain/entities/frequent_place_entity.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +import 'map_info_card.dart'; + +class FrequentPlaceInfoCard extends StatelessWidget { + final FrequentPlaceEntity frequentPlace; + final VoidCallback onClose; + final VoidCallback onEdit; + final VoidCallback onDelete; + + const FrequentPlaceInfoCard({ + super.key, + required this.frequentPlace, + required this.onClose, + required this.onEdit, + required this.onDelete, + }); + + @override + Widget build(BuildContext context) { + return MapItemInfoCard( + icon: Icons.home_rounded, + iconColor: Colors.orange, + title: frequentPlace.name, + onClose: onClose, + onEdit: onEdit, + onDelete: onDelete, + content: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + infoRow(Icons.location_on_outlined, context.translate(I18n.locationCoordinates), + '${frequentPlace.lat.toStringAsFixed(4)}, ${frequentPlace.lng.toStringAsFixed(4)}'), + ], + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/geofence_info_card.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/geofence_info_card.dart new file mode 100644 index 00000000..0c8e2d7f --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/geofence_info_card.dart @@ -0,0 +1,63 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:location/src/core/domain/entities/geofence_entity.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +import 'map_info_card.dart'; + +class GeofenceInfoCard extends ConsumerWidget { + final GeofenceEntity geofence; + final VoidCallback onClose; + final VoidCallback onEdit; + final VoidCallback onDelete; + + const GeofenceInfoCard({ + super.key, + required this.geofence, + required this.onClose, + required this.onEdit, + required this.onDelete, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final primaryColor = + ref.read(themePortProvider).getColorFor(ThemeCode.legacyPrimary); + return MapItemInfoCard( + icon: Icons.shield, + iconColor: Colors.blue, + title: geofence.name, + onClose: onClose, + onEdit: onEdit, + onDelete: onDelete, + content: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (geofence.description != null && + geofence.description!.isNotEmpty) ...[ + Text( + geofence.description!, + style: TextStyle(fontSize: 13, color: Colors.grey.shade600), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + const SizedBox(height: 8), + ], + infoRow(Icons.radio_button_checked, context.translate(I18n.locationRadius), + context.translate(I18n.locationRadiusMeters, args: {'radius': '${geofence.radius.round()}'})), + const SizedBox(height: 6), + infoRow(Icons.location_on_outlined, context.translate(I18n.locationCoordinates), + '${geofence.latitude.toStringAsFixed(4)}, ${geofence.longitude.toStringAsFixed(4)}'), + const SizedBox(height: 6), + infoRow( + geofence.isActive ? Icons.check_circle : Icons.cancel, + context.translate(I18n.locationStatus), + geofence.isActive ? context.translate(I18n.locationStatusActive) : context.translate(I18n.locationStatusInactive), + iconColor: geofence.isActive ? primaryColor : Colors.grey, + ), + ], + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/history_position_info_card.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/history_position_info_card.dart new file mode 100644 index 00000000..e75e8531 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/history_position_info_card.dart @@ -0,0 +1,60 @@ +import 'package:control_panel/control_panel.dart'; +import 'package:flutter/material.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +import 'map_info_card.dart'; + +class HistoryPositionInfoCard extends StatelessWidget { + final PositionEntity position; + final VoidCallback onClose; + + const HistoryPositionInfoCard({ + super.key, + required this.position, + required this.onClose, + }); + + @override + Widget build(BuildContext context) { + final date = DateTime.fromMillisecondsSinceEpoch(position.positionDate); + final dateStr = + '${date.day.toString().padLeft(2, '0')}/${date.month.toString().padLeft(2, '0')}/${date.year} ' + '${date.hour.toString().padLeft(2, '0')}:${date.minute.toString().padLeft(2, '0')}'; + + final addressParts = [ + position.address?.street, + position.address?.city, + position.address?.province, + ].whereType().where((s) => s.isNotEmpty).toList(); + + return ReadOnlyInfoCard( + icon: Icons.route, + iconColor: Colors.purple, + title: context.translate(I18n.locationHistoryPosition), + onClose: onClose, + content: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + infoRow(Icons.access_time, context.translate(I18n.locationDate), dateStr), + const SizedBox(height: 6), + infoRow(Icons.satellite_alt, context.translate(I18n.locationType), position.type), + const SizedBox(height: 6), + infoRow( + Icons.location_on_outlined, + context.translate(I18n.locationCoordinates), + '${position.latitude.toStringAsFixed(4)}, ${position.longitude.toStringAsFixed(4)}', + ), + if (addressParts.isNotEmpty) ...[ + const SizedBox(height: 6), + infoRow(Icons.place, context.translate(I18n.locationAddress), addressParts.join(', ')), + ], + if (position.frequentPlaceName != null) ...[ + const SizedBox(height: 6), + infoRow(Icons.home_rounded, context.translate(I18n.locationPlace), position.frequentPlaceName!, + iconColor: Colors.orange), + ], + ], + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/map_info_card.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/map_info_card.dart new file mode 100644 index 00000000..e88c1e56 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/map_info_cards/map_info_card.dart @@ -0,0 +1,230 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:sf_localizations/sf_localizations.dart'; + +Widget infoRow(IconData icon, String label, String value, + {Color? iconColor}) { + return Row( + children: [ + Icon(icon, size: 16, color: iconColor ?? Colors.grey.shade500), + const SizedBox(width: 6), + Text( + '$label: ', + style: TextStyle(fontSize: 12, color: Colors.grey.shade500), + ), + Expanded( + child: Text( + value, + style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ); +} + +class MapItemInfoCard extends ConsumerWidget { + final IconData icon; + final Color iconColor; + final String title; + final VoidCallback onClose; + final VoidCallback onEdit; + final VoidCallback onDelete; + final Widget content; + + const MapItemInfoCard({ + super.key, + required this.icon, + required this.iconColor, + required this.title, + required this.onClose, + required this.onEdit, + required this.onDelete, + required this.content, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final primaryColor = + ref.read(themePortProvider).getColorFor(ThemeCode.legacyPrimary); + return GestureDetector( + onTap: () {}, + child: Container( + width: 280, + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.2), + blurRadius: 12, + offset: const Offset(0, 4), + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + padding: const EdgeInsets.all(6), + decoration: BoxDecoration( + color: iconColor.withValues(alpha: 0.15), + shape: BoxShape.circle, + ), + child: Icon(icon, color: iconColor, size: 20), + ), + const SizedBox(width: 10), + Expanded( + child: Text( + title, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + ), + overflow: TextOverflow.ellipsis, + ), + ), + GestureDetector( + onTap: onClose, + child: Icon(Icons.close, + size: 20, color: Colors.grey.shade500), + ), + ], + ), + const SizedBox(height: 12), + content, + const SizedBox(height: 14), + Row( + children: [ + Expanded( + child: GestureDetector( + onTap: onEdit, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 10), + decoration: BoxDecoration( + color: primaryColor, + borderRadius: BorderRadius.circular(10), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.edit, size: 16, color: Colors.white), + const SizedBox(width: 6), + Text( + context.translate(I18n.locationEdit), + style: const TextStyle( + color: Colors.white, + fontSize: 14, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + const SizedBox(width: 10), + GestureDetector( + onTap: onDelete, + child: Container( + padding: const EdgeInsets.symmetric( + vertical: 10, horizontal: 14), + decoration: BoxDecoration( + color: Colors.grey.shade100, + borderRadius: BorderRadius.circular(10), + border: Border.all(color: Colors.grey.shade400), + ), + child: Icon( + Icons.delete_outline, + size: 18, + color: Colors.grey.shade600, + ), + ), + ), + ], + ), + ], + ), + ), + ); + } +} + +class ReadOnlyInfoCard extends StatelessWidget { + final IconData icon; + final Color iconColor; + final String title; + final VoidCallback onClose; + final Widget content; + + const ReadOnlyInfoCard({ + super.key, + required this.icon, + required this.iconColor, + required this.title, + required this.onClose, + required this.content, + }); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () {}, + child: Container( + width: 280, + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.2), + blurRadius: 12, + offset: const Offset(0, 4), + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + padding: const EdgeInsets.all(6), + decoration: BoxDecoration( + color: iconColor.withValues(alpha: 0.15), + shape: BoxShape.circle, + ), + child: Icon(icon, color: iconColor, size: 20), + ), + const SizedBox(width: 10), + Expanded( + child: Text( + title, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + ), + overflow: TextOverflow.ellipsis, + ), + ), + GestureDetector( + onTap: onClose, + child: Icon(Icons.close, size: 20, color: Colors.grey.shade500), + ), + ], + ), + const SizedBox(height: 12), + content, + ], + ), + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/modal_overlay.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/modal_overlay.dart new file mode 100644 index 00000000..ac72a36d --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/modal_overlay.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; + +class ModalOverlay extends StatelessWidget { + final VoidCallback onDismiss; + final Widget child; + + const ModalOverlay({ + super.key, + required this.onDismiss, + required this.child, + }); + + @override + Widget build(BuildContext context) { + return Positioned.fill( + child: GestureDetector( + onTap: onDismiss, + child: ColoredBox( + color: Colors.black.withValues(alpha: 0.3), + child: Center(child: child), + ), + ), + ); + } +} diff --git a/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/name_input_sheet.dart b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/name_input_sheet.dart new file mode 100644 index 00000000..961a4a07 --- /dev/null +++ b/modules/legacy/modules/location/lib/src/features/location/presentation/widgets/name_input_sheet.dart @@ -0,0 +1,189 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:sf_localizations/sf_localizations.dart'; +import 'package:utils/utils.dart'; + +import 'location_input_decoration.dart'; + +Future showNameInputSheet( + BuildContext context, { + required WidgetRef ref, + required String title, + required String hintText, + bool showDescription = false, + String? initialName, + String? initialDescription, + String? submitLabel, + required Future Function(String name, String? description) onSubmit, +}) { + final primaryColor = + ref.read(themePortProvider).getColorFor(ThemeCode.legacyPrimary); + final resolvedSubmitLabel = + submitLabel ?? context.translate(I18n.locationCreate); + + return showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => _NameInputSheetContent( + title: title, + hintText: hintText, + showDescription: showDescription, + initialName: initialName, + initialDescription: initialDescription, + submitLabel: resolvedSubmitLabel, + primaryColor: primaryColor, + onSubmit: onSubmit, + ), + ); +} + +class _NameInputSheetContent extends StatefulWidget { + final String title; + final String hintText; + final bool showDescription; + final String? initialName; + final String? initialDescription; + final String submitLabel; + final Color primaryColor; + final Future Function(String name, String? description) onSubmit; + + const _NameInputSheetContent({ + required this.title, + required this.hintText, + required this.showDescription, + required this.initialName, + required this.initialDescription, + required this.submitLabel, + required this.primaryColor, + required this.onSubmit, + }); + + @override + State<_NameInputSheetContent> createState() => + _NameInputSheetContentState(); +} + +class _NameInputSheetContentState extends State<_NameInputSheetContent> { + late final TextEditingController _nameController; + late final TextEditingController _descController; + + @override + void initState() { + super.initState(); + _nameController = TextEditingController(text: widget.initialName ?? ''); + _descController = + TextEditingController(text: widget.initialDescription ?? ''); + } + + @override + void dispose() { + _nameController.dispose(); + _descController.dispose(); + super.dispose(); + } + + bool get _canSave => _nameController.text.trim().isNotEmpty; + + @override + Widget build(BuildContext context) { + final bottomInset = MediaQuery.of(context).viewInsets.bottom; + + return Padding( + padding: EdgeInsets.only(bottom: bottomInset), + child: Container( + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical(top: Radius.circular(20)), + ), + child: SafeArea( + top: false, + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: SizeUtils.getByScreen(small: 22, big: 24), + vertical: SizeUtils.getByScreen(small: 16, big: 18), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Center( + child: Container( + width: 40, + height: 4, + decoration: BoxDecoration( + color: Colors.grey.shade300, + borderRadius: BorderRadius.circular(2), + ), + ), + ), + const SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + widget.title, + style: TextStyle( + fontSize: SizeUtils.getByScreen(small: 18, big: 19), + fontWeight: FontWeight.w600, + color: widget.primaryColor, + ), + ), + TextButton( + onPressed: _canSave + ? () async { + Navigator.pop(context); + final name = _nameController.text.trim(); + final desc = _descController.text.trim(); + await widget.onSubmit( + name, + widget.showDescription && desc.isNotEmpty + ? desc + : null, + ); + } + : null, + child: Text( + widget.submitLabel, + style: TextStyle( + color: + _canSave ? widget.primaryColor : Colors.grey, + fontWeight: FontWeight.w600, + fontSize: + SizeUtils.getByScreen(small: 16, big: 17), + ), + ), + ), + ], + ), + const SizedBox(height: 12), + TextField( + controller: _nameController, + autofocus: true, + onChanged: (_) => setState(() {}), + decoration: locationInputDecoration( + hintText: widget.hintText, + primaryColor: widget.primaryColor, + ), + ), + if (widget.showDescription) ...[ + const SizedBox(height: 12), + TextField( + controller: _descController, + decoration: locationInputDecoration( + hintText: + context.translate(I18n.locationHintDescription), + primaryColor: widget.primaryColor, + ), + ), + ], + const SizedBox(height: 16), + ], + ), + ), + ), + ), + ); + } +} diff --git a/modules/legacy/modules/location/pubspec.lock b/modules/legacy/modules/location/pubspec.lock index 11cf6875..c3400a41 100644 --- a/modules/legacy/modules/location/pubspec.lock +++ b/modules/legacy/modules/location/pubspec.lock @@ -96,7 +96,7 @@ packages: source: hosted version: "3.0.3" build_runner: - dependency: transitive + dependency: "direct dev" description: name: build_runner sha256: b24597fceb695969d47025c958f3837f9f0122e237c6a22cb082a5ac66c3ca30 @@ -285,7 +285,7 @@ packages: source: hosted version: "0.1.6" dio: - dependency: transitive + dependency: "direct main" description: name: dio sha256: aff32c08f92787a557dd5c0145ac91536481831a01b4648136373cddb0e64f8c @@ -370,7 +370,7 @@ packages: source: hosted version: "5.0.0" flutter_map: - dependency: transitive + dependency: "direct main" description: name: flutter_map sha256: "391e7dc95cc3f5190748210a69d4cfeb5d8f84dcdfa9c3235d0a9d7742ccb3f8" @@ -386,7 +386,7 @@ packages: source: hosted version: "3.2.1" flutter_svg: - dependency: transitive + dependency: "direct main" description: name: flutter_svg sha256: "1ded017b39c8e15c8948ea855070a5ff8ff8b3d5e83f3446e02d6bb12add7ad9" @@ -418,7 +418,7 @@ packages: source: path version: "0.0.1" freezed: - dependency: transitive + dependency: "direct dev" description: name: freezed sha256: "13065f10e135263a4f5a4391b79a8efc5fb8106f8dd555a9e49b750b45393d77" @@ -426,7 +426,7 @@ packages: source: hosted version: "3.2.3" freezed_annotation: - dependency: transitive + dependency: "direct main" description: name: freezed_annotation sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" @@ -529,7 +529,7 @@ packages: source: hosted version: "0.7.2" json_annotation: - dependency: transitive + dependency: "direct main" description: name: json_annotation sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" @@ -537,7 +537,7 @@ packages: source: hosted version: "4.9.0" json_serializable: - dependency: transitive + dependency: "direct dev" description: name: json_serializable sha256: c5b2ee75210a0f263c6c7b9eeea80553dbae96ea1bf57f02484e806a3ffdffa3 @@ -569,7 +569,7 @@ packages: source: hosted version: "1.3.0" latlong2: - dependency: transitive + dependency: "direct main" description: name: latlong2 sha256: "98227922caf49e6056f91b6c56945ea1c7b166f28ffcd5fb8e72fc0b453cc8fe" @@ -608,7 +608,7 @@ packages: source: path version: "0.0.1" legacy_shared: - dependency: "direct overridden" + dependency: "direct main" description: path: "../../packages/legacy_shared" relative: true @@ -914,7 +914,7 @@ packages: source: hosted version: "2.5.0" sf_infrastructure: - dependency: "direct overridden" + dependency: "direct main" description: path: "../../../../packages/sf_infrastructure" relative: true @@ -928,7 +928,7 @@ packages: source: path version: "0.0.1" sf_shared: - dependency: "direct overridden" + dependency: "direct main" description: path: "../../../../packages/sf_shared" relative: true @@ -1251,7 +1251,7 @@ packages: source: path version: "0.0.1" uuid: - dependency: transitive + dependency: "direct main" description: name: uuid sha256: "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489" diff --git a/modules/legacy/modules/location/pubspec.yaml b/modules/legacy/modules/location/pubspec.yaml index 767f1703..77fea966 100644 --- a/modules/legacy/modules/location/pubspec.yaml +++ b/modules/legacy/modules/location/pubspec.yaml @@ -16,15 +16,31 @@ dependencies: path: ../../../../packages/design_system sf_localizations: path: ../../../../packages/sf_localizations + sf_infrastructure: + path: ../../../../packages/sf_infrastructure + legacy_shared: + path: ../../packages/legacy_shared + sf_shared: + path: ../../../../packages/sf_shared utils: path: ../../../../packages/utils flutter_riverpod: ^3.0.3 go_router: ^17.0.0 + freezed_annotation: ^3.1.0 + json_annotation: ^4.9.0 + dio: ^5.9.0 + flutter_map: ^8.2.2 + latlong2: ^0.9.1 + flutter_svg: ^2.2.1 + uuid: ^4.5.1 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^5.0.0 + build_runner: ^2.7.1 + freezed: ^3.2.3 + json_serializable: ^6.11.2 flutter: uses-material-design: true diff --git a/modules/legacy/packages/legacy_shared/lib/legacy_shared.dart b/modules/legacy/packages/legacy_shared/lib/legacy_shared.dart index eb8b86ce..700ebba5 100644 --- a/modules/legacy/packages/legacy_shared/lib/legacy_shared.dart +++ b/modules/legacy/packages/legacy_shared/lib/legacy_shared.dart @@ -1,8 +1,10 @@ library legacy_shared; +export 'src/providers/map_style_provider.dart'; export 'src/providers/selected_device_provider.dart'; export 'src/widgets/layouts/page_layout.dart'; export 'src/components/section_button.dart'; +export 'src/widgets/pulsing_location_marker.dart'; export 'src/widgets/week_day_chips.dart'; export 'src/components/menu_button.dart'; export 'src/data/models/device_response_model.dart'; diff --git a/modules/legacy/packages/legacy_shared/lib/src/providers/map_style_provider.dart b/modules/legacy/packages/legacy_shared/lib/src/providers/map_style_provider.dart new file mode 100644 index 00000000..f9b2c513 --- /dev/null +++ b/modules/legacy/packages/legacy_shared/lib/src/providers/map_style_provider.dart @@ -0,0 +1,44 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +const _mapStyleKey = 'location_map_style'; + +enum MapStyle { + standard('https://tile.openstreetmap.org/{z}/{x}/{y}.png'), + voyager('https://basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png'), + light('https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png'), + dark('https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png'), + satellite('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'); + + const MapStyle(this.urlTemplate); + final String urlTemplate; +} + +final mapStyleProvider = + NotifierProvider(MapStyleNotifier.new); + +class MapStyleNotifier extends Notifier { + @override + MapStyle build() { + _load(); + return MapStyle.standard; + } + + Future _load() async { + final prefs = await SharedPreferences.getInstance(); + final savedName = prefs.getString(_mapStyleKey); + if (savedName == null) return; + + final style = + MapStyle.values.where((s) => s.name == savedName).firstOrNull; + if (style != null && style != state) { + state = style; + } + } + + Future setStyle(MapStyle style) async { + state = style; + final prefs = await SharedPreferences.getInstance(); + await prefs.setString(_mapStyleKey, style.name); + } +} diff --git a/modules/legacy/packages/legacy_shared/lib/src/widgets/pulsing_location_marker.dart b/modules/legacy/packages/legacy_shared/lib/src/widgets/pulsing_location_marker.dart new file mode 100644 index 00000000..42e6e617 --- /dev/null +++ b/modules/legacy/packages/legacy_shared/lib/src/widgets/pulsing_location_marker.dart @@ -0,0 +1,88 @@ +import 'package:flutter/material.dart'; + +class PulsingLocationMarker extends StatefulWidget { + final Color? color; + + const PulsingLocationMarker({super.key, this.color}); + + @override + State createState() => _PulsingLocationMarkerState(); +} + +class _PulsingLocationMarkerState extends State + with TickerProviderStateMixin { + late final AnimationController _controller1; + late final AnimationController _controller2; + + @override + void initState() { + super.initState(); + _controller1 = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 2000), + )..repeat(); + _controller2 = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 2000), + ); + Future.delayed(const Duration(milliseconds: 1000), () { + if (mounted) _controller2.repeat(); + }); + } + + @override + void dispose() { + _controller1.dispose(); + _controller2.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final c = widget.color ?? const Color(0xFF329E95); + return Stack( + alignment: Alignment.center, + children: [ + _buildRipple(_controller1, c), + _buildRipple(_controller2, c), + Container( + width: 18, + height: 18, + decoration: BoxDecoration( + color: c, + shape: BoxShape.circle, + border: Border.all(color: Colors.white, width: 3), + boxShadow: [ + BoxShadow( + color: c.withValues(alpha: 0.4), + blurRadius: 6, + spreadRadius: 1, + ), + ], + ), + ), + ], + ); + } + + Widget _buildRipple(AnimationController controller, Color color) { + return AnimatedBuilder( + animation: controller, + builder: (context, child) { + final scale = 1.0 + controller.value * 2.5; + final opacity = (1.0 - controller.value).clamp(0.0, 0.5); + return Transform.scale( + scale: scale, + child: Container( + width: 18, + height: 18, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: color.withValues(alpha: opacity), + ), + ), + ); + }, + ); + } +} diff --git a/modules/legacy/packages/legacy_shared/pubspec.lock b/modules/legacy/packages/legacy_shared/pubspec.lock index 8d31305e..9b1d3be6 100644 --- a/modules/legacy/packages/legacy_shared/pubspec.lock +++ b/modules/legacy/packages/legacy_shared/pubspec.lock @@ -892,7 +892,7 @@ packages: source: path version: "0.0.1" shared_preferences: - dependency: transitive + dependency: "direct main" description: name: shared_preferences sha256: "2939ae520c9024cb197fc20dee269cd8cdbf564c8b5746374ec6cacdc5169e64" diff --git a/modules/legacy/packages/legacy_shared/pubspec.yaml b/modules/legacy/packages/legacy_shared/pubspec.yaml index 7dc24a10..e93b9c84 100644 --- a/modules/legacy/packages/legacy_shared/pubspec.yaml +++ b/modules/legacy/packages/legacy_shared/pubspec.yaml @@ -28,6 +28,7 @@ dependencies: dio: ^5.9.0 get_it: ^9.0.5 flutter_riverpod: ^3.0.3 + shared_preferences: ^2.5.0 freezed_annotation: ^3.1.0 freezed: ^3.2.3 json_annotation: ^4.9.0 diff --git a/packages/flutter_treezor_entrust_sdk_bridge/example/.flutter-plugins-dependencies b/packages/flutter_treezor_entrust_sdk_bridge/example/.flutter-plugins-dependencies index 73d4610e..441824dd 100644 --- a/packages/flutter_treezor_entrust_sdk_bridge/example/.flutter-plugins-dependencies +++ b/packages/flutter_treezor_entrust_sdk_bridge/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"C:\\\\dev\\\\sf-app-platform\\\\packages\\\\flutter_treezor_entrust_sdk_bridge\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"integration_test","path":"C:\\\\Program Files\\\\Flutter\\\\packages\\\\integration_test\\\\","native_build":true,"dependencies":[],"dev_dependency":true}],"android":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"C:\\\\dev\\\\sf-app-platform\\\\packages\\\\flutter_treezor_entrust_sdk_bridge\\\\","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"integration_test","path":"C:\\\\Program Files\\\\Flutter\\\\packages\\\\integration_test\\\\","native_build":true,"dependencies":[],"dev_dependency":true}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"integration_test","dependencies":[]}],"date_created":"2026-03-16 09:33:20.855374","version":"3.35.6","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/save-family-app/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"integration_test","path":"/Users/juliandalcalaf/Development/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":true}],"android":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/save-family-app/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"integration_test","path":"/Users/juliandalcalaf/Development/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":true}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"integration_test","dependencies":[]}],"date_created":"2026-03-18 14:45:40.203489","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/packages/sf_localizations/assets/l10n/de.json b/packages/sf_localizations/assets/l10n/de.json index f8a9e28c..af1ecb77 100644 --- a/packages/sf_localizations/assets/l10n/de.json +++ b/packages/sf_localizations/assets/l10n/de.json @@ -221,37 +221,30 @@ "scaErrorPaymentProfile": "Fehler beim Einrichten des Zahlungsprofils", "deviceSetupCreatingProfile": "Profil wird erstellt...", "deviceSetupConfirm": "Bestätigen", - "errorLoadingData": "Fehler beim Laden der Daten", "errorEmailAlreadyRegistered": "Diese E-Mail ist bereits registriert", "retry": "Erneut versuchen", - "walletTitle": "Wallet", "walletTotal": "{amount}€ gesamt", "walletAvailable": "Verfügbar", "walletSavings": "Ersparnisse", - "depositTitle": "Geld auf das Wallet einzahlen", "depositAmountLabel": "Betrag", "depositAmountHint": "0€", "depositButton": "Einzahlen", "depositMaxInfo": "Maximalbetrag: {amount}€", "depositErrorMaxExceeded": "Der Betrag übersteigt das zulässige Maximum ({amount}€)", - "expensesTitle": "Ausgaben", "filterToday": "Heute", "filterThisWeek": "Diese Woche", "filterThisMonth": "Dieser Monat", - "activityRecentTransactions": "Letzte Bewegungen", "activityViewTransactionsFrom": "Bewegungen anzeigen von", "activityNoWallets": "Keine Wallets verfügbar", "activityNoTransactions": "Keine Bewegungen", - "dateFilterToday": "Heute", "dateFilterLastWeek": "Letzte Woche", "dateFilterLastMonth": "Letzter Monat", - "transactionPayin": "Eingehende Zahlung", "transactionPayinRefund": "Eingangserstattung", "transactionPayout": "Ausgehende Zahlung", @@ -284,13 +277,11 @@ "transactionUnknown": "Bewegung", "loadMore": "Mehr laden", "transactionsShown": "Bewegungen", - "profileAccountSettings": "Kontoeinstellungen", "profileWithdrawMoney": "Geld vom Wallet abheben", "profileNoRecentTransactions": "Keine aktuellen Bewegungen", "profileRecentTransactions": "Letzte Bewegungen", "profileMyAccount": "Mein Konto", - "allowanceAutoAllowance": "Automatisches Taschengeld", "allowanceActivateAutoAllowance": "Automatisches Taschengeld aktivieren", "allowanceBalanceAfter": "Verfügbares Gesamtguthaben danach: {amount} €", @@ -309,7 +300,6 @@ "allowanceConditionWeeklyLimits": "Nur bei Einhaltung der Wochenlimits", "allowanceConditionNoIncidents": "Nur wenn es keine Vorfälle gab", "allowanceConditionPauseHolidays": "Während der Ferien pausieren", - "homeGreeting": "Hallo, ", "homeAddAnotherKid": "+ Weiteres Kind hinzufügen", "homeInPiggyBank": "im Sparschwein", @@ -319,43 +309,38 @@ "homeCamera": "Kamera", "homePhotoGallery": "Fotogalerie", "cancel": "Abbrechen", - "payoutTitle": "Geld abheben und erstatten", - "payoutSubtitle": "Um das Guthaben auf dein Konto zu \u00fcberweisen, ben\u00f6tigen wir deine IBAN und einige Grunddaten. So stellen wir sicher, dass die \u00dcberweisung sicher und schnell ist.", + "payoutSubtitle": "Um das Guthaben auf dein Konto zu überweisen, benötigen wir deine IBAN und einige Grunddaten. So stellen wir sicher, dass die Überweisung sicher und schnell ist.", "payoutAmountLabel": "Betrag zum Abheben", "payoutIbanLabel": "IBAN", "payoutHolderNameLabel": "Vor- und Nachname", "payoutHolderNameHint": "Kontoinhaber", "payoutButton": "Abheben", "payoutSuccess": "Abhebung erfolgreich angefordert", - "payoutErrorAmountExceeds": "Der Betrag \u00fcbersteigt das verf\u00fcgbare Guthaben", + "payoutErrorAmountExceeds": "Der Betrag übersteigt das verfügbare Guthaben", "payoutErrorAmountRequired": "Gib einen Betrag ein", "payoutErrorIbanRequired": "Die IBAN ist erforderlich", "payoutErrorHolderRequired": "Der Name des Kontoinhabers ist erforderlich", - "payoutAvailableBalance": "Verf\u00fcgbares Guthaben: {amount}\u20AC", - "payoutPinTitle": "Gib deine PIN zur Best\u00e4tigung ein", + "payoutAvailableBalance": "Verfügbares Guthaben: {amount}€", + "payoutPinTitle": "Gib deine PIN zur Bestätigung ein", "payoutNoBeneficiaries": "Du hast keine Begünstigten eingerichtet. Füge einen hinzu, um eine Auszahlung vorzunehmen.", "payoutAddBeneficiary": "Begünstigten hinzufügen", "payoutAddBeneficiarySubtitle": "Gib die IBAN und den vollständigen Namen des Kontoinhabers ein, um einen Begünstigten zu registrieren.", "payoutBeneficiaryAdded": "Begünstigter erfolgreich hinzugefügt", - "childWalletAvailableBalance": "Verfügbares Guthaben", "childWalletUnlockCard": "Karte entsperren", "childWalletLockCard": "Karte sperren", "childWalletRecentTransactions": "Letzte Bewegungen", "childWalletViewAll": "Alle anzeigen", "childWalletBalancePrefix": "Verfügbares Guthaben: ", - "walletActionAdd": "Hinzufügen", "walletActionAllowance": "Taschengeld", "walletActionLimits": "Limits", "walletActionGoals": "Ziele", "walletActionExtract": "Abheben", - "watchInfo": "Diese Information erscheint auf der Uhr deines Kindes", "defaultMessagePrefix": "Dies ist die Standardnachricht:", "sendMessageAndBlock": "Nachricht senden und sperren", - "depositAddMoney": "Geld hinzufügen", "depositReason": "Grund", "depositReasonWeekly": "Wöchentliches Taschengeld", @@ -366,12 +351,10 @@ "depositWhenSend": "Wann das Geld gesendet wird", "depositNow": "Jetzt", "depositSchedule": "Planen", - "extractTitle": "Geld vom Konto abheben", "extractAmountLabel": "Betrag auswählen", "extractDefaultMessage": "\"Wir haben das Geld von der Uhr entfernt, du kannst nicht mehr damit bezahlen\"", "extractMessageLabel": "Nachricht an {name} über den Grund der Abhebung schreiben", - "lockCardTitle": "Kartensperre", "lockCardDefaultMessage": "\"Vorerst haben wir das Geld auf der Uhr gesperrt\"", "lockCardMessageLabel": "Nachricht an {name} über den Grund der Sperrung schreiben", @@ -386,7 +369,6 @@ "cardStatusConfirm": "Bestätigen", "cardStatusSuccess": "Kartenstatus aktualisiert", "cardStatusError": "Fehler beim Aktualisieren des Kartenstatus", - "deleteDevice": "Gerät löschen", "deleteDeviceConfirmTitle": "Gerät löschen?", "deleteDeviceConfirmMessage": "Diese Aktion kann nicht rückgängig gemacht werden. Bist du sicher, dass du dieses Gerät löschen möchtest?", @@ -394,7 +376,6 @@ "deleteDeviceNotAllowedTitle": "Löschen nicht möglich", "deleteDeviceChecking": "Überprüfung...", "deleteDeviceWalletNonZeroBalance": "Das Profil kann nicht gelöscht werden, da das Wallet ein verfügbares Guthaben hat", - "limitsSave": "Limits speichern", "limitsSpendingTitle": "Ausgabenlimits setzen", "limitsSpendingSubtitle": "Freiheit für sie, Gelassenheit für dich", @@ -407,7 +388,6 @@ "limitsWeekLimit": "Wöchentlich", "limitsMonthLimit": "Monatlich", "limitsYearLimit": "Jährlich", - "goalsTitle": "Ziele", "goalsOnlyFullPlan": "Nur mit dem Komplettplan", "goalsTeachSavings": "Bringe ihm bei zu sparen und verstärke die Bedeutung, sein Geld nicht zu verschwenden", @@ -440,7 +420,6 @@ "goalsTasksCompletedMessage": "Herzlichen Glückwunsch, du hast alle Aufgaben dieser Woche erledigt!", "goalsDeleteTaskList": "Aufgabenliste löschen", "goalsCreateNewTaskList": "Neue Aufgabenliste erstellen", - "payinSelectCard": "Karte auswählen", "payinNoCards": "Du hast keine registrierten Karten. Füge eine hinzu, um eine Einzahlung vorzunehmen.", "payinAddCard": "Karte hinzufügen", @@ -492,7 +471,6 @@ "profileSettingsProvince": "Provinz", "profileSettingsState": "Bundesland", "profileSettingsPostCode": "Postleitzahl", - "dashboardTabHome": "Startseite", "dashboardTabActivity": "Aktivität", "dashboardTabNotifications": "Benachrichtigungen", @@ -549,7 +527,7 @@ "appsUse": "App-Nutzung", "topApps": "Meistgenutzte Apps", "noAppUsageData": "Keine App-Nutzungsdaten verfügbar", - "selectDay": "Tage auswählen", + "selectDay": "Tage auswählen", "alarmMessage": "Nachricht", "alarmMessageHint": "Text, den der Alarm anzeigen wird", "deleteAlarm": "Alarm löschen", @@ -596,5 +574,43 @@ "wifiBssidHint": "z.B. 0c:80:63:e4:cb:e1", "editChildProfile": "Profil bearbeiten", "editChildProfileTitle": "Kinderprofil bearbeiten", - "editChildProfileSaveSuccess": "Kinderprofil erfolgreich aktualisiert" -} \ No newline at end of file + "editChildProfileSaveSuccess": "Kinderprofil erfolgreich aktualisiert", + "locationMapStyleStandard": "Standard", + "locationMapStyleVoyager": "Voyager", + "locationMapStyleLight": "Hell", + "locationMapStyleDark": "Dunkel", + "locationMapStyleSatellite": "Satellit", + "locationLayerGeofences": "Sicherheitszonen", + "locationLayerFrequentPlaces": "Häufige Orte", + "locationLayerHistory": "Verlauf", + "locationNewFrequentPlace": "Neuer häufiger Ort", + "locationNewGeofence": "Neue Sicherheitszone", + "locationEditGeofence": "Sicherheitszone bearbeiten", + "locationEditFrequentPlace": "Häufigen Ort bearbeiten", + "locationHintFrequentPlace": "Z.B.: Zuhause, Büro...", + "locationHintGeofence": "Z.B.: Zuhause, Schule...", + "locationHintDescription": "Beschreibung (optional)", + "locationCreate": "Erstellen", + "locationSave": "Speichern", + "locationConfirm": "Bestätigen", + "locationEdit": "Bearbeiten", + "locationPlacementHint": "Bewegen Sie die Karte, um den Standort auszuwählen", + "locationRadius": "Radius", + "locationCoordinates": "Koordinaten", + "locationStatus": "Status", + "locationStatusActive": "Aktiv", + "locationStatusInactive": "Inaktiv", + "locationHistoryPosition": "Verlaufsposition", + "locationDate": "Datum", + "locationType": "Typ", + "locationAddress": "Adresse", + "locationPlace": "Ort", + "locationRadiusMeters": "{radius} m", + "deleteUserDialog": "Möchten Sie diesen Benutzer wirklich löschen?", + "soundAndVibration": "Ton und Vibration", + "soundOnly": "Nur Ton", + "vibrationOnly": "Nur Vibration", + "silent": "Lautlos", + "syncClockMessage": "Synchronisieren Sie die Geräteuhr mit der aktuellen Uhrzeit", + "locationWifiNetworksOptional": "WLAN-Netzwerke (optional)" +} diff --git a/packages/sf_localizations/assets/l10n/en.json b/packages/sf_localizations/assets/l10n/en.json index bebf1b55..453e907c 100755 --- a/packages/sf_localizations/assets/l10n/en.json +++ b/packages/sf_localizations/assets/l10n/en.json @@ -321,7 +321,7 @@ "payoutErrorAmountRequired": "Enter an amount", "payoutErrorIbanRequired": "IBAN is required", "payoutErrorHolderRequired": "Account holder name is required", - "payoutAvailableBalance": "Available balance: {amount}\u20AC", + "payoutAvailableBalance": "Available balance: {amount}€", "payoutPinTitle": "Enter your PIN to confirm", "payoutNoBeneficiaries": "You have no beneficiaries set up. Add one to make a withdrawal.", "payoutAddBeneficiary": "Add beneficiary", @@ -614,7 +614,7 @@ "alarmsMessage": "*Set up to 3 alarms", "once": "Once", "daily": "Daily", - "selectDay": "Select days", + "selectDay": "Select days", "alarmMessage": "Message", "alarmMessageHint": "Text the alarm will display", "deleteAlarm": "Delete alarm", @@ -706,5 +706,43 @@ "editChildProfile": "Edit profile", "editChildProfileSaveSuccess": "Child profile updated successfully", "editChildProfileTitle": "Edit child profile", - "activationCodeMessage": "An activation key has been sent to your email" -} \ No newline at end of file + "activationCodeMessage": "An activation key has been sent to your email", + "locationMapStyleStandard": "Standard", + "locationMapStyleVoyager": "Voyager", + "locationMapStyleLight": "Light", + "locationMapStyleDark": "Dark", + "locationMapStyleSatellite": "Satellite", + "locationLayerGeofences": "Safety zones", + "locationLayerFrequentPlaces": "Frequent Places", + "locationLayerHistory": "History", + "locationNewFrequentPlace": "New frequent place", + "locationNewGeofence": "New safety zone", + "locationEditGeofence": "Edit safety zone", + "locationEditFrequentPlace": "Edit frequent place", + "locationHintFrequentPlace": "E.g: Home, Office...", + "locationHintGeofence": "E.g: Home, School...", + "locationHintDescription": "Description (optional)", + "locationCreate": "Create", + "locationSave": "Save", + "locationConfirm": "Confirm", + "locationEdit": "Edit", + "locationPlacementHint": "Move the map to choose the location", + "locationRadius": "Radius", + "locationCoordinates": "Coordinates", + "locationStatus": "Status", + "locationStatusActive": "Active", + "locationStatusInactive": "Inactive", + "locationHistoryPosition": "History position", + "locationDate": "Date", + "locationType": "Type", + "locationAddress": "Address", + "locationPlace": "Place", + "locationRadiusMeters": "{radius} m", + "deleteUserDialog": "Are you sure you want to delete this user?", + "soundAndVibration": "Sound and vibration", + "soundOnly": "Sound only", + "vibrationOnly": "Vibration only", + "silent": "Silent", + "syncClockMessage": "Synchronize the device clock with the current time", + "locationWifiNetworksOptional": "WiFi networks (optional)" +} diff --git a/packages/sf_localizations/assets/l10n/es.json b/packages/sf_localizations/assets/l10n/es.json index 42de9849..7103ef6b 100644 --- a/packages/sf_localizations/assets/l10n/es.json +++ b/packages/sf_localizations/assets/l10n/es.json @@ -320,7 +320,7 @@ "payoutErrorAmountRequired": "Introduce una cantidad", "payoutErrorIbanRequired": "El IBAN es obligatorio", "payoutErrorHolderRequired": "El nombre del titular es obligatorio", - "payoutAvailableBalance": "Saldo disponible: {amount}\u20AC", + "payoutAvailableBalance": "Saldo disponible: {amount}€", "payoutPinTitle": "Introduce tu PIN para confirmar", "payoutNoBeneficiaries": "No tienes beneficiarios configurados. Añade uno para hacer una retirada.", "payoutAddBeneficiary": "Añadir beneficiario", @@ -597,7 +597,7 @@ "blockPhone": "Bloqueo de números", "disableFunctions": "Deshabilitar Funciones", "language": "Idioma", - "legacyNotifications": "Notificaciones", + "legacyNotifications": "Notificaciones", "remoteManagement": "Programación remota", "remoteOnOff": "Encendido y Apagado Programado", "smsAlert": "Alertas SMS", @@ -612,7 +612,7 @@ "alarmsMessage": "*Configura hasta 3 alarmas", "once": "Una vez", "daily": "Diario", - "selectDay": "Selección de días", + "selectDay": "Selección de días", "alarmMessage": "Mensaje", "alarmMessageHint": "Texto que mostrará la alarma", "deleteAlarm": "Eliminar alarma", @@ -704,5 +704,43 @@ "editChildProfile": "Editar perfil", "editChildProfileTitle": "Editar perfil del niño", "editChildProfileSaveSuccess": "Perfil del niño actualizado correctamente", - "activationCodeMessage": "Se ha enviado un código de activación a tu correo electrónico" -} \ No newline at end of file + "activationCodeMessage": "Se ha enviado un código de activación a tu correo electrónico", + "locationMapStyleStandard": "Estándar", + "locationMapStyleVoyager": "Voyager", + "locationMapStyleLight": "Claro", + "locationMapStyleDark": "Oscuro", + "locationMapStyleSatellite": "Satélite", + "locationLayerGeofences": "Zonas de seguridad", + "locationLayerFrequentPlaces": "Lugares Frecuentes", + "locationLayerHistory": "Historial", + "locationNewFrequentPlace": "Nuevo lugar frecuente", + "locationNewGeofence": "Nueva zona de seguridad", + "locationEditGeofence": "Editar zona de seguridad", + "locationEditFrequentPlace": "Editar lugar frecuente", + "locationHintFrequentPlace": "Ej: Casa, Oficina...", + "locationHintGeofence": "Ej: Casa, Colegio...", + "locationHintDescription": "Descripción (opcional)", + "locationCreate": "Crear", + "locationSave": "Guardar", + "locationConfirm": "Confirmar", + "locationEdit": "Editar", + "locationPlacementHint": "Mueve el mapa para elegir la ubicación", + "locationRadius": "Radio", + "locationCoordinates": "Coordenadas", + "locationStatus": "Estado", + "locationStatusActive": "Activa", + "locationStatusInactive": "Inactiva", + "locationHistoryPosition": "Posición del historial", + "locationDate": "Fecha", + "locationType": "Tipo", + "locationAddress": "Dirección", + "locationPlace": "Lugar", + "locationRadiusMeters": "{radius} m", + "deleteUserDialog": "¿Estás seguro de que quieres eliminar este usuario?", + "soundAndVibration": "Sonido y vibración", + "soundOnly": "Solo sonido", + "vibrationOnly": "Solo vibración", + "silent": "Silencio", + "syncClockMessage": "Sincroniza el reloj del dispositivo con la hora actual", + "locationWifiNetworksOptional": "Redes WiFi (opcional)" +} diff --git a/packages/sf_localizations/assets/l10n/fr.json b/packages/sf_localizations/assets/l10n/fr.json index cc1795ae..147325fa 100644 --- a/packages/sf_localizations/assets/l10n/fr.json +++ b/packages/sf_localizations/assets/l10n/fr.json @@ -221,37 +221,30 @@ "scaErrorPaymentProfile": "Erreur lors de la configuration du profil de paiement", "deviceSetupCreatingProfile": "Création du profil...", "deviceSetupConfirm": "Confirmer", - "errorLoadingData": "Erreur lors du chargement des données", "errorEmailAlreadyRegistered": "Cet email est déjà enregistré", "retry": "Réessayer", - "walletTitle": "Portefeuille", "walletTotal": "{amount}€ total", "walletAvailable": "Disponible", "walletSavings": "Épargne", - "depositTitle": "Ajouter de l'argent au portefeuille", "depositAmountLabel": "Montant", "depositAmountHint": "0€", "depositButton": "Déposer", "depositMaxInfo": "Maximum que vous pouvez ajouter : {amount}€", "depositErrorMaxExceeded": "Le montant dépasse le maximum autorisé ({amount}€)", - "expensesTitle": "Dépenses", "filterToday": "Aujourd'hui", "filterThisWeek": "Cette semaine", "filterThisMonth": "Ce mois", - "activityRecentTransactions": "Mouvements récents", "activityViewTransactionsFrom": "Voir les mouvements de", "activityNoWallets": "Aucun portefeuille disponible", "activityNoTransactions": "Aucun mouvement", - "dateFilterToday": "Aujourd'hui", "dateFilterLastWeek": "Semaine dernière", "dateFilterLastMonth": "Mois dernier", - "transactionPayin": "Entrée de fonds", "transactionPayinRefund": "Remboursement d'entrée", "transactionPayout": "Sortie de fonds", @@ -284,13 +277,11 @@ "transactionUnknown": "Mouvement", "loadMore": "Charger plus", "transactionsShown": "mouvements", - "profileAccountSettings": "Paramètres du compte", "profileWithdrawMoney": "Retirer de l'argent du portefeuille", "profileNoRecentTransactions": "Aucun mouvement récent", "profileRecentTransactions": "Derniers mouvements", "profileMyAccount": "Mon compte", - "allowanceAutoAllowance": "Allocation automatique", "allowanceActivateAutoAllowance": "Activer l'allocation automatique", "allowanceBalanceAfter": "Solde total disponible après : {amount} €", @@ -309,7 +300,6 @@ "allowanceConditionWeeklyLimits": "Uniquement si les limites hebdomadaires sont respectées", "allowanceConditionNoIncidents": "Uniquement s'il n'y a eu aucun incident", "allowanceConditionPauseHolidays": "Suspendre pendant les vacances", - "homeGreeting": "Bonjour, ", "homeAddAnotherKid": "+ Ajouter un autre enfant", "homeInPiggyBank": "dans sa tirelire", @@ -319,43 +309,38 @@ "homeCamera": "Appareil photo", "homePhotoGallery": "Galerie photos", "cancel": "Annuler", - "payoutTitle": "Retirer et rembourser l'argent du portefeuille", - "payoutSubtitle": "Pour transf\u00e9rer le solde sur votre compte, nous avons besoin de votre IBAN et de quelques informations de base. Nous nous assurons ainsi que le transfert est s\u00fbr et rapide.", - "payoutAmountLabel": "Montant \u00e0 retirer", + "payoutSubtitle": "Pour transférer le solde sur votre compte, nous avons besoin de votre IBAN et de quelques informations de base. Nous nous assurons ainsi que le transfert est sûr et rapide.", + "payoutAmountLabel": "Montant à retirer", "payoutIbanLabel": "IBAN", - "payoutHolderNameLabel": "Nom et pr\u00e9nom", + "payoutHolderNameLabel": "Nom et prénom", "payoutHolderNameHint": "Titulaire du compte", "payoutButton": "Retirer", - "payoutSuccess": "Retrait demand\u00e9 avec succ\u00e8s", - "payoutErrorAmountExceeds": "Le montant d\u00e9passe le solde disponible", + "payoutSuccess": "Retrait demandé avec succès", + "payoutErrorAmountExceeds": "Le montant dépasse le solde disponible", "payoutErrorAmountRequired": "Saisissez un montant", "payoutErrorIbanRequired": "L'IBAN est obligatoire", "payoutErrorHolderRequired": "Le nom du titulaire est obligatoire", - "payoutAvailableBalance": "Solde disponible : {amount}\u20AC", + "payoutAvailableBalance": "Solde disponible : {amount}€", "payoutPinTitle": "Saisissez votre PIN pour confirmer", "payoutNoBeneficiaries": "Vous n'avez aucun bénéficiaire configuré. Ajoutez-en un pour effectuer un retrait.", "payoutAddBeneficiary": "Ajouter un bénéficiaire", "payoutAddBeneficiarySubtitle": "Saisissez l'IBAN et le nom complet du titulaire du compte pour enregistrer un bénéficiaire.", "payoutBeneficiaryAdded": "Bénéficiaire ajouté avec succès", - "childWalletAvailableBalance": "Solde disponible", "childWalletUnlockCard": "Débloquer la carte", "childWalletLockCard": "Bloquer la carte", "childWalletRecentTransactions": "Derniers mouvements", "childWalletViewAll": "Tout voir", "childWalletBalancePrefix": "Solde disponible : ", - "walletActionAdd": "Ajouter", "walletActionAllowance": "Allocation", "walletActionLimits": "Limites", "walletActionGoals": "Objectifs", "walletActionExtract": "Retirer", - "watchInfo": "Cette information apparaîtra sur la montre de votre enfant", "defaultMessagePrefix": "Ceci est le message par défaut :", "sendMessageAndBlock": "Envoyer le message et bloquer", - "depositAddMoney": "Ajouter de l'argent", "depositReason": "Motif", "depositReasonWeekly": "Allocation hebdomadaire", @@ -366,12 +351,10 @@ "depositWhenSend": "Quand envoyer l'argent", "depositNow": "Maintenant", "depositSchedule": "Programmer", - "extractTitle": "Retirer de l'argent du compte", "extractAmountLabel": "Sélectionne le montant", "extractDefaultMessage": "\"Nous avons retiré l'argent de la montre, tu ne peux plus payer avec\"", "extractMessageLabel": "Écrire un message à {name} sur le motif du retrait", - "lockCardTitle": "Blocage de la carte", "lockCardDefaultMessage": "\"Pour l'instant, nous avons bloqué l'argent de la montre\"", "lockCardMessageLabel": "Écrire un message à {name} sur le motif du blocage", @@ -386,7 +369,6 @@ "cardStatusConfirm": "Confirmer", "cardStatusSuccess": "État de la carte mis à jour", "cardStatusError": "Erreur lors de la mise à jour de la carte", - "deleteDevice": "Supprimer l'appareil", "deleteDeviceConfirmTitle": "Supprimer l'appareil ?", "deleteDeviceConfirmMessage": "Cette action est irréversible. Êtes-vous sûr de vouloir supprimer cet appareil ?", @@ -394,7 +376,6 @@ "deleteDeviceNotAllowedTitle": "Suppression impossible", "deleteDeviceChecking": "Vérification...", "deleteDeviceWalletNonZeroBalance": "Impossible de supprimer le profil car le portefeuille a un solde disponible", - "limitsSave": "Enregistrer les limites", "limitsSpendingTitle": "Fixe des limites de dépenses", "limitsSpendingSubtitle": "Liberté pour eux, tranquillité pour toi", @@ -407,7 +388,6 @@ "limitsWeekLimit": "Hebdomadaire", "limitsMonthLimit": "Mensuel", "limitsYearLimit": "Annuel", - "goalsTitle": "Objectifs", "goalsOnlyFullPlan": "Uniquement avec le Plan Complet", "goalsTeachSavings": "Apprends-lui à épargner et renforce l'importance de ne pas gaspiller son argent", @@ -440,7 +420,6 @@ "goalsTasksCompletedMessage": "Félicitations, tu as accompli toutes les tâches de cette semaine !", "goalsDeleteTaskList": "Supprimer la liste de tâches", "goalsCreateNewTaskList": "Créer une nouvelle liste de tâches", - "payinSelectCard": "Sélectionnez une carte", "payinNoCards": "Vous n'avez aucune carte enregistrée. Ajoutez-en une pour effectuer un dépôt.", "payinAddCard": "Ajouter une carte", @@ -492,7 +471,6 @@ "profileSettingsProvince": "Province", "profileSettingsState": "État", "profileSettingsPostCode": "Code postal", - "dashboardTabHome": "Accueil", "dashboardTabActivity": "Activité", "dashboardTabNotifications": "Notifications", @@ -549,7 +527,7 @@ "appsUse": "Utilisation des applications", "topApps": "Applications les plus utilisées", "noAppUsageData": "Aucune donnée d'utilisation des applications", - "selectDay": "Sélection des jours", + "selectDay": "Sélection des jours", "alarmMessage": "Message", "alarmMessageHint": "Texte que l'alarme affichera", "deleteAlarm": "Supprimer l'alarme", @@ -596,5 +574,43 @@ "wifiBssidHint": "ex. 0c:80:63:e4:cb:e1", "editChildProfile": "Modifier le profil", "editChildProfileTitle": "Modifier le profil de l'enfant", - "editChildProfileSaveSuccess": "Profil de l'enfant mis à jour avec succès" -} \ No newline at end of file + "editChildProfileSaveSuccess": "Profil de l'enfant mis à jour avec succès", + "locationMapStyleStandard": "Standard", + "locationMapStyleVoyager": "Voyager", + "locationMapStyleLight": "Clair", + "locationMapStyleDark": "Sombre", + "locationMapStyleSatellite": "Satellite", + "locationLayerGeofences": "Zones de sécurité", + "locationLayerFrequentPlaces": "Lieux fréquents", + "locationLayerHistory": "Historique", + "locationNewFrequentPlace": "Nouveau lieu fréquent", + "locationNewGeofence": "Nouvelle zone de sécurité", + "locationEditGeofence": "Modifier la zone de sécurité", + "locationEditFrequentPlace": "Modifier le lieu fréquent", + "locationHintFrequentPlace": "Ex : Maison, Bureau...", + "locationHintGeofence": "Ex : Maison, École...", + "locationHintDescription": "Description (facultatif)", + "locationCreate": "Créer", + "locationSave": "Enregistrer", + "locationConfirm": "Confirmer", + "locationEdit": "Modifier", + "locationPlacementHint": "Déplacez la carte pour choisir l'emplacement", + "locationRadius": "Rayon", + "locationCoordinates": "Coordonnées", + "locationStatus": "Statut", + "locationStatusActive": "Active", + "locationStatusInactive": "Inactive", + "locationHistoryPosition": "Position de l'historique", + "locationDate": "Date", + "locationType": "Type", + "locationAddress": "Adresse", + "locationPlace": "Lieu", + "locationRadiusMeters": "{radius} m", + "deleteUserDialog": "Êtes-vous sûr de vouloir supprimer cet utilisateur ?", + "soundAndVibration": "Son et vibration", + "soundOnly": "Son uniquement", + "vibrationOnly": "Vibration uniquement", + "silent": "Silencieux", + "syncClockMessage": "Synchroniser l'horloge de l'appareil avec l'heure actuelle", + "locationWifiNetworksOptional": "Réseaux WiFi (facultatif)" +} diff --git a/packages/sf_localizations/assets/l10n/it.json b/packages/sf_localizations/assets/l10n/it.json index 8bc9fae7..20236db4 100644 --- a/packages/sf_localizations/assets/l10n/it.json +++ b/packages/sf_localizations/assets/l10n/it.json @@ -221,37 +221,30 @@ "scaErrorPaymentProfile": "Errore nella configurazione del profilo di pagamento", "deviceSetupCreatingProfile": "Creazione profilo...", "deviceSetupConfirm": "Conferma", - "errorLoadingData": "Errore durante il caricamento dei dati", "errorEmailAlreadyRegistered": "Questa email è già registrata", "retry": "Riprova", - "walletTitle": "Portafoglio", "walletTotal": "{amount}€ totale", "walletAvailable": "Disponibile", "walletSavings": "Risparmi", - "depositTitle": "Aggiungi denaro al portafoglio", "depositAmountLabel": "Importo", "depositAmountHint": "0€", "depositButton": "Deposita", "depositMaxInfo": "Massimo che puoi aggiungere: {amount}€", "depositErrorMaxExceeded": "L'importo supera il massimo consentito ({amount}€)", - "expensesTitle": "Spese", "filterToday": "Oggi", "filterThisWeek": "Questa settimana", "filterThisMonth": "Questo mese", - "activityRecentTransactions": "Movimenti recenti", "activityViewTransactionsFrom": "Vedi movimenti di", "activityNoWallets": "Nessun portafoglio disponibile", "activityNoTransactions": "Nessun movimento", - "dateFilterToday": "Oggi", "dateFilterLastWeek": "Ultima settimana", "dateFilterLastMonth": "Ultimo mese", - "transactionPayin": "Entrata di fondi", "transactionPayinRefund": "Rimborso in entrata", "transactionPayout": "Uscita di fondi", @@ -284,13 +277,11 @@ "transactionUnknown": "Movimento", "loadMore": "Carica altro", "transactionsShown": "movimenti", - "profileAccountSettings": "Impostazioni account", "profileWithdrawMoney": "Preleva denaro dal portafoglio", "profileNoRecentTransactions": "Nessun movimento recente", "profileRecentTransactions": "Ultimi movimenti", "profileMyAccount": "Il mio conto", - "allowanceAutoAllowance": "Paghetta automatica", "allowanceActivateAutoAllowance": "Attiva paghetta automatica", "allowanceBalanceAfter": "Saldo totale disponibile dopo: {amount} €", @@ -309,7 +300,6 @@ "allowanceConditionWeeklyLimits": "Solo se rispetta i limiti settimanali", "allowanceConditionNoIncidents": "Solo se non ci sono stati incidenti", "allowanceConditionPauseHolidays": "Sospendere durante le vacanze", - "homeGreeting": "Ciao, ", "homeAddAnotherKid": "+ Aggiungi un altro bambino", "homeInPiggyBank": "nel suo salvadanaio", @@ -319,7 +309,6 @@ "homeCamera": "Fotocamera", "homePhotoGallery": "Galleria fotografica", "cancel": "Annulla", - "payoutTitle": "Prelevare e rimborsare denaro dal portafoglio", "payoutSubtitle": "Per trasferire il saldo sul tuo conto abbiamo bisogno del tuo IBAN e di alcuni dati di base. In questo modo ci assicuriamo che il trasferimento sia sicuro e veloce.", "payoutAmountLabel": "Importo da prelevare", @@ -330,32 +319,28 @@ "payoutSuccess": "Prelievo richiesto con successo", "payoutErrorAmountExceeds": "L'importo supera il saldo disponibile", "payoutErrorAmountRequired": "Inserisci un importo", - "payoutErrorIbanRequired": "L'IBAN \u00e8 obbligatorio", - "payoutErrorHolderRequired": "Il nome del titolare \u00e8 obbligatorio", - "payoutAvailableBalance": "Saldo disponibile: {amount}\u20AC", + "payoutErrorIbanRequired": "L'IBAN è obbligatorio", + "payoutErrorHolderRequired": "Il nome del titolare è obbligatorio", + "payoutAvailableBalance": "Saldo disponibile: {amount}€", "payoutPinTitle": "Inserisci il tuo PIN per confermare", "payoutNoBeneficiaries": "Non hai beneficiari configurati. Aggiungine uno per effettuare un prelievo.", "payoutAddBeneficiary": "Aggiungi beneficiario", "payoutAddBeneficiarySubtitle": "Inserisci l'IBAN e il nome completo del titolare del conto per registrare un beneficiario.", "payoutBeneficiaryAdded": "Beneficiario aggiunto con successo", - "childWalletAvailableBalance": "Saldo disponibile", "childWalletUnlockCard": "Sblocca carta", "childWalletLockCard": "Blocca carta", "childWalletRecentTransactions": "Ultimi movimenti", "childWalletViewAll": "Vedi tutti", "childWalletBalancePrefix": "Saldo disponibile: ", - "walletActionAdd": "Aggiungi", "walletActionAllowance": "Paghetta", "walletActionLimits": "Limiti", "walletActionGoals": "Obiettivi", "walletActionExtract": "Preleva", - "watchInfo": "Questa informazione apparirà sull'orologio del bambino", "defaultMessagePrefix": "Questo è il messaggio predefinito:", "sendMessageAndBlock": "Invia messaggio e blocca", - "depositAddMoney": "Aggiungi denaro", "depositReason": "Motivo", "depositReasonWeekly": "Paghetta settimanale", @@ -366,12 +351,10 @@ "depositWhenSend": "Quando inviare il denaro", "depositNow": "Adesso", "depositSchedule": "Programma", - "extractTitle": "Prelevare denaro dal conto", "extractAmountLabel": "Seleziona l'importo", "extractDefaultMessage": "\"Abbiamo rimosso il denaro dall'orologio, non puoi più pagare con esso\"", "extractMessageLabel": "Scrivi un messaggio a {name} sul motivo del prelievo", - "lockCardTitle": "Blocco della carta", "lockCardDefaultMessage": "\"Per il momento abbiamo bloccato il denaro sull'orologio\"", "lockCardMessageLabel": "Scrivi un messaggio a {name} sul motivo del blocco", @@ -386,7 +369,6 @@ "cardStatusConfirm": "Conferma", "cardStatusSuccess": "Stato della carta aggiornato", "cardStatusError": "Errore nell'aggiornamento dello stato della carta", - "deleteDevice": "Elimina dispositivo", "deleteDeviceConfirmTitle": "Eliminare il dispositivo?", "deleteDeviceConfirmMessage": "Questa azione non può essere annullata. Sei sicuro di voler eliminare questo dispositivo?", @@ -394,7 +376,6 @@ "deleteDeviceNotAllowedTitle": "Impossibile eliminare", "deleteDeviceChecking": "Verifica in corso...", "deleteDeviceWalletNonZeroBalance": "Impossibile eliminare il profilo perché il portafoglio ha un saldo disponibile", - "limitsSave": "Salva limiti", "limitsSpendingTitle": "Imposta limiti di spesa", "limitsSpendingSubtitle": "Libertà per loro, tranquillità per te", @@ -407,7 +388,6 @@ "limitsWeekLimit": "Settimanale", "limitsMonthLimit": "Mensile", "limitsYearLimit": "Annuale", - "goalsTitle": "Obiettivi", "goalsOnlyFullPlan": "Solo con il Piano Completo", "goalsTeachSavings": "Insegnagli a risparmiare e rafforza l'importanza di non sprecare il suo denaro", @@ -440,7 +420,6 @@ "goalsTasksCompletedMessage": "Complimenti, hai completato tutti i compiti di questa settimana!", "goalsDeleteTaskList": "Elimina lista di compiti", "goalsCreateNewTaskList": "Crea una nuova lista di compiti", - "payinSelectCard": "Seleziona una carta", "payinNoCards": "Non hai carte registrate. Aggiungine una per effettuare un deposito.", "payinAddCard": "Aggiungi carta", @@ -492,7 +471,6 @@ "profileSettingsProvince": "Provincia", "profileSettingsState": "Stato", "profileSettingsPostCode": "Codice postale", - "dashboardTabHome": "Home", "dashboardTabActivity": "Attività", "dashboardTabNotifications": "Notifiche", @@ -549,7 +527,7 @@ "appsUse": "Utilizzo delle applicazioni", "topApps": "App più utilizzate", "noAppUsageData": "Nessun dato sull'utilizzo delle app", - "selectDay": "Selezione dei giorni", + "selectDay": "Selezione dei giorni", "alarmMessage": "Messaggio", "alarmMessageHint": "Testo che l'allarme mostrerà", "deleteAlarm": "Elimina allarme", @@ -596,5 +574,43 @@ "wifiBssidHint": "es. 0c:80:63:e4:cb:e1", "editChildProfile": "Modifica profilo", "editChildProfileTitle": "Modifica profilo del bambino", - "editChildProfileSaveSuccess": "Profilo del bambino aggiornato con successo" -} \ No newline at end of file + "editChildProfileSaveSuccess": "Profilo del bambino aggiornato con successo", + "locationMapStyleStandard": "Standard", + "locationMapStyleVoyager": "Voyager", + "locationMapStyleLight": "Chiaro", + "locationMapStyleDark": "Scuro", + "locationMapStyleSatellite": "Satellite", + "locationLayerGeofences": "Zone di sicurezza", + "locationLayerFrequentPlaces": "Luoghi frequenti", + "locationLayerHistory": "Cronologia", + "locationNewFrequentPlace": "Nuovo luogo frequente", + "locationNewGeofence": "Nuova zona di sicurezza", + "locationEditGeofence": "Modifica zona di sicurezza", + "locationEditFrequentPlace": "Modifica luogo frequente", + "locationHintFrequentPlace": "Es: Casa, Ufficio...", + "locationHintGeofence": "Es: Casa, Scuola...", + "locationHintDescription": "Descrizione (facoltativo)", + "locationCreate": "Crea", + "locationSave": "Salva", + "locationConfirm": "Conferma", + "locationEdit": "Modifica", + "locationPlacementHint": "Sposta la mappa per scegliere la posizione", + "locationRadius": "Raggio", + "locationCoordinates": "Coordinate", + "locationStatus": "Stato", + "locationStatusActive": "Attiva", + "locationStatusInactive": "Inattiva", + "locationHistoryPosition": "Posizione della cronologia", + "locationDate": "Data", + "locationType": "Tipo", + "locationAddress": "Indirizzo", + "locationPlace": "Luogo", + "locationRadiusMeters": "{radius} m", + "deleteUserDialog": "Sei sicuro di voler eliminare questo utente?", + "soundAndVibration": "Suono e vibrazione", + "soundOnly": "Solo suono", + "vibrationOnly": "Solo vibrazione", + "silent": "Silenzioso", + "syncClockMessage": "Sincronizza l'orologio del dispositivo con l'ora attuale", + "locationWifiNetworksOptional": "Reti WiFi (facoltativo)" +} diff --git a/packages/sf_localizations/assets/l10n/pt.json b/packages/sf_localizations/assets/l10n/pt.json index c1c853d9..31ef7246 100644 --- a/packages/sf_localizations/assets/l10n/pt.json +++ b/packages/sf_localizations/assets/l10n/pt.json @@ -221,37 +221,30 @@ "scaErrorPaymentProfile": "Erro ao configurar o perfil de pagamento", "deviceSetupCreatingProfile": "A criar perfil...", "deviceSetupConfirm": "Confirmar", - "errorLoadingData": "Erro ao carregar dados", "errorEmailAlreadyRegistered": "Este email já está registado", "retry": "Tentar novamente", - "walletTitle": "Carteira", "walletTotal": "{amount}€ total", "walletAvailable": "Disponível", "walletSavings": "Poupança", - "depositTitle": "Adicionar dinheiro à carteira", "depositAmountLabel": "Quantia", "depositAmountHint": "0€", "depositButton": "Depositar", "depositMaxInfo": "Máximo que podes adicionar: {amount}€", "depositErrorMaxExceeded": "O valor excede o máximo permitido ({amount}€)", - "expensesTitle": "Despesas", "filterToday": "Hoje", "filterThisWeek": "Esta semana", "filterThisMonth": "Este mês", - "activityRecentTransactions": "Movimentos recentes", "activityViewTransactionsFrom": "Ver movimentos de", "activityNoWallets": "Nenhuma carteira disponível", "activityNoTransactions": "Sem movimentos", - "dateFilterToday": "Hoje", "dateFilterLastWeek": "Última semana", "dateFilterLastMonth": "Último mês", - "transactionPayin": "Entrada de fundos", "transactionPayinRefund": "Reembolso de entrada", "transactionPayout": "Saída de fundos", @@ -284,13 +277,11 @@ "transactionUnknown": "Movimento", "loadMore": "Carregar mais", "transactionsShown": "movimentos", - "profileAccountSettings": "Definições da conta", "profileWithdrawMoney": "Levantar dinheiro da carteira", "profileNoRecentTransactions": "Sem movimentos recentes", "profileRecentTransactions": "Últimos movimentos", "profileMyAccount": "A minha conta", - "allowanceAutoAllowance": "Mesada automática", "allowanceActivateAutoAllowance": "Ativar mesada automática", "allowanceBalanceAfter": "Saldo total disponível depois: {amount} €", @@ -309,7 +300,6 @@ "allowanceConditionWeeklyLimits": "Apenas se cumprir os limites semanais", "allowanceConditionNoIncidents": "Apenas se não houver incidências", "allowanceConditionPauseHolidays": "Pausar durante as férias", - "homeGreeting": "Olá, ", "homeAddAnotherKid": "+ Adicionar outra criança", "homeInPiggyBank": "no cofrinho", @@ -319,43 +309,38 @@ "homeCamera": "Câmara", "homePhotoGallery": "Galeria de fotos", "cancel": "Cancelar", - "payoutTitle": "Levantar e reembolsar dinheiro da carteira", - "payoutSubtitle": "Para transferir o saldo para a tua conta precisamos do teu IBAN e de alguns dados b\u00e1sicos. Assim garantimos que a transfer\u00eancia seja segura e r\u00e1pida.", + "payoutSubtitle": "Para transferir o saldo para a tua conta precisamos do teu IBAN e de alguns dados básicos. Assim garantimos que a transferência seja segura e rápida.", "payoutAmountLabel": "Quantia a levantar", "payoutIbanLabel": "IBAN", "payoutHolderNameLabel": "Nome completo", "payoutHolderNameHint": "Titular da conta", "payoutButton": "Levantar", "payoutSuccess": "Levantamento solicitado com sucesso", - "payoutErrorAmountExceeds": "A quantia excede o saldo dispon\u00edvel", + "payoutErrorAmountExceeds": "A quantia excede o saldo disponível", "payoutErrorAmountRequired": "Introduz uma quantia", - "payoutErrorIbanRequired": "O IBAN \u00e9 obrigat\u00f3rio", - "payoutErrorHolderRequired": "O nome do titular \u00e9 obrigat\u00f3rio", - "payoutAvailableBalance": "Saldo dispon\u00edvel: {amount}\u20AC", + "payoutErrorIbanRequired": "O IBAN é obrigatório", + "payoutErrorHolderRequired": "O nome do titular é obrigatório", + "payoutAvailableBalance": "Saldo disponível: {amount}€", "payoutPinTitle": "Introduz o teu PIN para confirmar", "payoutNoBeneficiaries": "Não tens beneficiários configurados. Adiciona um para fazer um levantamento.", "payoutAddBeneficiary": "Adicionar beneficiário", "payoutAddBeneficiarySubtitle": "Introduz o IBAN e o nome completo do titular da conta para registar um beneficiário.", "payoutBeneficiaryAdded": "Beneficiário adicionado com sucesso", - "childWalletAvailableBalance": "Saldo disponível", "childWalletUnlockCard": "Desbloquear cartão", "childWalletLockCard": "Bloquear cartão", "childWalletRecentTransactions": "Últimos movimentos", "childWalletViewAll": "Ver todos", "childWalletBalancePrefix": "Saldo disponível: ", - "walletActionAdd": "Adicionar", "walletActionAllowance": "Mesada", "walletActionLimits": "Limites", "walletActionGoals": "Metas", "walletActionExtract": "Retirar", - "watchInfo": "Esta informação aparecerá no relógio da criança", "defaultMessagePrefix": "Esta é a mensagem definida por defeito:", "sendMessageAndBlock": "Enviar mensagem e bloquear", - "depositAddMoney": "Adicionar dinheiro", "depositReason": "Motivo", "depositReasonWeekly": "Mesada semanal", @@ -366,12 +351,10 @@ "depositWhenSend": "Quando se envia o dinheiro", "depositNow": "Agora", "depositSchedule": "Programar", - "extractTitle": "Retirar dinheiro da conta", "extractAmountLabel": "Seleciona a quantia de dinheiro", "extractDefaultMessage": "\"Retirámos o dinheiro do relógio, já não podes pagar com ele\"", "extractMessageLabel": "Escrever mensagem a {name} sobre o motivo da retirada do dinheiro", - "lockCardTitle": "Bloqueio de cartão", "lockCardDefaultMessage": "\"De momento bloqueámos o dinheiro do relógio\"", "lockCardMessageLabel": "Escrever mensagem a {name} sobre o motivo do bloqueio", @@ -386,7 +369,6 @@ "cardStatusConfirm": "Confirmar", "cardStatusSuccess": "Estado do cartão atualizado", "cardStatusError": "Erro ao atualizar o estado do cartão", - "deleteDevice": "Eliminar dispositivo", "deleteDeviceConfirmTitle": "Eliminar dispositivo?", "deleteDeviceConfirmMessage": "Esta ação não pode ser desfeita. Tens a certeza de que queres eliminar este dispositivo?", @@ -394,7 +376,6 @@ "deleteDeviceNotAllowedTitle": "Não é possível eliminar", "deleteDeviceChecking": "A verificar...", "deleteDeviceWalletNonZeroBalance": "Não é possível eliminar o perfil porque a carteira tem saldo disponível", - "limitsSave": "Guardar limites", "limitsSpendingTitle": "Define limite de gastos", "limitsSpendingSubtitle": "Liberdade para eles, tranquilidade para ti", @@ -407,7 +388,6 @@ "limitsWeekLimit": "Semanal", "limitsMonthLimit": "Mensal", "limitsYearLimit": "Anual", - "goalsTitle": "Metas", "goalsOnlyFullPlan": "Apenas com Plano Completo", "goalsTeachSavings": "Ensina-lhe a poupar e reforça a importância de não desperdiçar o dinheiro", @@ -440,7 +420,6 @@ "goalsTasksCompletedMessage": "Parabéns, cumpriste todas as tarefas desta semana!", "goalsDeleteTaskList": "Eliminar lista de tarefas", "goalsCreateNewTaskList": "Criar uma lista de tarefas nova", - "payinSelectCard": "Seleciona um cartão", "payinNoCards": "Não tens cartões registados. Adiciona um para fazer um depósito.", "payinAddCard": "Adicionar cartão", @@ -492,7 +471,6 @@ "profileSettingsProvince": "Província", "profileSettingsState": "Estado", "profileSettingsPostCode": "Código postal", - "dashboardTabHome": "Início", "dashboardTabActivity": "Atividade", "dashboardTabNotifications": "Notificações", @@ -549,7 +527,7 @@ "appsUse": "Uso das aplicações", "topApps": "Apps mais usadas", "noAppUsageData": "Sem dados de uso de aplicações", - "selectDay": "Seleção de dias", + "selectDay": "Seleção de dias", "alarmMessage": "Mensagem", "alarmMessageHint": "Texto que o alarme exibirá", "deleteAlarm": "Eliminar alarme", @@ -596,5 +574,43 @@ "wifiBssidHint": "ex. 0c:80:63:e4:cb:e1", "editChildProfile": "Editar perfil", "editChildProfileTitle": "Editar perfil da criança", - "editChildProfileSaveSuccess": "Perfil da criança atualizado com sucesso" -} \ No newline at end of file + "editChildProfileSaveSuccess": "Perfil da criança atualizado com sucesso", + "locationMapStyleStandard": "Padrão", + "locationMapStyleVoyager": "Voyager", + "locationMapStyleLight": "Claro", + "locationMapStyleDark": "Escuro", + "locationMapStyleSatellite": "Satélite", + "locationLayerGeofences": "Zonas de segurança", + "locationLayerFrequentPlaces": "Lugares frequentes", + "locationLayerHistory": "Histórico", + "locationNewFrequentPlace": "Novo lugar frequente", + "locationNewGeofence": "Nova zona de segurança", + "locationEditGeofence": "Editar zona de segurança", + "locationEditFrequentPlace": "Editar lugar frequente", + "locationHintFrequentPlace": "Ex: Casa, Escritório...", + "locationHintGeofence": "Ex: Casa, Escola...", + "locationHintDescription": "Descrição (opcional)", + "locationCreate": "Criar", + "locationSave": "Guardar", + "locationConfirm": "Confirmar", + "locationEdit": "Editar", + "locationPlacementHint": "Mova o mapa para escolher a localização", + "locationRadius": "Raio", + "locationCoordinates": "Coordenadas", + "locationStatus": "Estado", + "locationStatusActive": "Ativa", + "locationStatusInactive": "Inativa", + "locationHistoryPosition": "Posição do histórico", + "locationDate": "Data", + "locationType": "Tipo", + "locationAddress": "Morada", + "locationPlace": "Lugar", + "locationRadiusMeters": "{radius} m", + "deleteUserDialog": "Tem certeza de que deseja eliminar este utilizador?", + "soundAndVibration": "Som e vibração", + "soundOnly": "Apenas som", + "vibrationOnly": "Apenas vibração", + "silent": "Silencioso", + "syncClockMessage": "Sincronize o relógio do dispositivo com a hora atual", + "locationWifiNetworksOptional": "Redes WiFi (opcional)" +} diff --git a/packages/sf_localizations/lib/src/generated/i18n.dart b/packages/sf_localizations/lib/src/generated/i18n.dart index 495d9e03..9b32f0d6 100755 --- a/packages/sf_localizations/lib/src/generated/i18n.dart +++ b/packages/sf_localizations/lib/src/generated/i18n.dart @@ -3,831 +3,750 @@ class I18n { const I18n._(); - static const String example = 'example'; - static const String start = 'start'; - static const String next = 'next'; - static const String skip = 'skip'; - static const String onboardingTitle1 = 'onboardingTitle1'; - static const String onboardingSubtitle1 = 'onboardingSubtitle1'; - static const String onboardingTitle2 = 'onboardingTitle2'; - static const String onboardingSubtitle2 = 'onboardingSubtitle2'; - static const String onboardingTitle3 = 'onboardingTitle3'; - static const String onboardingSubtitle3 = 'onboardingSubtitle3'; - static const String linkPhoneTitle = 'linkPhoneTitle'; - static const String linkPhoneSubtitle = 'linkPhoneSubtitle'; - static const String mobilePhone = 'mobilePhone'; - static const String phoneNumber = 'phoneNumber'; - static const String selectYourCountry = 'selectYourCountry'; - static const String errorMessagePhoneIsEmpty = 'errorMessagePhoneIsEmpty'; - static const String connect = "connect"; - static const String verificationCodeSentTo = "verificationCodeSentTo"; - static const String enterCodeHere = "enterCodeHere"; - static const String enter = "enter"; - static const String didNotReceiveIt = "didNotReceiveIt"; - static const String tryAgain = "tryAgain"; - static const String welcome = "welcome"; - static const String username = "username"; - static const String password = "password"; - static const String forgotPassword = "forgotPassword"; - static const String signIn = "signIn"; - static const String orContinueWith = "orContinueWith"; - static const String google = "google"; - static const String apple = "apple"; - static const String dontHaveAccount = "dontHaveAccount"; - static const String createOneNow = "createOneNow"; - static const String recoverPasswordTitle = 'recoverPasswordTitle'; - static const String recoverPasswordSubtitle = 'recoverPasswordSubtitle'; - static const String send = 'send'; - static const String back = 'back'; - static const String email = 'email'; - static const String errorMessageContactIsEmpty = 'errorMessageContactIsEmpty'; - static const String emailSent = 'emailSent'; - static const String smsSent = 'smsSent'; - static const String checkEmail1 = 'checkEmail1'; - static const String checkSms1 = 'checkSms1'; - static const String checkEmail2 = 'checkEmail2'; - static const String checkSms2 = 'checkSms2'; - static const String resendEmail = 'resendEmail'; - static const String resendSms = 'resendSms'; - static const String continueKey = 'continueKey'; - static const String newPassword = 'newPassword'; - static const String repeatPassword = 'repeatPassword'; - static const String passwordLength = 'passwordLength'; - static const String passwordCapital = 'passwordCapital'; - static const String passwordNumber = 'passwordNumber'; - static const String passwordSpecial = 'passwordSpecial'; static const String accept = 'accept'; - static const String errorMessageUnequalPasswords = - 'errorMessageUnequalPasswords'; - static const String errorMessagePasswordTooShort = - 'errorMessagePasswordTooShort'; - static const String errorMessagePasswordNoCapitals = - 'errorMessagePasswordNoCapitals'; - static const String errorMessagePasswordNoNumbers = - 'errorMessagePasswordNoNumbers'; - static const String errorMessagePasswordNoSpecialChars = - 'errorMessagePasswordNoSpecialChars'; - static const String errorEmailRequired = 'errorEmailRequired'; - static const String errorEmailInvalid = 'errorEmailInvalid'; - static const String errorPasswordRequired = 'errorPasswordRequired'; - static const String errorPasswordMinLength = 'errorPasswordMinLength'; - static const String twoFactorTitle = 'twoFactorTitle'; - static const String twoFactorSubtitle = 'twoFactorSubtitle'; - static const String twoFactorCodeLabel = 'twoFactorCodeLabel'; - static const String twoFactorCodeHint = 'twoFactorCodeHint'; - static const String twoFactorVerify = 'twoFactorVerify'; - static const String twoFactorResend = 'twoFactorResend'; - static const String twoFactorCodeResent = 'twoFactorCodeResent'; - static const String close = 'close'; - static const String errorTwoFactorCodeRequired = 'errorTwoFactorCodeRequired'; - static const String errorTwoFactorCodeInvalidLength = - 'errorTwoFactorCodeInvalidLength'; - static const String errorTwoFactorCodeInvalid = 'errorTwoFactorCodeInvalid'; - static const String errorTwoFactorNoMethods = 'errorTwoFactorNoMethods'; - static const String errorTwoFactorResendFailed = 'errorTwoFactorResendFailed'; - static const String loginSuccess = 'loginSuccess'; - - static const String stepUserContactSupertitle = 'stepUserContactSupertitle'; - static const String stepUserContactTitle = 'stepUserContactTitle'; - static const String stepUserContactSubtitle = 'stepUserContactSubtitle'; - - static const String termsText = 'termsText'; - - static const String firstNameLabel = 'firstNameLabel'; - static const String firstNameHint = 'firstNameHint'; - static const String lastNameLabel = 'lastNameLabel'; - static const String lastNameHint = 'lastNameHint'; - - static const String documentTypeHint = 'documentTypeHint'; - static const String documentTypeDni = 'documentTypeDni'; - static const String documentTypeNie = 'documentTypeNie'; - static const String documentTypePassport = 'documentTypePassport'; - static const String documentNumberHint = 'documentNumberHint'; - - static const String phoneLabel = 'phoneLabel'; - static const String phoneHint = 'phoneHint'; - static const String emailLabel = 'emailLabel'; - static const String emailHint = 'emailHint'; - - static const String stepPersonalDataSupertitle = 'stepPersonalDataSupertitle'; - static const String stepPersonalDataTitle = 'stepPersonalDataTitle'; - static const String stepPersonalDataSubtitle = 'stepPersonalDataSubtitle'; - - static const String relationshipLabel = 'relationshipLabel'; - static const String relationshipHint = 'relationshipHint'; - static const String relationshipFather = 'relationshipFather'; - static const String relationshipMother = 'relationshipMother'; - static const String relationshipTutor = 'relationshipTutor'; - - static const String addressCountryLabel = 'addressCountryLabel'; - static const String addressCountryHint = 'addressCountryHint'; - - static const String birthDateLabel = 'birthDateLabel'; - static const String birthDateHint = 'birthDateHint'; - - static const String placeOfBirthLabel = 'placeOfBirthLabel'; - static const String placeOfBirthHint = 'placeOfBirthHint'; - - static const String birthCountryLabel = 'birthCountryLabel'; - static const String birthCountryHint = 'birthCountryHint'; - - static const String streetLabel = 'streetLabel'; - static const String streetHint = 'streetHint'; - - static const String cityLabel = 'cityLabel'; - static const String cityHint = 'cityHint'; - - static const String provinceLabel = 'provinceLabel'; - static const String provinceHint = 'provinceHint'; - - static const String stateLabel = 'stateLabel'; - static const String stateHint = 'stateHint'; - - static const String postCodeLabel = 'postCodeLabel'; - static const String postCodeHint = 'postCodeHint'; - - static const String stepAddressSupertitle = 'stepAddressSupertitle'; - static const String stepAddressTitle = 'stepAddressTitle'; - static const String passwordRulesSubtitle = 'passwordRulesSubtitle'; - - static const String accountCreatedTitle = 'accountCreatedTitle'; - static const String accountCreatedForLabel = 'accountCreatedForLabel'; - static const String accountCreatedEmailVerificationSentLabel = - 'accountCreatedEmailVerificationSentLabel'; - static const String accountCreatedChildSetupHint = - 'accountCreatedChildSetupHint'; + static const String accountCreatedChildSetupHint = 'accountCreatedChildSetupHint'; static const String accountCreatedContinue = 'accountCreatedContinue'; - static const String secretCodeTitle = 'secretCodeTitle'; - static const String secretCodeStep1Title = 'secretCodeStep1Title'; - static const String secretCodeStep1Body = 'secretCodeStep1Body'; - static const String secretCodeStep2Title = 'secretCodeStep2Title'; - static const String secretCodeStep2Body = 'secretCodeStep2Body'; - static const String secretCodeKeyCopied = 'secretCodeKeyCopied'; - static const String secretCodeStep3Title = 'secretCodeStep3Title'; - static const String secretCodeStep3Body = 'secretCodeStep3Body'; - static const String secretCodeConfigure = 'secretCodeConfigure'; - static const String deviceSetup_intro_title = 'deviceSetup_intro_title'; - static const String deviceSetup_intro_subtitle = 'deviceSetup_intro_subtitle'; - static const String deviceSetup_intro_step_1 = 'deviceSetup_intro_step_1'; - static const String deviceSetup_intro_step_2 = 'deviceSetup_intro_step_2'; - static const String deviceSetup_intro_step_3 = 'deviceSetup_intro_step_3'; - static const String deviceSetup_intro_ready_title = - 'deviceSetup_intro_ready_title'; - static const String deviceSetup_intro_remember_prefix = - 'deviceSetup_intro_remember_prefix'; - static const String deviceSetup_intro_plan_name = - 'deviceSetup_intro_plan_name'; - static const String deviceSetup_intro_web_prefix = - 'deviceSetup_intro_web_prefix'; - static const String deviceSetup_intro_web_link = 'deviceSetup_intro_web_link'; - static const String deviceSetup_linkInfo_title = 'deviceSetup_linkInfo_title'; - static const String legacy_deviceSetup_linkInfo_title = - 'legacy_deviceSetup_linkInfo_title'; - static const String legacy_deviceSetup_linkInfo_item1_title = - 'legacy_deviceSetup_linkInfo_item1_title'; - static const String legacy_deviceSetup_linkInfo_item1_subtitle = - 'legacy_deviceSetup_linkInfo_item1_subtitle'; - static const String legacy_deviceSetup_linkInfo_item2_title = - 'legacy_deviceSetup_linkInfo_item2_title'; - static const String legacy_deviceSetup_linkInfo_item2_subtitle = - 'legacy_deviceSetup_linkInfo_item2_subtitle'; - static const String legacy_deviceSetup_scanWatch_title = - 'legacy_deviceSetup_scanWatch_title'; - static const String legacy_deviceSetup_linkTroubleshoot_title = - 'legacy_deviceSetup_linkTroubleshoot_title'; - static const String legacy_deviceSetup_accountData_info = - 'legacy_deviceSetup_accountData_info'; - static const String deviceSetup_linkInfo_item1_prefix = - 'deviceSetup_linkInfo_item1_prefix'; - static const String deviceSetup_linkInfo_item1_boldWord = - 'deviceSetup_linkInfo_item1_boldWord'; - static const String deviceSetup_linkInfo_item1_subtitle = - 'deviceSetup_linkInfo_item1_subtitle'; - static const String deviceSetup_linkInfo_item2_prefix = - 'deviceSetup_linkInfo_item2_prefix'; - static const String deviceSetup_linkInfo_item2_boldWord = - 'deviceSetup_linkInfo_item2_boldWord'; - static const String deviceSetup_linkInfo_item2_subtitle = - 'deviceSetup_linkInfo_item2_subtitle'; - static const String deviceSetup_watchCode_orInsert = - 'deviceSetup_watchCode_orInsert'; - static const String deviceSetup_watchCode_continueWithCode = - 'deviceSetup_watchCode_continueWithCode'; - static const String deviceSetup_linkTroubleshoot_title = - 'deviceSetup_linkTroubleshoot_title'; - static const String deviceSetup_contactUs = 'deviceSetup_contactUs'; - static const String deviceSetup_accountData_info = - 'deviceSetup_accountData_info'; - static const String deviceSetup_startWithOneKid_info = - 'deviceSetup_startWithOneKid_info'; - static const String deviceSetup_firstAllowance_title = - 'deviceSetup_firstAllowance_title'; - static const String deviceSetup_addAnotherKid = 'deviceSetup_addAnotherKid'; - static const String deviceSetup_start = 'deviceSetup_start'; - static const String deviceSetup_giveFirstAllowance = - 'deviceSetup_giveFirstAllowance'; - static const String deviceSetup_paymentCancelled = - 'deviceSetup_paymentCancelled'; - static const String deviceSetup_skipAndConfigureLater = - 'deviceSetup_skipAndConfigureLater'; - static const String deviceSetup_paymentSuccess = 'deviceSetup_paymentSuccess'; - static const String deviceSetup_scanQr = 'deviceSetup_scanQr'; - static const String deviceSetup_scanQr_hint = 'deviceSetup_scanQr_hint'; - static const String errorScanStrapRequired = 'errorScanStrapRequired'; - static const String errorScanWatchRequired = 'errorScanWatchRequired'; - static const String errorAllFieldsRequired = 'errorAllFieldsRequired'; - static const String errorPinRequired = 'errorPinRequired'; - static const String errorSigningOperation = 'errorSigningOperation'; - static const String errorFirstNameRequired = 'errorFirstNameRequired'; - static const String errorLastNameRequired = 'errorLastNameRequired'; - static const String errorNameInvalidChars = 'errorNameInvalidChars'; - static const String errorEmailPlusNotAllowed = 'errorEmailPlusNotAllowed'; - static const String errorDocumentTypeRequired = 'errorDocumentTypeRequired'; - static const String errorDocumentNumberRequired = - 'errorDocumentNumberRequired'; - static const String errorAcceptTerms = 'errorAcceptTerms'; - static const String errorBirthDateRequired = 'errorBirthDateRequired'; - static const String errorRelationshipRequired = 'errorRelationshipRequired'; - static const String errorPlaceOfBirthRequired = 'errorPlaceOfBirthRequired'; - static const String errorBirthCountryRequired = 'errorBirthCountryRequired'; - static const String errorAddressRequired = 'errorAddressRequired'; - static const String errorActivationCodeEmpty = 'errorActivationCodeEmpty'; - static const String errorWalletNotProvisioned = 'errorWalletNotProvisioned'; - static const String errorPinLength = 'errorPinLength'; - static const String errorWalletConnectFirst = 'errorWalletConnectFirst'; - static const String errorPinMismatch = 'errorPinMismatch'; - static const String scaPinCreate = 'scaPinCreate'; - static const String scaPinConfirm = 'scaPinConfirm'; - static const String scaPinEnter = 'scaPinEnter'; - static const String scaProvisioningFailed = 'scaProvisioningFailed'; - static const String scaProvisioningWarning = 'scaProvisioningWarning'; - static const String scaProvisioningRetry = 'scaProvisioningRetry'; - static const String scaProvisioning = 'scaProvisioning'; - static const String scaConnecting = 'scaConnecting'; - static const String scaSigning = 'scaSigning'; - static const String scaConnect = 'scaConnect'; - static const String scaClearPin = 'scaClearPin'; - static const String scaErrorLoadingActivationCode = - 'scaErrorLoadingActivationCode'; - static const String scaErrorProvisioning = 'scaErrorProvisioning'; - static const String scaErrorConnecting = 'scaErrorConnecting'; - static const String scaErrorSigning = 'scaErrorSigning'; - static const String scaErrorPaymentProfile = 'scaErrorPaymentProfile'; - static const String deviceSetupCreatingProfile = 'deviceSetupCreatingProfile'; - static const String deviceSetupConfirm = 'deviceSetupConfirm'; - static const String errorLoadingData = 'errorLoadingData'; - static const String errorEmailAlreadyRegistered = 'errorEmailAlreadyRegistered'; - static const String retry = 'retry'; - static const String walletTitle = 'walletTitle'; - static const String walletTotal = 'walletTotal'; - static const String walletAvailable = 'walletAvailable'; - static const String walletSavings = 'walletSavings'; - static const String depositTitle = 'depositTitle'; - static const String depositAmountLabel = 'depositAmountLabel'; - static const String depositAmountHint = 'depositAmountHint'; - static const String depositButton = 'depositButton'; - static const String depositMaxInfo = 'depositMaxInfo'; - static const String depositErrorMaxExceeded = 'depositErrorMaxExceeded'; - static const String expensesTitle = 'expensesTitle'; - static const String filterToday = 'filterToday'; - static const String filterThisWeek = 'filterThisWeek'; - static const String filterThisMonth = 'filterThisMonth'; - static const String activityRecentTransactions = 'activityRecentTransactions'; - static const String activityViewTransactionsFrom = - 'activityViewTransactionsFrom'; - static const String activityNoWallets = 'activityNoWallets'; + static const String accountCreatedEmailVerificationSentLabel = 'accountCreatedEmailVerificationSentLabel'; + static const String accountCreatedForLabel = 'accountCreatedForLabel'; + static const String accountCreatedTitle = 'accountCreatedTitle'; + static const String accountDetails = 'accountDetails'; + static const String accountDocumentError = 'accountDocumentError'; + static const String accountSettings = 'accountSettings'; + static const String accountStatement = 'accountStatement'; + static const String activationCodeMessage = 'activationCodeMessage'; + static const String activationKeyLabel = 'activationKeyLabel'; + static const String activityMeter = 'activityMeter'; static const String activityNoTransactions = 'activityNoTransactions'; - static const String dateFilterToday = 'dateFilterToday'; - static const String dateFilterLastWeek = 'dateFilterLastWeek'; - static const String dateFilterLastMonth = 'dateFilterLastMonth'; - static const String transactionPayin = 'transactionPayin'; - static const String transactionPayinRefund = 'transactionPayinRefund'; - static const String transactionPayout = 'transactionPayout'; - static const String transactionPayoutRefund = 'transactionPayoutRefund'; - static const String transactionTransfer = 'transactionTransfer'; - static const String transactionCardPayment = 'transactionCardPayment'; - static const String transactionPayinAcquiring = 'transactionPayinAcquiring'; - static const String transactionPayinRefundAcquiring = - 'transactionPayinRefundAcquiring'; - static const String transactionSctrInst = 'transactionSctrInst'; - static const String transactionPayinSctInstantRecall = - 'transactionPayinSctInstantRecall'; - static const String transactionPayoutSctInstantEmit = - 'transactionPayoutSctInstantEmit'; - static const String transactionPayinSctInstantEmitRecall = - 'transactionPayinSctInstantEmitRecall'; - static const String transactionCreditTransferReturned = - 'transactionCreditTransferReturned'; - static const String transactionCheckPayin = 'transactionCheckPayin'; - static const String transactionSdde = 'transactionSdde'; - static const String transactionSddr = 'transactionSddr'; - static const String transactionSddrReversal = 'transactionSddrReversal'; - static const String transactionSctrRecall = 'transactionSctrRecall'; - static const String transactionCheckRefund = 'transactionCheckRefund'; - static const String transactionSctr = 'transactionSctr'; - static const String transactionCreditInternationalTransfer = - 'transactionCreditInternationalTransfer'; - static const String transactionBankDirectDebit = 'transactionBankDirectDebit'; - static const String transactionBankTransfer = 'transactionBankTransfer'; - static const String transactionCardTopup = 'transactionCardTopup'; - static const String transactionCheck = 'transactionCheck'; - static const String transactionCreditNote = 'transactionCreditNote'; - static const String transactionFees = 'transactionFees'; - static const String transactionInstantBankTransfer = 'transactionInstantBankTransfer'; - static const String transactionWalletTransfer = 'transactionWalletTransfer'; - static const String transactionUnknown = 'transactionUnknown'; - static const String loadMore = 'loadMore'; - static const String transactionsShown = 'transactionsShown'; - static const String profileAccountSettings = 'profileAccountSettings'; - static const String profileWithdrawMoney = 'profileWithdrawMoney'; - static const String profileNoRecentTransactions = - 'profileNoRecentTransactions'; - static const String profileRecentTransactions = 'profileRecentTransactions'; - static const String profileMyAccount = 'profileMyAccount'; + static const String activityNoWallets = 'activityNoWallets'; + static const String activityRecentTransactions = 'activityRecentTransactions'; + static const String activityViewTransactionsFrom = 'activityViewTransactionsFrom'; + static const String add = 'add'; + static const String addAlarm = 'addAlarm'; + static const String addAllowedNumber = 'addAllowedNumber'; + static const String addNewSF = 'addNewSF'; + static const String addSosContact = 'addSosContact'; + static const String addWifiNetwork = 'addWifiNetwork'; + static const String addressCountryHint = 'addressCountryHint'; + static const String addressCountryLabel = 'addressCountryLabel'; + static const String alarm = 'alarm'; + static const String alarmCreated = 'alarmCreated'; + static const String alarmDeleted = 'alarmDeleted'; + static const String alarmMessage = 'alarmMessage'; + static const String alarmMessageHint = 'alarmMessageHint'; + static const String alarmSettings = 'alarmSettings'; + static const String alarmUpdated = 'alarmUpdated'; + static const String alarmsMessage = 'alarmsMessage'; + static const String allowanceActivateAutoAllowance = 'allowanceActivateAutoAllowance'; static const String allowanceAutoAllowance = 'allowanceAutoAllowance'; - static const String allowanceActivateAutoAllowance = - 'allowanceActivateAutoAllowance'; static const String allowanceBalanceAfter = 'allowanceBalanceAfter'; - static const String allowanceFrequency = 'allowanceFrequency'; - static const String allowanceFrequencyDescription = - 'allowanceFrequencyDescription'; - static const String allowanceWeekly = 'allowanceWeekly'; static const String allowanceBiweekly = 'allowanceBiweekly'; - static const String allowanceMonthly = 'allowanceMonthly'; - static const String allowanceDayOfWeek = 'allowanceDayOfWeek'; - static const String allowanceTimeOfDay = 'allowanceTimeOfDay'; - static const String allowanceMessageLabel = 'allowanceMessageLabel'; - static const String allowanceMessageHint = 'allowanceMessageHint'; - static const String allowanceMaxChars = 'allowanceMaxChars'; + static const String allowanceConditionNoIncidents = 'allowanceConditionNoIncidents'; + static const String allowanceConditionPauseHolidays = 'allowanceConditionPauseHolidays'; + static const String allowanceConditionWeeklyLimits = 'allowanceConditionWeeklyLimits'; static const String allowanceConditions = 'allowanceConditions'; - static const String allowanceConditionsDescription = - 'allowanceConditionsDescription'; - static const String allowanceConditionWeeklyLimits = - 'allowanceConditionWeeklyLimits'; - static const String allowanceConditionNoIncidents = - 'allowanceConditionNoIncidents'; - static const String allowanceConditionPauseHolidays = - 'allowanceConditionPauseHolidays'; - static const String homeGreeting = 'homeGreeting'; - static const String homeAddAnotherKid = 'homeAddAnotherKid'; - static const String homeInPiggyBank = 'homeInPiggyBank'; - static const String homeSaved = 'homeSaved'; - static const String homeEdit = 'homeEdit'; - static const String homeAddMoney = 'homeAddMoney'; - static const String homeCamera = 'homeCamera'; - static const String homePhotoGallery = 'homePhotoGallery'; + static const String allowanceConditionsDescription = 'allowanceConditionsDescription'; + static const String allowanceDayOfWeek = 'allowanceDayOfWeek'; + static const String allowanceFrequency = 'allowanceFrequency'; + static const String allowanceFrequencyDescription = 'allowanceFrequencyDescription'; + static const String allowanceMaxChars = 'allowanceMaxChars'; + static const String allowanceMessageHint = 'allowanceMessageHint'; + static const String allowanceMessageLabel = 'allowanceMessageLabel'; + static const String allowanceMonthly = 'allowanceMonthly'; + static const String allowanceTimeOfDay = 'allowanceTimeOfDay'; + static const String allowanceWeekly = 'allowanceWeekly'; + static const String allowedNumbersCount = 'allowedNumbersCount'; + static const String appStore = 'appStore'; + static const String appUsers = 'appUsers'; + static const String apple = 'apple'; + static const String appsSurveillance = 'appsSurveillance'; + static const String appsUse = 'appsUse'; + static const String average = 'average'; + static const String back = 'back'; + static const String battery = 'battery'; + static const String bestDay = 'bestDay'; + static const String birthCountryHint = 'birthCountryHint'; + static const String birthCountryLabel = 'birthCountryLabel'; + static const String birthDateHint = 'birthDateHint'; + static const String birthDateLabel = 'birthDateLabel'; + static const String blockPhone = 'blockPhone'; + static const String bloodPressure = 'bloodPressure'; + static const String bpm = 'bpm'; + static const String calendar = 'calendar'; + static const String call = 'call'; + static const String callWatch = 'callWatch'; static const String cancel = 'cancel'; - static const String payoutTitle = 'payoutTitle'; - static const String payoutSubtitle = 'payoutSubtitle'; - static const String payoutAmountLabel = 'payoutAmountLabel'; - static const String payoutIbanLabel = 'payoutIbanLabel'; - static const String payoutHolderNameLabel = 'payoutHolderNameLabel'; - static const String payoutHolderNameHint = 'payoutHolderNameHint'; - static const String payoutButton = 'payoutButton'; - static const String payoutSuccess = 'payoutSuccess'; - static const String payoutErrorAmountExceeds = 'payoutErrorAmountExceeds'; - static const String payoutErrorAmountRequired = 'payoutErrorAmountRequired'; - static const String payoutErrorIbanRequired = 'payoutErrorIbanRequired'; - static const String payoutErrorHolderRequired = 'payoutErrorHolderRequired'; - static const String payoutAvailableBalance = 'payoutAvailableBalance'; - static const String payoutPinTitle = 'payoutPinTitle'; - static const String payoutNoBeneficiaries = 'payoutNoBeneficiaries'; - static const String payoutAddBeneficiary = 'payoutAddBeneficiary'; - static const String payoutAddBeneficiarySubtitle = - 'payoutAddBeneficiarySubtitle'; - static const String payoutBeneficiaryAdded = 'payoutBeneficiaryAdded'; - - // Child Wallet - static const String childWalletAvailableBalance = - 'childWalletAvailableBalance'; - static const String childWalletUnlockCard = 'childWalletUnlockCard'; - static const String childWalletLockCard = 'childWalletLockCard'; - static const String childWalletRecentTransactions = - 'childWalletRecentTransactions'; - static const String childWalletViewAll = 'childWalletViewAll'; - static const String childWalletBalancePrefix = 'childWalletBalancePrefix'; - - // Wallet Actions Bar - static const String walletActionAdd = 'walletActionAdd'; - static const String walletActionAllowance = 'walletActionAllowance'; - static const String walletActionLimits = 'walletActionLimits'; - static const String walletActionGoals = 'walletActionGoals'; - static const String walletActionExtract = 'walletActionExtract'; - - // Shared - static const String watchInfo = 'watchInfo'; - static const String defaultMessagePrefix = 'defaultMessagePrefix'; - static const String sendMessageAndBlock = 'sendMessageAndBlock'; - - // Deposit - static const String depositAddMoney = 'depositAddMoney'; - static const String depositReason = 'depositReason'; - static const String depositReasonWeekly = 'depositReasonWeekly'; - static const String depositReasonGoalMet = 'depositReasonGoalMet'; - static const String depositReasonExtraordinary = 'depositReasonExtraordinary'; - static const String depositReasonOther = 'depositReasonOther'; - static const String depositMessageLabel = 'depositMessageLabel'; - static const String depositWhenSend = 'depositWhenSend'; - static const String depositNow = 'depositNow'; - static const String depositSchedule = 'depositSchedule'; - - // Extract - static const String extractTitle = 'extractTitle'; - static const String extractAmountLabel = 'extractAmountLabel'; - static const String extractDefaultMessage = 'extractDefaultMessage'; - static const String extractMessageLabel = 'extractMessageLabel'; - - // Lock Card - static const String lockCardTitle = 'lockCardTitle'; - static const String lockCardDefaultMessage = 'lockCardDefaultMessage'; - static const String lockCardMessageLabel = 'lockCardMessageLabel'; - static const String lockCardPinTitle = 'lockCardPinTitle'; - static const String lockCardSuccess = 'lockCardSuccess'; - static const String lockCardError = 'lockCardError'; - - // Card Status - static const String cardStatusTitle = 'cardStatusTitle'; + static const String cardStatusConfirm = 'cardStatusConfirm'; + static const String cardStatusError = 'cardStatusError'; static const String cardStatusLock = 'cardStatusLock'; - static const String cardStatusUnlock = 'cardStatusUnlock'; static const String cardStatusLost = 'cardStatusLost'; static const String cardStatusStolen = 'cardStatusStolen'; - static const String cardStatusConfirm = 'cardStatusConfirm'; static const String cardStatusSuccess = 'cardStatusSuccess'; - static const String cardStatusError = 'cardStatusError'; - - // Device - static const String deleteDevice = 'deleteDevice'; - static const String deleteDeviceConfirmTitle = 'deleteDeviceConfirmTitle'; - static const String deleteDeviceConfirmMessage = 'deleteDeviceConfirmMessage'; - static const String deleteDeviceSuccess = 'deleteDeviceSuccess'; - static const String deleteDeviceNotAllowedTitle = 'deleteDeviceNotAllowedTitle'; - static const String deleteDeviceChecking = 'deleteDeviceChecking'; - static const String deleteDeviceWalletNonZeroBalance = 'deleteDeviceWalletNonZeroBalance'; - - // Limits - static const String limitsSave = 'limitsSave'; - static const String limitsSpendingTitle = 'limitsSpendingTitle'; - static const String limitsSpendingSubtitle = 'limitsSpendingSubtitle'; - static const String limitsAllowedHours = 'limitsAllowedHours'; - static const String limitsAllowedHoursSubtitle = 'limitsAllowedHoursSubtitle'; - static const String limitsBlockedStores = 'limitsBlockedStores'; - static const String limitsSaveSuccess = 'limitsSaveSuccess'; - static const String limitsSaveError = 'limitsSaveError'; - static const String limitsDayLimit = 'limitsDayLimit'; - static const String limitsWeekLimit = 'limitsWeekLimit'; - static const String limitsMonthLimit = 'limitsMonthLimit'; - static const String limitsYearLimit = 'limitsYearLimit'; - - // Goals - static const String goalsTitle = 'goalsTitle'; - static const String goalsOnlyFullPlan = 'goalsOnlyFullPlan'; - static const String goalsTeachSavings = 'goalsTeachSavings'; - static const String goalsSavings = 'goalsSavings'; - static const String goalsCreateSavingsGoal = 'goalsCreateSavingsGoal'; - static const String goalsViewSavingsStatus = 'goalsViewSavingsStatus'; - static const String goalsSubscribeFullPlan = 'goalsSubscribeFullPlan'; - static const String goalsSavingsNameHint = 'goalsSavingsNameHint'; - static const String goalsSavingsReasonLabel = 'goalsSavingsReasonLabel'; - static const String goalsSavingsAmountLabel = 'goalsSavingsAmountLabel'; - static const String goalsAutoSavingsFromAllowance = - 'goalsAutoSavingsFromAllowance'; - static const String goalsSelectAmount = 'goalsSelectAmount'; - static const String goalsAutoSendOnGoal = 'goalsAutoSendOnGoal'; - static const String goalsDefaultMessagePrefix = 'goalsDefaultMessagePrefix'; - static const String goalsSavingsDefaultMessage = 'goalsSavingsDefaultMessage'; - static const String goalsWriteOtherMessage = 'goalsWriteOtherMessage'; - static const String goalsSaveChanges = 'goalsSaveChanges'; - static const String goalsSavingsFor = 'goalsSavingsFor'; - static const String goalsSaved = 'goalsSaved'; - static const String goalsAddExtraMoney = 'goalsAddExtraMoney'; - static const String goalsDelete = 'goalsDelete'; - static const String goalsCreateAnotherSavings = 'goalsCreateAnotherSavings'; - static const String goalsTasks = 'goalsTasks'; - static const String goalsTasksDescription = 'goalsTasksDescription'; - static const String goalsCreateTaskList = 'goalsCreateTaskList'; - static const String goalsTaskList = 'goalsTaskList'; - static const String goalsAddTask = 'goalsAddTask'; - static const String goalsRewardForCompletion = 'goalsRewardForCompletion'; - static const String goalsTasksCompletedMessagePrefix = - 'goalsTasksCompletedMessagePrefix'; - static const String goalsTasksCompletedMessage = 'goalsTasksCompletedMessage'; - static const String goalsDeleteTaskList = 'goalsDeleteTaskList'; - static const String goalsCreateNewTaskList = 'goalsCreateNewTaskList'; - - // Wallet Move - static const String walletMoveSuccess = 'walletMoveSuccess'; - static const String walletMoveError = 'walletMoveError'; - static const String walletMoveAmountRequired = 'walletMoveAmountRequired'; - static const String walletMoveProcessing = 'walletMoveProcessing'; - - // Profile Settings - static const String profileSettingsTitle = 'profileSettingsTitle'; - static const String profileSettingsLoadError = 'profileSettingsLoadError'; - static const String profileSettingsPersonalData = - 'profileSettingsPersonalData'; - static const String profileSettingsName = 'profileSettingsName'; - static const String profileSettingsBirthDate = 'profileSettingsBirthDate'; - static const String profileSettingsNationality = 'profileSettingsNationality'; - static const String profileSettingsPlaceOfBirth = - 'profileSettingsPlaceOfBirth'; - static const String profileSettingsAddress = 'profileSettingsAddress'; - static const String profileSettingsCountry = 'profileSettingsCountry'; - static const String profileSettingsUser = 'profileSettingsUser'; - static const String profileSettingsEmail = 'profileSettingsEmail'; - static const String profileSettingsPhone = 'profileSettingsPhone'; - static const String profileSettingsPaymentMethod = - 'profileSettingsPaymentMethod'; - static const String profileSettingsEdit = 'profileSettingsEdit'; - static const String profileSettingsPaymentMethodHint = - 'profileSettingsPaymentMethodHint'; - static const String profileSettingsAnnualPlan = 'profileSettingsAnnualPlan'; - static const String profileSettingsChangePlan = 'profileSettingsChangePlan'; - static const String profileSettingsNoPermanence = - 'profileSettingsNoPermanence'; - static const String profileSettingsUnlimitedCalls = - 'profileSettingsUnlimitedCalls'; - static const String profileSettingsFreeMonths = 'profileSettingsFreeMonths'; - static const String profileSettingsContactUs = 'profileSettingsContactUs'; - static const String profileSettingsFaq = 'profileSettingsFaq'; - static const String profileSettingsLogout = 'profileSettingsLogout'; - static const String profileSettingsLogoutConfirm = - 'profileSettingsLogoutConfirm'; - static const String profileSettingsLogoutError = 'profileSettingsLogoutError'; - static const String profileSettingsSave = 'profileSettingsSave'; - static const String profileSettingsSaveSuccess = 'profileSettingsSaveSuccess'; - static const String profileSettingsLastName = 'profileSettingsLastName'; - static const String profileSettingsStreet = 'profileSettingsStreet'; - static const String profileSettingsCity = 'profileSettingsCity'; - static const String profileSettingsProvince = 'profileSettingsProvince'; - static const String profileSettingsState = 'profileSettingsState'; - static const String profileSettingsPostCode = 'profileSettingsPostCode'; - - // Account Documents - static const String accountDetails = 'accountDetails'; - static const String accountStatement = 'accountStatement'; - static const String accountDocumentError = 'accountDocumentError'; - static const String selectMonth = 'selectMonth'; - static const String selectYear = 'selectYear'; - static const String statementCurrentMonthError = 'statementCurrentMonthError'; - static const String download = 'download'; - - // Device Setup - Add Credit Card - static const String deviceSetup_addCreditCard = 'deviceSetup_addCreditCard'; - static const String deviceSetup_addCreditCard_title = - 'deviceSetup_addCreditCard_title'; - static const String deviceSetup_addCreditCard_subtitle = - 'deviceSetup_addCreditCard_subtitle'; - static const String deviceSetup_addCreditCard_info = - 'deviceSetup_addCreditCard_info'; - static const String deviceSetup_cardRegistered = 'deviceSetup_cardRegistered'; - - // Payin - static const String payinSelectCard = 'payinSelectCard'; - static const String payinNoCards = 'payinNoCards'; - static const String payinAddCard = 'payinAddCard'; - static const String payinDeposit = 'payinDeposit'; - static const String payinSuccess = 'payinSuccess'; - static const String payinError = 'payinError'; - static const String payinProcessing = 'payinProcessing'; - - // Dashboard Tabs - static const String dashboardTabHome = 'dashboardTabHome'; + static const String cardStatusTitle = 'cardStatusTitle'; + static const String cardStatusUnlock = 'cardStatusUnlock'; + static const String changePassword = 'changePassword'; + static const String channelAmazon = 'channelAmazon'; + static const String channelOnline = 'channelOnline'; + static const String channelStore = 'channelStore'; + static const String chat = 'chat'; + static const String checkEmail1 = 'checkEmail1'; + static const String checkEmail2 = 'checkEmail2'; + static const String checkSms1 = 'checkSms1'; + static const String checkSms2 = 'checkSms2'; + static const String childWalletAvailableBalance = 'childWalletAvailableBalance'; + static const String childWalletBalancePrefix = 'childWalletBalancePrefix'; + static const String childWalletLockCard = 'childWalletLockCard'; + static const String childWalletRecentTransactions = 'childWalletRecentTransactions'; + static const String childWalletUnlockCard = 'childWalletUnlockCard'; + static const String childWalletViewAll = 'childWalletViewAll'; + static const String cityHint = 'cityHint'; + static const String cityLabel = 'cityLabel'; + static const String close = 'close'; + static const String confirm = 'confirm'; + static const String connect = 'connect'; + static const String contactEmailLabel = 'contactEmailLabel'; + static const String contactName = 'contactName'; + static const String contactTitle = 'contactTitle'; + static const String contacts = 'contacts'; + static const String contactsEmpty = 'contactsEmpty'; + static const String contactsEmptyHint = 'contactsEmptyHint'; + static const String continueKey = 'continueKey'; + static const String continueWithGoogle = 'continueWithGoogle'; + static const String copy = 'copy'; + static const String createOneNow = 'createOneNow'; + static const String custom = 'custom'; + static const String customerService = 'customerService'; + static const String daily = 'daily'; static const String dashboardTabActivity = 'dashboardTabActivity'; + static const String dashboardTabHome = 'dashboardTabHome'; static const String dashboardTabNotifications = 'dashboardTabNotifications'; static const String dashboardTabProfile = 'dashboardTabProfile'; - static const String customerService = 'customerService'; - static const String sfPay = 'sfPay'; - static const String functions = 'functions'; - static const String accountSettings = 'accountSettings'; - static const String deviceSettings = 'deviceSettings'; - static const String watchesOnMap = 'watchesOnMap'; - static const String home = 'home'; - static const String location = 'location'; - static const String chat = 'chat'; - static const String channelOnline = 'channelOnline'; - static const String channelAmazon = 'channelAmazon'; - static const String channelStore = 'channelStore'; - static const String other = 'other'; - static const String supportWebsite = 'supportWebsite'; - static const String supportHelp = 'supportHelp'; - static const String contactTitle = 'contactTitle'; - static const String selectCountry = 'selectCountry'; - static const String selectChannel = 'selectChannel'; - static const String enterName = 'enterName'; - static const String enterEmail = 'enterEmail'; - static const String enterSubject = 'enterSubject'; - static const String enterMessage = 'enterMessage'; - static const String sendEmail = 'sendEmail'; - static const String personalData = 'personalData'; - static const String changePassword = 'changePassword'; - static const String addNewSF = 'addNewSF'; - static const String linkedDevices = 'linkedDevices'; - static const String appUsers = 'appUsers'; - static const String privacyPolicy = 'privacyPolicy'; - static const String logOut = 'logOut'; - static const String passwordLabel = 'passwordLabel'; - static const String submit = 'submit'; - static const String save = 'save'; - static const String editDeviceTitle = 'editDeviceTitle'; - static const String name = 'name'; - static const String deleteDeviceDialog = 'deleteDeviceDialog'; - static const String deleteUserDialog = 'deleteUserDialog'; + static const String dateFilterLastMonth = 'dateFilterLastMonth'; + static const String dateFilterLastWeek = 'dateFilterLastWeek'; + static const String dateFilterToday = 'dateFilterToday'; + static const String defaultMessagePrefix = 'defaultMessagePrefix'; static const String delete = 'delete'; - static const String userAccount = 'userAccount'; - static const String userRole = 'userRole'; - static const String copy = 'copy'; - static const String deviceIdLabel = 'deviceIdLabel'; - static const String regCodeLabel = 'regCodeLabel'; - static const String regCode = 'regCode'; static const String deleteAccount = 'deleteAccount'; static const String deleteAccountBody1 = 'deleteAccountBody1'; static const String deleteAccountBody2 = 'deleteAccountBody2'; - static const String requestCancelButton = 'requestCancelButton'; - static const String verifyAccount = 'verifyAccount'; - static const String requestCancelTitle = 'requestCancelTitle'; - static const String requestCancelBody = 'requestCancelBody'; + static const String deleteAlarm = 'deleteAlarm'; + static const String deleteAlarmConfirm = 'deleteAlarmConfirm'; + static const String deleteContactMessage = 'deleteContactMessage'; + static const String deleteDevice = 'deleteDevice'; + static const String deleteDeviceChecking = 'deleteDeviceChecking'; + static const String deleteDeviceConfirmMessage = 'deleteDeviceConfirmMessage'; + static const String deleteDeviceConfirmTitle = 'deleteDeviceConfirmTitle'; static const String deleteDeviceData = 'deleteDeviceData'; - static const String confirm = 'confirm'; - static const String remoteConnection = 'remoteConnection'; - static const String calendar = 'calendar'; - static const String contacts = 'contacts'; + static const String deleteDeviceDialog = 'deleteDeviceDialog'; + static const String deleteDeviceNotAllowedTitle = 'deleteDeviceNotAllowedTitle'; + static const String deleteDeviceSuccess = 'deleteDeviceSuccess'; + static const String deleteDeviceWalletNonZeroBalance = 'deleteDeviceWalletNonZeroBalance'; + static const String deleteUserDialog = 'deleteUserDialog'; + static const String depositAddMoney = 'depositAddMoney'; + static const String depositAmountHint = 'depositAmountHint'; + static const String depositAmountLabel = 'depositAmountLabel'; + static const String depositButton = 'depositButton'; + static const String depositErrorMaxExceeded = 'depositErrorMaxExceeded'; + static const String depositMaxInfo = 'depositMaxInfo'; + static const String depositMessageLabel = 'depositMessageLabel'; + static const String depositNow = 'depositNow'; + static const String depositReason = 'depositReason'; + static const String depositReasonExtraordinary = 'depositReasonExtraordinary'; + static const String depositReasonGoalMet = 'depositReasonGoalMet'; + static const String depositReasonOther = 'depositReasonOther'; + static const String depositReasonWeekly = 'depositReasonWeekly'; + static const String depositSchedule = 'depositSchedule'; + static const String depositTitle = 'depositTitle'; + static const String depositWhenSend = 'depositWhenSend'; + static const String deviceIdLabel = 'deviceIdLabel'; + static const String deviceNotConnected = 'deviceNotConnected'; + static const String deviceSettings = 'deviceSettings'; + static const String deviceSetupConfirm = 'deviceSetupConfirm'; + static const String deviceSetupCreatingProfile = 'deviceSetupCreatingProfile'; + static const String deviceSetup_accountData_info = 'deviceSetup_accountData_info'; + static const String deviceSetup_addAnotherKid = 'deviceSetup_addAnotherKid'; + static const String deviceSetup_addCreditCard = 'deviceSetup_addCreditCard'; + static const String deviceSetup_addCreditCard_info = 'deviceSetup_addCreditCard_info'; + static const String deviceSetup_addCreditCard_subtitle = 'deviceSetup_addCreditCard_subtitle'; + static const String deviceSetup_addCreditCard_title = 'deviceSetup_addCreditCard_title'; + static const String deviceSetup_cardRegistered = 'deviceSetup_cardRegistered'; + static const String deviceSetup_contactUs = 'deviceSetup_contactUs'; + static const String deviceSetup_firstAllowance_title = 'deviceSetup_firstAllowance_title'; + static const String deviceSetup_giveFirstAllowance = 'deviceSetup_giveFirstAllowance'; + static const String deviceSetup_heightHint = 'deviceSetup_heightHint'; + static const String deviceSetup_heightLabel = 'deviceSetup_heightLabel'; + static const String deviceSetup_intro_plan_name = 'deviceSetup_intro_plan_name'; + static const String deviceSetup_intro_ready_title = 'deviceSetup_intro_ready_title'; + static const String deviceSetup_intro_remember_prefix = 'deviceSetup_intro_remember_prefix'; + static const String deviceSetup_intro_step_1 = 'deviceSetup_intro_step_1'; + static const String deviceSetup_intro_step_2 = 'deviceSetup_intro_step_2'; + static const String deviceSetup_intro_step_3 = 'deviceSetup_intro_step_3'; + static const String deviceSetup_intro_subtitle = 'deviceSetup_intro_subtitle'; + static const String deviceSetup_intro_title = 'deviceSetup_intro_title'; + static const String deviceSetup_intro_web_link = 'deviceSetup_intro_web_link'; + static const String deviceSetup_intro_web_prefix = 'deviceSetup_intro_web_prefix'; + static const String deviceSetup_linkInfo_item1_boldWord = 'deviceSetup_linkInfo_item1_boldWord'; + static const String deviceSetup_linkInfo_item1_prefix = 'deviceSetup_linkInfo_item1_prefix'; + static const String deviceSetup_linkInfo_item1_subtitle = 'deviceSetup_linkInfo_item1_subtitle'; + static const String deviceSetup_linkInfo_item2_boldWord = 'deviceSetup_linkInfo_item2_boldWord'; + static const String deviceSetup_linkInfo_item2_prefix = 'deviceSetup_linkInfo_item2_prefix'; + static const String deviceSetup_linkInfo_item2_subtitle = 'deviceSetup_linkInfo_item2_subtitle'; + static const String deviceSetup_linkInfo_title = 'deviceSetup_linkInfo_title'; + static const String deviceSetup_linkTroubleshoot_title = 'deviceSetup_linkTroubleshoot_title'; + static const String deviceSetup_paymentCancelled = 'deviceSetup_paymentCancelled'; + static const String deviceSetup_paymentSuccess = 'deviceSetup_paymentSuccess'; + static const String deviceSetup_scanQr = 'deviceSetup_scanQr'; + static const String deviceSetup_scanQr_hint = 'deviceSetup_scanQr_hint'; + static const String deviceSetup_skipAndConfigureLater = 'deviceSetup_skipAndConfigureLater'; + static const String deviceSetup_start = 'deviceSetup_start'; + static const String deviceSetup_startWithOneKid_info = 'deviceSetup_startWithOneKid_info'; + static const String deviceSetup_watchCode_continueWithCode = 'deviceSetup_watchCode_continueWithCode'; + static const String deviceSetup_watchCode_orInsert = 'deviceSetup_watchCode_orInsert'; + static const String deviceSetup_weightHint = 'deviceSetup_weightHint'; + static const String deviceSetup_weightLabel = 'deviceSetup_weightLabel'; + static const String didNotReceiveIt = 'didNotReceiveIt'; + static const String disableFunctions = 'disableFunctions'; static const String doNotDisturb = 'doNotDisturb'; - static const String videoCall = 'videoCall'; + static const String documentNumberHint = 'documentNumberHint'; + static const String documentTypeDni = 'documentTypeDni'; + static const String documentTypeHint = 'documentTypeHint'; + static const String documentTypeNie = 'documentTypeNie'; + static const String documentTypePassport = 'documentTypePassport'; + static const String dontHaveAccount = 'dontHaveAccount'; + static const String download = 'download'; + static const String editAlarm = 'editAlarm'; + static const String editChildProfile = 'editChildProfile'; + static const String editChildProfileSaveSuccess = 'editChildProfileSaveSuccess'; + static const String editChildProfileTitle = 'editChildProfileTitle'; + static const String editContact = 'editContact'; + static const String editDeviceTitle = 'editDeviceTitle'; + static const String email = 'email'; + static const String emailHint = 'emailHint'; + static const String emailLabel = 'emailLabel'; + static const String emailSent = 'emailSent'; + static const String enter = 'enter'; + static const String enterCodeHere = 'enterCodeHere'; + static const String enterEmail = 'enterEmail'; + static const String enterMessage = 'enterMessage'; + static const String enterName = 'enterName'; + static const String enterSubject = 'enterSubject'; + static const String errorAcceptTerms = 'errorAcceptTerms'; + static const String errorActivationCodeEmpty = 'errorActivationCodeEmpty'; + static const String errorAddressRequired = 'errorAddressRequired'; + static const String errorAllFieldsRequired = 'errorAllFieldsRequired'; + static const String errorBirthCountryRequired = 'errorBirthCountryRequired'; + static const String errorBirthDateRequired = 'errorBirthDateRequired'; + static const String errorDocumentNumberRequired = 'errorDocumentNumberRequired'; + static const String errorDocumentTypeRequired = 'errorDocumentTypeRequired'; + static const String errorEmailAlreadyRegistered = 'errorEmailAlreadyRegistered'; + static const String errorEmailInvalid = 'errorEmailInvalid'; + static const String errorEmailPlusNotAllowed = 'errorEmailPlusNotAllowed'; + static const String errorEmailRequired = 'errorEmailRequired'; + static const String errorFirstNameRequired = 'errorFirstNameRequired'; + static const String errorLastNameRequired = 'errorLastNameRequired'; + static const String errorLoadingData = 'errorLoadingData'; + static const String errorMessageContactIsEmpty = 'errorMessageContactIsEmpty'; + static const String errorMessagePasswordNoCapitals = 'errorMessagePasswordNoCapitals'; + static const String errorMessagePasswordNoNumbers = 'errorMessagePasswordNoNumbers'; + static const String errorMessagePasswordNoSpecialChars = 'errorMessagePasswordNoSpecialChars'; + static const String errorMessagePasswordTooShort = 'errorMessagePasswordTooShort'; + static const String errorMessagePhoneIsEmpty = 'errorMessagePhoneIsEmpty'; + static const String errorMessagePhoneIsInvalid = 'errorMessagePhoneIsInvalid'; + static const String errorMessageUnequalPasswords = 'errorMessageUnequalPasswords'; + static const String errorNameInvalidChars = 'errorNameInvalidChars'; + static const String errorPasswordMinLength = 'errorPasswordMinLength'; + static const String errorPasswordRequired = 'errorPasswordRequired'; + static const String errorPinLength = 'errorPinLength'; + static const String errorPinMismatch = 'errorPinMismatch'; + static const String errorPinRequired = 'errorPinRequired'; + static const String errorPlaceOfBirthRequired = 'errorPlaceOfBirthRequired'; + static const String errorRelationshipRequired = 'errorRelationshipRequired'; + static const String errorScanStrapRequired = 'errorScanStrapRequired'; + static const String errorScanWatchRequired = 'errorScanWatchRequired'; + static const String errorSigningOperation = 'errorSigningOperation'; + static const String errorTwoFactorCodeInvalid = 'errorTwoFactorCodeInvalid'; + static const String errorTwoFactorCodeInvalidLength = 'errorTwoFactorCodeInvalidLength'; + static const String errorTwoFactorCodeRequired = 'errorTwoFactorCodeRequired'; + static const String errorTwoFactorNoMethods = 'errorTwoFactorNoMethods'; + static const String errorTwoFactorResendFailed = 'errorTwoFactorResendFailed'; + static const String errorWalletConnectFirst = 'errorWalletConnectFirst'; + static const String errorWalletNotProvisioned = 'errorWalletNotProvisioned'; + static const String example = 'example'; + static const String expensesTitle = 'expensesTitle'; + static const String extractAmountLabel = 'extractAmountLabel'; + static const String extractDefaultMessage = 'extractDefaultMessage'; + static const String extractMessageLabel = 'extractMessageLabel'; + static const String extractTitle = 'extractTitle'; + static const String female = 'female'; + static const String filterThisMonth = 'filterThisMonth'; + static const String filterThisWeek = 'filterThisWeek'; + static const String filterToday = 'filterToday'; + static const String firstNameHint = 'firstNameHint'; + static const String firstNameLabel = 'firstNameLabel'; + static const String forgotPassword = 'forgotPassword'; + static const String friday = 'friday'; + static const String functions = 'functions'; + static const String genderFemale = 'genderFemale'; + static const String genderHint = 'genderHint'; + static const String genderLabel = 'genderLabel'; + static const String genderMale = 'genderMale'; + static const String genderOther = 'genderOther'; + static const String goalsAddExtraMoney = 'goalsAddExtraMoney'; + static const String goalsAddTask = 'goalsAddTask'; + static const String goalsAutoSavingsFromAllowance = 'goalsAutoSavingsFromAllowance'; + static const String goalsAutoSendOnGoal = 'goalsAutoSendOnGoal'; + static const String goalsCreateAnotherSavings = 'goalsCreateAnotherSavings'; + static const String goalsCreateNewTaskList = 'goalsCreateNewTaskList'; + static const String goalsCreateSavingsGoal = 'goalsCreateSavingsGoal'; + static const String goalsCreateTaskList = 'goalsCreateTaskList'; + static const String goalsDefaultMessagePrefix = 'goalsDefaultMessagePrefix'; + static const String goalsDelete = 'goalsDelete'; + static const String goalsDeleteTaskList = 'goalsDeleteTaskList'; + static const String goalsOnlyFullPlan = 'goalsOnlyFullPlan'; + static const String goalsRewardForCompletion = 'goalsRewardForCompletion'; + static const String goalsSaveChanges = 'goalsSaveChanges'; + static const String goalsSaved = 'goalsSaved'; + static const String goalsSavings = 'goalsSavings'; + static const String goalsSavingsAmountLabel = 'goalsSavingsAmountLabel'; + static const String goalsSavingsDefaultMessage = 'goalsSavingsDefaultMessage'; + static const String goalsSavingsFor = 'goalsSavingsFor'; + static const String goalsSavingsNameHint = 'goalsSavingsNameHint'; + static const String goalsSavingsReasonLabel = 'goalsSavingsReasonLabel'; + static const String goalsSelectAmount = 'goalsSelectAmount'; + static const String goalsSubscribeFullPlan = 'goalsSubscribeFullPlan'; + static const String goalsTaskList = 'goalsTaskList'; + static const String goalsTasks = 'goalsTasks'; + static const String goalsTasksCompletedMessage = 'goalsTasksCompletedMessage'; + static const String goalsTasksCompletedMessagePrefix = 'goalsTasksCompletedMessagePrefix'; + static const String goalsTasksDescription = 'goalsTasksDescription'; + static const String goalsTeachSavings = 'goalsTeachSavings'; + static const String goalsTitle = 'goalsTitle'; + static const String goalsViewSavingsStatus = 'goalsViewSavingsStatus'; + static const String goalsWriteOtherMessage = 'goalsWriteOtherMessage'; + static const String google = 'google'; static const String health = 'health'; static const String healthEmpty = 'healthEmpty'; static const String healthEmptyHint = 'healthEmptyHint'; static const String heartRate = 'heartRate'; - static const String bloodPressure = 'bloodPressure'; - static const String oxygenLevel = 'oxygenLevel'; - static const String bpm = 'bpm'; - static const String mmHg = 'mmHg'; - static const String spo2 = 'spo2'; - static const String noData = 'noData'; - static const String today = 'today'; - static const String yesterday = 'yesterday'; - static const String lastReading = 'lastReading'; - static const String timeAgo = 'timeAgo'; - static const String sevenDays = 'sevenDays'; - static const String thirtyDays = 'thirtyDays'; - static const String custom = 'custom'; - static const String average = 'average'; - static const String minimum = 'minimum'; - static const String maximum = 'maximum'; static const String history = 'history'; - static const String activityMeter = 'activityMeter'; - static const String rewards = 'rewards'; - static const String callWatch = 'callWatch'; - static const String appsUse = 'appsUse'; - static const String topApps = 'topApps'; - static const String appsSurveillance = 'appsSurveillance'; - static const String makeFriends = 'makeFriends'; + static const String home = 'home'; + static const String homeAddAnotherKid = 'homeAddAnotherKid'; + static const String homeAddMoney = 'homeAddMoney'; + static const String homeCamera = 'homeCamera'; + static const String homeEdit = 'homeEdit'; + static const String homeGreeting = 'homeGreeting'; + static const String homeInPiggyBank = 'homeInPiggyBank'; + static const String homePhotoGallery = 'homePhotoGallery'; + static const String homeSaved = 'homeSaved'; + static const String insertPhone = 'insertPhone'; + static const String language = 'language'; + static const String lastNameHint = 'lastNameHint'; + static const String lastNameLabel = 'lastNameLabel'; + static const String lastReading = 'lastReading'; + static const String legacyNotifications = 'legacyNotifications'; + static const String legacy_deviceSetup_accountData_info = 'legacy_deviceSetup_accountData_info'; + static const String legacy_deviceSetup_linkInfo_item1_subtitle = 'legacy_deviceSetup_linkInfo_item1_subtitle'; + static const String legacy_deviceSetup_linkInfo_item1_title = 'legacy_deviceSetup_linkInfo_item1_title'; + static const String legacy_deviceSetup_linkInfo_item2_subtitle = 'legacy_deviceSetup_linkInfo_item2_subtitle'; + static const String legacy_deviceSetup_linkInfo_item2_title = 'legacy_deviceSetup_linkInfo_item2_title'; + static const String legacy_deviceSetup_linkInfo_title = 'legacy_deviceSetup_linkInfo_title'; + static const String legacy_deviceSetup_linkTroubleshoot_title = 'legacy_deviceSetup_linkTroubleshoot_title'; + static const String legacy_deviceSetup_scanWatch_title = 'legacy_deviceSetup_scanWatch_title'; + static const String limitsAllowedHours = 'limitsAllowedHours'; + static const String limitsAllowedHoursSubtitle = 'limitsAllowedHoursSubtitle'; + static const String limitsBlockedStores = 'limitsBlockedStores'; + static const String limitsDayLimit = 'limitsDayLimit'; + static const String limitsMonthLimit = 'limitsMonthLimit'; + static const String limitsSave = 'limitsSave'; + static const String limitsSaveError = 'limitsSaveError'; + static const String limitsSaveSuccess = 'limitsSaveSuccess'; + static const String limitsSpendingSubtitle = 'limitsSpendingSubtitle'; + static const String limitsSpendingTitle = 'limitsSpendingTitle'; + static const String limitsWeekLimit = 'limitsWeekLimit'; + static const String limitsYearLimit = 'limitsYearLimit'; + static const String linkPhoneSubtitle = 'linkPhoneSubtitle'; + static const String linkPhoneTitle = 'linkPhoneTitle'; + static const String linkedDevices = 'linkedDevices'; + static const String loadMore = 'loadMore'; + static const String loadingPhoto = 'loadingPhoto'; + static const String locateDeviceConfirmMessage = 'locateDeviceConfirmMessage'; static const String locateSF = 'locateSF'; + static const String locateSFAction = 'locateSFAction'; static const String locateSFBody1 = 'locateSFBody1'; static const String locateSFBody2 = 'locateSFBody2'; - static const String locateSFAction = 'locateSFAction'; - static const String insertPhone = 'insertPhone'; - static const String call = 'call'; - static const String takePicture = 'takePicture'; - static const String remoteCamera = 'remoteCamera'; - static const String remoteListening = 'remoteListening'; - static const String genderLabel = 'genderLabel'; - static const String genderHint = 'genderHint'; - static const String genderFemale = 'genderFemale'; - static const String genderMale = 'genderMale'; - static const String genderOther = 'genderOther'; - static const String relationshipOther = 'relationshipOther'; - static const String deviceSetup_weightLabel = 'deviceSetup_weightLabel'; - static const String deviceSetup_weightHint = 'deviceSetup_weightHint'; - static const String deviceSetup_heightLabel = 'deviceSetup_heightLabel'; - static const String deviceSetup_heightHint = 'deviceSetup_heightHint'; - static const String activationKeyLabel = 'activationKeyLabel'; - static const String rewardsMessage = 'rewardsMessage'; - static const String sendRewards = 'sendRewards'; - static const String rewardsSent = 'rewardsSent'; - static const String male = 'male'; - static const String female = 'female'; - static const String ratherNotSay = 'ratherNotSay'; - static const String personalDataMessage = 'personalDataMessage'; - static const String newContact = 'newContact'; - static const String deleteContactMessage = 'deleteContactMessage'; - static const String alarmSettings = 'alarmSettings'; - static const String setDateTime = 'setDateTime'; - static const String addAlarm = 'addAlarm'; - static const String alarmsMessage = 'alarmsMessage'; - static const String once = 'once'; - static const String daily = 'daily'; - static const String selectDay = 'selectDay'; - static const String alarmMessage = 'alarmMessage'; - static const String alarmMessageHint = 'alarmMessageHint'; - static const String deleteAlarm = 'deleteAlarm'; - static const String deleteAlarmConfirm = 'deleteAlarmConfirm'; - static const String editAlarm = 'editAlarm'; - static const String noAlarms = 'noAlarms'; - static const String alarmCreated = 'alarmCreated'; - static const String alarmUpdated = 'alarmUpdated'; - static const String alarmDeleted = 'alarmDeleted'; - static const String remoteTurnOff = 'remoteTurnOff'; - static const String remoteTurnOffMessage = 'remoteTurnOffMessage'; - static const String remoteTurnOffConfirm = 'remoteTurnOffConfirm'; - static const String remoteRestart = 'remoteRestart'; - static const String remoteRestartMessage = 'remoteRestartMessage'; - static const String remoteRestartConfirm = 'remoteRestartConfirm'; - static const String remoteFactoryReset = 'remoteFactoryReset'; - static const String remoteFactoryResetMessage = 'remoteFactoryResetMessage'; - static const String remoteFactoryResetConfirm = 'remoteFactoryResetConfirm'; - static const String soundAndVibration = 'soundAndVibration'; - static const String soundOnly = 'soundOnly'; - static const String vibrationOnly = 'vibrationOnly'; - static const String silent = 'silent'; - static const String number = 'number'; - static const String syncClockMessage = 'syncClockMessage'; - static const String settings = 'settings'; - static const String alarm = 'alarm'; - static const String appStore = 'appStore'; - static const String blockPhone = 'blockPhone'; - static const String timezone = 'timezone'; - static const String language = 'language'; - static const String battery = 'battery'; - static const String remoteManagement = 'remoteManagement'; - static const String legacyNotifications = 'legacyNotifications'; - static const String smsAlert = 'smsAlert'; - static const String sosContacts = 'sosContacts'; - static const String sound = 'sound'; - static const String wifiSettings = 'wifiSettings'; - static const String remoteOnOff = 'remoteOnOff'; - static const String disableFunctions = 'disableFunctions'; - static const String syncClock = 'syncClock'; - static const String monday = 'monday'; - static const String tuesday = 'tuesday'; - static const String wednesday = 'wednesday'; - static const String thursday = 'thursday'; - static const String friday = 'friday'; - static const String saturday = 'saturday'; - static const String sunday = 'sunday'; - static const String scheduledActivityEmpty = 'scheduledActivityEmpty'; - static const String scheduledActivityEmptyHint = 'scheduledActivityEmptyHint'; - static const String scheduledActivityStartTime = 'scheduledActivityStartTime'; - static const String scheduledActivityEndTime = 'scheduledActivityEndTime'; - static const String scheduledActivityStartBeforeEnd = 'scheduledActivityStartBeforeEnd'; - static const String scheduledActivityOverlap = 'scheduledActivityOverlap'; - static const String scheduledActivityNewTitle = 'scheduledActivityNewTitle'; - static const String scheduledActivityEditTitle = 'scheduledActivityEditTitle'; - static const String scheduledActivityDeleteTitle = 'scheduledActivityDeleteTitle'; - static const String scheduledActivityDeleteMessage = 'scheduledActivityDeleteMessage'; + static const String location = 'location'; + static const String locationAddress = 'locationAddress'; + static const String locationConfirm = 'locationConfirm'; + static const String locationCoordinates = 'locationCoordinates'; + static const String locationCreate = 'locationCreate'; + static const String locationDate = 'locationDate'; + static const String locationEdit = 'locationEdit'; + static const String locationEditFrequentPlace = 'locationEditFrequentPlace'; + static const String locationEditGeofence = 'locationEditGeofence'; + static const String locationHintDescription = 'locationHintDescription'; + static const String locationHintFrequentPlace = 'locationHintFrequentPlace'; + static const String locationHintGeofence = 'locationHintGeofence'; + static const String locationHistoryPosition = 'locationHistoryPosition'; + static const String locationLayerFrequentPlaces = 'locationLayerFrequentPlaces'; + static const String locationLayerGeofences = 'locationLayerGeofences'; + static const String locationLayerHistory = 'locationLayerHistory'; + static const String locationMapStyleDark = 'locationMapStyleDark'; + static const String locationMapStyleLight = 'locationMapStyleLight'; + static const String locationMapStyleSatellite = 'locationMapStyleSatellite'; + static const String locationMapStyleStandard = 'locationMapStyleStandard'; + static const String locationMapStyleVoyager = 'locationMapStyleVoyager'; + static const String locationNewFrequentPlace = 'locationNewFrequentPlace'; + static const String locationNewGeofence = 'locationNewGeofence'; + static const String locationPlace = 'locationPlace'; + static const String locationPlacementHint = 'locationPlacementHint'; + static const String locationRadius = 'locationRadius'; + static const String locationRadiusMeters = 'locationRadiusMeters'; + static const String locationSave = 'locationSave'; + static const String locationStatus = 'locationStatus'; + static const String locationStatusActive = 'locationStatusActive'; + static const String locationStatusInactive = 'locationStatusInactive'; + static const String locationType = 'locationType'; + static const String locationWifiNetworksOptional = 'locationWifiNetworksOptional'; + static const String lockCardDefaultMessage = 'lockCardDefaultMessage'; + static const String lockCardError = 'lockCardError'; + static const String lockCardMessageLabel = 'lockCardMessageLabel'; + static const String lockCardPinTitle = 'lockCardPinTitle'; + static const String lockCardSuccess = 'lockCardSuccess'; + static const String lockCardTitle = 'lockCardTitle'; + static const String logOut = 'logOut'; + static const String loginEmail = 'loginEmail'; + static const String loginSuccess = 'loginSuccess'; static const String mainContactPhoneNumber = 'mainContactPhoneNumber'; - static const String loadingPhoto = 'loadingPhoto'; - static const String editContact = 'editContact'; - static const String sending = 'sending'; - static const String sentSuccessfully = 'sentSuccessfully'; - static const String deviceNotConnected = 'deviceNotConnected'; - static const String ok = 'ok'; - static const String locateDeviceConfirmMessage = 'locateDeviceConfirmMessage'; - static const String continueWithGoogle = 'continueWithGoogle'; - static const String redirectingToGoogle = 'redirectingToGoogle'; - static const String errorMessagePhoneIsInvalid = 'errorMessagePhoneIsInvalid'; - static const String contactsEmpty = 'contactsEmpty'; - static const String contactsEmptyHint = 'contactsEmptyHint'; - static const String totalSteps = 'totalSteps'; - static const String bestDay = 'bestDay'; - static const String steps = 'steps'; - static const String noAppUsageData = 'noAppUsageData'; + static const String makeFriends = 'makeFriends'; + static const String male = 'male'; + static const String maximum = 'maximum'; + static const String minimum = 'minimum'; + static const String mmHg = 'mmHg'; + static const String mobilePhone = 'mobilePhone'; + static const String monday = 'monday'; + static const String name = 'name'; + static const String newContact = 'newContact'; + static const String newPassword = 'newPassword'; + static const String next = 'next'; static const String noActivityData = 'noActivityData'; - static const String phone = 'phone'; - static const String add = 'add'; - static const String contactName = 'contactName'; - static const String addAllowedNumber = 'addAllowedNumber'; + static const String noAlarms = 'noAlarms'; + static const String noAppUsageData = 'noAppUsageData'; static const String noBlockedNumbers = 'noBlockedNumbers'; static const String noBlockedNumbersDescription = 'noBlockedNumbersDescription'; - static const String whitelistDescription = 'whitelistDescription'; - static const String allowedNumbersCount = 'allowedNumbersCount'; - static const String removeAllowedNumber = 'removeAllowedNumber'; - static const String removeAllowedNumberConfirm = 'removeAllowedNumberConfirm'; - static const String numberAdded = 'numberAdded'; - static const String numberRemoved = 'numberRemoved'; - static const String addSosContact = 'addSosContact'; + static const String noData = 'noData'; static const String noSosContacts = 'noSosContacts'; static const String noSosContactsDescription = 'noSosContactsDescription'; - static const String sosDescription = 'sosDescription'; - static const String sosContactsCount = 'sosContactsCount'; - static const String removeSosContact = 'removeSosContact'; - static const String removeSosContactConfirm = 'removeSosContactConfirm'; - static const String sosNumberAdded = 'sosNumberAdded'; - static const String sosNumberRemoved = 'sosNumberRemoved'; - static const String addWifiNetwork = 'addWifiNetwork'; static const String noWifiNetworks = 'noWifiNetworks'; static const String noWifiNetworksDescription = 'noWifiNetworksDescription'; - static const String wifiDescription = 'wifiDescription'; - static const String wifiNetworksCount = 'wifiNetworksCount'; + static const String number = 'number'; + static const String numberAdded = 'numberAdded'; + static const String numberRemoved = 'numberRemoved'; + static const String ok = 'ok'; + static const String onboardingSubtitle1 = 'onboardingSubtitle1'; + static const String onboardingSubtitle2 = 'onboardingSubtitle2'; + static const String onboardingSubtitle3 = 'onboardingSubtitle3'; + static const String onboardingTitle1 = 'onboardingTitle1'; + static const String onboardingTitle2 = 'onboardingTitle2'; + static const String onboardingTitle3 = 'onboardingTitle3'; + static const String once = 'once'; + static const String orContinueWith = 'orContinueWith'; + static const String other = 'other'; + static const String oxygenLevel = 'oxygenLevel'; + static const String password = 'password'; + static const String passwordCapital = 'passwordCapital'; + static const String passwordLength = 'passwordLength'; + static const String passwordNumber = 'passwordNumber'; + static const String passwordRulesSubtitle = 'passwordRulesSubtitle'; + static const String passwordSpecial = 'passwordSpecial'; + static const String payinAddCard = 'payinAddCard'; + static const String payinDeposit = 'payinDeposit'; + static const String payinError = 'payinError'; + static const String payinNoCards = 'payinNoCards'; + static const String payinProcessing = 'payinProcessing'; + static const String payinSelectCard = 'payinSelectCard'; + static const String payinSuccess = 'payinSuccess'; + static const String payoutAddBeneficiary = 'payoutAddBeneficiary'; + static const String payoutAddBeneficiarySubtitle = 'payoutAddBeneficiarySubtitle'; + static const String payoutAmountLabel = 'payoutAmountLabel'; + static const String payoutAvailableBalance = 'payoutAvailableBalance'; + static const String payoutBeneficiaryAdded = 'payoutBeneficiaryAdded'; + static const String payoutButton = 'payoutButton'; + static const String payoutErrorAmountExceeds = 'payoutErrorAmountExceeds'; + static const String payoutErrorAmountRequired = 'payoutErrorAmountRequired'; + static const String payoutErrorHolderRequired = 'payoutErrorHolderRequired'; + static const String payoutErrorIbanRequired = 'payoutErrorIbanRequired'; + static const String payoutHolderNameHint = 'payoutHolderNameHint'; + static const String payoutHolderNameLabel = 'payoutHolderNameLabel'; + static const String payoutIbanLabel = 'payoutIbanLabel'; + static const String payoutNoBeneficiaries = 'payoutNoBeneficiaries'; + static const String payoutPinTitle = 'payoutPinTitle'; + static const String payoutSubtitle = 'payoutSubtitle'; + static const String payoutSuccess = 'payoutSuccess'; + static const String payoutTitle = 'payoutTitle'; + static const String personalData = 'personalData'; + static const String personalDataMessage = 'personalDataMessage'; + static const String phone = 'phone'; + static const String phoneHint = 'phoneHint'; + static const String phoneLabel = 'phoneLabel'; + static const String phoneNumber = 'phoneNumber'; + static const String placeOfBirthHint = 'placeOfBirthHint'; + static const String placeOfBirthLabel = 'placeOfBirthLabel'; + static const String postCodeHint = 'postCodeHint'; + static const String postCodeLabel = 'postCodeLabel'; + static const String privacyPolicy = 'privacyPolicy'; + static const String profileAccountSettings = 'profileAccountSettings'; + static const String profileMyAccount = 'profileMyAccount'; + static const String profileNoRecentTransactions = 'profileNoRecentTransactions'; + static const String profileRecentTransactions = 'profileRecentTransactions'; + static const String profileSettingsAddress = 'profileSettingsAddress'; + static const String profileSettingsAnnualPlan = 'profileSettingsAnnualPlan'; + static const String profileSettingsBirthDate = 'profileSettingsBirthDate'; + static const String profileSettingsChangePlan = 'profileSettingsChangePlan'; + static const String profileSettingsCity = 'profileSettingsCity'; + static const String profileSettingsContactUs = 'profileSettingsContactUs'; + static const String profileSettingsCountry = 'profileSettingsCountry'; + static const String profileSettingsEdit = 'profileSettingsEdit'; + static const String profileSettingsEmail = 'profileSettingsEmail'; + static const String profileSettingsFaq = 'profileSettingsFaq'; + static const String profileSettingsFreeMonths = 'profileSettingsFreeMonths'; + static const String profileSettingsLastName = 'profileSettingsLastName'; + static const String profileSettingsLoadError = 'profileSettingsLoadError'; + static const String profileSettingsLogout = 'profileSettingsLogout'; + static const String profileSettingsLogoutConfirm = 'profileSettingsLogoutConfirm'; + static const String profileSettingsLogoutError = 'profileSettingsLogoutError'; + static const String profileSettingsName = 'profileSettingsName'; + static const String profileSettingsNationality = 'profileSettingsNationality'; + static const String profileSettingsNoPermanence = 'profileSettingsNoPermanence'; + static const String profileSettingsPaymentMethod = 'profileSettingsPaymentMethod'; + static const String profileSettingsPaymentMethodHint = 'profileSettingsPaymentMethodHint'; + static const String profileSettingsPersonalData = 'profileSettingsPersonalData'; + static const String profileSettingsPhone = 'profileSettingsPhone'; + static const String profileSettingsPlaceOfBirth = 'profileSettingsPlaceOfBirth'; + static const String profileSettingsPostCode = 'profileSettingsPostCode'; + static const String profileSettingsProvince = 'profileSettingsProvince'; + static const String profileSettingsSave = 'profileSettingsSave'; + static const String profileSettingsSaveSuccess = 'profileSettingsSaveSuccess'; + static const String profileSettingsState = 'profileSettingsState'; + static const String profileSettingsStreet = 'profileSettingsStreet'; + static const String profileSettingsTitle = 'profileSettingsTitle'; + static const String profileSettingsUnlimitedCalls = 'profileSettingsUnlimitedCalls'; + static const String profileSettingsUser = 'profileSettingsUser'; + static const String profileWithdrawMoney = 'profileWithdrawMoney'; + static const String provinceHint = 'provinceHint'; + static const String provinceLabel = 'provinceLabel'; + static const String ratherNotSay = 'ratherNotSay'; + static const String recoverPasswordSubtitle = 'recoverPasswordSubtitle'; + static const String recoverPasswordTitle = 'recoverPasswordTitle'; + static const String redirectingToGoogle = 'redirectingToGoogle'; + static const String regCode = 'regCode'; + static const String regCodeLabel = 'regCodeLabel'; + static const String relationshipFather = 'relationshipFather'; + static const String relationshipHint = 'relationshipHint'; + static const String relationshipLabel = 'relationshipLabel'; + static const String relationshipMother = 'relationshipMother'; + static const String relationshipOther = 'relationshipOther'; + static const String relationshipTutor = 'relationshipTutor'; + static const String remoteCamera = 'remoteCamera'; + static const String remoteConnection = 'remoteConnection'; + static const String remoteFactoryReset = 'remoteFactoryReset'; + static const String remoteFactoryResetConfirm = 'remoteFactoryResetConfirm'; + static const String remoteFactoryResetMessage = 'remoteFactoryResetMessage'; + static const String remoteListening = 'remoteListening'; + static const String remoteManagement = 'remoteManagement'; + static const String remoteOnOff = 'remoteOnOff'; + static const String remoteRestart = 'remoteRestart'; + static const String remoteRestartConfirm = 'remoteRestartConfirm'; + static const String remoteRestartMessage = 'remoteRestartMessage'; + static const String remoteTurnOff = 'remoteTurnOff'; + static const String remoteTurnOffConfirm = 'remoteTurnOffConfirm'; + static const String remoteTurnOffMessage = 'remoteTurnOffMessage'; + static const String removeAllowedNumber = 'removeAllowedNumber'; + static const String removeAllowedNumberConfirm = 'removeAllowedNumberConfirm'; + static const String removeSosContact = 'removeSosContact'; + static const String removeSosContactConfirm = 'removeSosContactConfirm'; static const String removeWifiNetwork = 'removeWifiNetwork'; static const String removeWifiNetworkConfirm = 'removeWifiNetworkConfirm'; + static const String repeatPassword = 'repeatPassword'; + static const String requestCancelBody = 'requestCancelBody'; + static const String requestCancelButton = 'requestCancelButton'; + static const String requestCancelTitle = 'requestCancelTitle'; + static const String resendEmail = 'resendEmail'; + static const String resendSms = 'resendSms'; + static const String retry = 'retry'; + static const String rewards = 'rewards'; + static const String rewardsMessage = 'rewardsMessage'; + static const String rewardsSent = 'rewardsSent'; + static const String saturday = 'saturday'; + static const String save = 'save'; + static const String scaClearPin = 'scaClearPin'; + static const String scaConnect = 'scaConnect'; + static const String scaConnecting = 'scaConnecting'; + static const String scaErrorConnecting = 'scaErrorConnecting'; + static const String scaErrorLoadingActivationCode = 'scaErrorLoadingActivationCode'; + static const String scaErrorPaymentProfile = 'scaErrorPaymentProfile'; + static const String scaErrorProvisioning = 'scaErrorProvisioning'; + static const String scaErrorSigning = 'scaErrorSigning'; + static const String scaPinConfirm = 'scaPinConfirm'; + static const String scaPinCreate = 'scaPinCreate'; + static const String scaPinEnter = 'scaPinEnter'; + static const String scaProvisioning = 'scaProvisioning'; + static const String scaProvisioningFailed = 'scaProvisioningFailed'; + static const String scaProvisioningRetry = 'scaProvisioningRetry'; + static const String scaProvisioningWarning = 'scaProvisioningWarning'; + static const String scaSigning = 'scaSigning'; + static const String scheduledActivityDeleteMessage = 'scheduledActivityDeleteMessage'; + static const String scheduledActivityDeleteTitle = 'scheduledActivityDeleteTitle'; + static const String scheduledActivityEditTitle = 'scheduledActivityEditTitle'; + static const String scheduledActivityEmpty = 'scheduledActivityEmpty'; + static const String scheduledActivityEmptyHint = 'scheduledActivityEmptyHint'; + static const String scheduledActivityEndTime = 'scheduledActivityEndTime'; + static const String scheduledActivityNewTitle = 'scheduledActivityNewTitle'; + static const String scheduledActivityOverlap = 'scheduledActivityOverlap'; + static const String scheduledActivityStartBeforeEnd = 'scheduledActivityStartBeforeEnd'; + static const String scheduledActivityStartTime = 'scheduledActivityStartTime'; + static const String secretCodeConfigure = 'secretCodeConfigure'; + static const String secretCodeKeyCopied = 'secretCodeKeyCopied'; + static const String secretCodeStep1Body = 'secretCodeStep1Body'; + static const String secretCodeStep1Title = 'secretCodeStep1Title'; + static const String secretCodeStep2Body = 'secretCodeStep2Body'; + static const String secretCodeStep2Title = 'secretCodeStep2Title'; + static const String secretCodeStep3Body = 'secretCodeStep3Body'; + static const String secretCodeStep3Title = 'secretCodeStep3Title'; + static const String secretCodeTitle = 'secretCodeTitle'; + static const String selectChannel = 'selectChannel'; + static const String selectCountry = 'selectCountry'; + static const String selectDay = 'selectDay'; + static const String selectMonth = 'selectMonth'; + static const String selectYear = 'selectYear'; + static const String selectYourCountry = 'selectYourCountry'; + static const String send = 'send'; + static const String sendEmail = 'sendEmail'; + static const String sendMessageAndBlock = 'sendMessageAndBlock'; + static const String sendRewards = 'sendRewards'; + static const String sending = 'sending'; + static const String sentSuccessfully = 'sentSuccessfully'; + static const String setDateTime = 'setDateTime'; + static const String settings = 'settings'; + static const String sevenDays = 'sevenDays'; + static const String sfPay = 'sfPay'; + static const String signIn = 'signIn'; + static const String silent = 'silent'; + static const String skip = 'skip'; + static const String smsAlert = 'smsAlert'; + static const String smsSent = 'smsSent'; + static const String sosContacts = 'sosContacts'; + static const String sosContactsCount = 'sosContactsCount'; + static const String sosDescription = 'sosDescription'; + static const String sosNumberAdded = 'sosNumberAdded'; + static const String sosNumberRemoved = 'sosNumberRemoved'; + static const String sound = 'sound'; + static const String soundAndVibration = 'soundAndVibration'; + static const String soundOnly = 'soundOnly'; + static const String spo2 = 'spo2'; + static const String start = 'start'; + static const String stateHint = 'stateHint'; + static const String stateLabel = 'stateLabel'; + static const String statementCurrentMonthError = 'statementCurrentMonthError'; + static const String stepAddressSupertitle = 'stepAddressSupertitle'; + static const String stepAddressTitle = 'stepAddressTitle'; + static const String stepPersonalDataSubtitle = 'stepPersonalDataSubtitle'; + static const String stepPersonalDataSupertitle = 'stepPersonalDataSupertitle'; + static const String stepPersonalDataTitle = 'stepPersonalDataTitle'; + static const String stepUserContactSubtitle = 'stepUserContactSubtitle'; + static const String stepUserContactSupertitle = 'stepUserContactSupertitle'; + static const String stepUserContactTitle = 'stepUserContactTitle'; + static const String steps = 'steps'; + static const String streetHint = 'streetHint'; + static const String streetLabel = 'streetLabel'; + static const String submit = 'submit'; + static const String sunday = 'sunday'; + static const String supportHelp = 'supportHelp'; + static const String supportWebsite = 'supportWebsite'; + static const String syncClock = 'syncClock'; + static const String syncClockMessage = 'syncClockMessage'; + static const String takePicture = 'takePicture'; + static const String termsText = 'termsText'; + static const String thirtyDays = 'thirtyDays'; + static const String thursday = 'thursday'; + static const String timeAgo = 'timeAgo'; + static const String timezone = 'timezone'; + static const String today = 'today'; + static const String topApps = 'topApps'; + static const String totalSteps = 'totalSteps'; + static const String transactionBankDirectDebit = 'transactionBankDirectDebit'; + static const String transactionBankTransfer = 'transactionBankTransfer'; + static const String transactionCardPayment = 'transactionCardPayment'; + static const String transactionCardTopup = 'transactionCardTopup'; + static const String transactionCheck = 'transactionCheck'; + static const String transactionCheckPayin = 'transactionCheckPayin'; + static const String transactionCheckRefund = 'transactionCheckRefund'; + static const String transactionCreditInternationalTransfer = 'transactionCreditInternationalTransfer'; + static const String transactionCreditNote = 'transactionCreditNote'; + static const String transactionCreditTransferReturned = 'transactionCreditTransferReturned'; + static const String transactionFees = 'transactionFees'; + static const String transactionInstantBankTransfer = 'transactionInstantBankTransfer'; + static const String transactionPayin = 'transactionPayin'; + static const String transactionPayinAcquiring = 'transactionPayinAcquiring'; + static const String transactionPayinRefund = 'transactionPayinRefund'; + static const String transactionPayinRefundAcquiring = 'transactionPayinRefundAcquiring'; + static const String transactionPayinSctInstantEmitRecall = 'transactionPayinSctInstantEmitRecall'; + static const String transactionPayinSctInstantRecall = 'transactionPayinSctInstantRecall'; + static const String transactionPayout = 'transactionPayout'; + static const String transactionPayoutRefund = 'transactionPayoutRefund'; + static const String transactionPayoutSctInstantEmit = 'transactionPayoutSctInstantEmit'; + static const String transactionSctr = 'transactionSctr'; + static const String transactionSctrInst = 'transactionSctrInst'; + static const String transactionSctrRecall = 'transactionSctrRecall'; + static const String transactionSdde = 'transactionSdde'; + static const String transactionSddr = 'transactionSddr'; + static const String transactionSddrReversal = 'transactionSddrReversal'; + static const String transactionTransfer = 'transactionTransfer'; + static const String transactionUnknown = 'transactionUnknown'; + static const String transactionWalletTransfer = 'transactionWalletTransfer'; + static const String transactionsShown = 'transactionsShown'; + static const String tryAgain = 'tryAgain'; + static const String tuesday = 'tuesday'; + static const String twoFactorCodeHint = 'twoFactorCodeHint'; + static const String twoFactorCodeLabel = 'twoFactorCodeLabel'; + static const String twoFactorCodeResent = 'twoFactorCodeResent'; + static const String twoFactorResend = 'twoFactorResend'; + static const String twoFactorSubtitle = 'twoFactorSubtitle'; + static const String twoFactorTitle = 'twoFactorTitle'; + static const String twoFactorVerify = 'twoFactorVerify'; + static const String userAccount = 'userAccount'; + static const String userNameLabel = 'userNameLabel'; + static const String userPhoneLabel = 'userPhoneLabel'; + static const String userRole = 'userRole'; + static const String username = 'username'; + static const String verificationCodeSentTo = 'verificationCodeSentTo'; + static const String verifyAccount = 'verifyAccount'; + static const String vibrationOnly = 'vibrationOnly'; + static const String videoCall = 'videoCall'; + static const String walletActionAdd = 'walletActionAdd'; + static const String walletActionAllowance = 'walletActionAllowance'; + static const String walletActionExtract = 'walletActionExtract'; + static const String walletActionGoals = 'walletActionGoals'; + static const String walletActionLimits = 'walletActionLimits'; + static const String walletAvailable = 'walletAvailable'; + static const String walletMoveAmountRequired = 'walletMoveAmountRequired'; + static const String walletMoveError = 'walletMoveError'; + static const String walletMoveProcessing = 'walletMoveProcessing'; + static const String walletMoveSuccess = 'walletMoveSuccess'; + static const String walletSavings = 'walletSavings'; + static const String walletTitle = 'walletTitle'; + static const String walletTotal = 'walletTotal'; + static const String watchInfo = 'watchInfo'; + static const String watchesOnMap = 'watchesOnMap'; + static const String wednesday = 'wednesday'; + static const String welcome = 'welcome'; + static const String whitelistDescription = 'whitelistDescription'; + static const String wifiBssid = 'wifiBssid'; + static const String wifiBssidHint = 'wifiBssidHint'; + static const String wifiDescription = 'wifiDescription'; static const String wifiNetworkAdded = 'wifiNetworkAdded'; static const String wifiNetworkRemoved = 'wifiNetworkRemoved'; + static const String wifiNetworksCount = 'wifiNetworksCount'; + static const String wifiSettings = 'wifiSettings'; static const String wifiSsid = 'wifiSsid'; - static const String wifiBssid = 'wifiBssid'; static const String wifiSsidHint = 'wifiSsidHint'; - static const String wifiBssidHint = 'wifiBssidHint'; - static const String editChildProfile = 'editChildProfile'; - static const String editChildProfileTitle = 'editChildProfileTitle'; - static const String editChildProfileSaveSuccess = 'editChildProfileSaveSuccess'; - static const String activationCodeMessage = 'activationCodeMessage'; + static const String yesterday = 'yesterday'; }