Merge branch 'refs/heads/fusion-app' into feature/contacts

# Conflicts:
#	modules/legacy/packages/legacy_shared/lib/legacy_shared.dart
#	packages/sf_localizations/assets/l10n/en.json
#	packages/sf_localizations/assets/l10n/es.json
#	packages/sf_localizations/lib/src/generated/i18n.dart
This commit is contained in:
2026-03-25 09:22:11 +01:00
132 changed files with 12998 additions and 587 deletions

View File

@@ -7,6 +7,6 @@
<versions>
<version>2.6.4</version>
</versions>
<lastUpdated>20260322000000</lastUpdated>
<lastUpdated>20260325000000</lastUpdated>
</versioning>
</metadata>

View File

@@ -1 +1 @@
ec3c2e29f6fe8ca84eadd369212dff2b
afdf53af75a016d3a59635398d34f60d

View File

@@ -1 +1 @@
df5c1d0c2331a0f608264e4d5f14b9492f5eb2aa
bf02df387eb61f33404881f4a9a3c80dfa29e6d1

View File

@@ -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":"/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}}
{"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-25 02:38:14.832197","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}

View File

@@ -65,6 +65,7 @@ class AppRoutes {
static const appsUse = '$deviceManagement/apps_use';
static const volumeControl = '$deviceManagement/volume_control';
static const callHistory = '$deviceManagement/call_history';
static const backgroundImage = '$deviceManagement/background_image';
static const legacyLogin = '$legacy/login';
static const legacySignup = '$legacy/signup';
@@ -91,7 +92,7 @@ class AppRoutes {
static const legacyNotifications = '$settings/legacy_notifications';
static const remoteManagement = '$settings/remote_management';
static const remoteOnOff = '$settings/remote_on_off';
static const smsAlert = '$settings/sms_alert';
static const alerts = '$settings/alerts';
static const sosContacts = '$settings/sos_agenda';
static const sound = '$settings/sound';
static const syncClock = '$settings/sync_clock';

View File

@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"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},{"name":"webview_flutter_wkwebview","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"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},{"name":"webview_flutter_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_android-4.10.11/","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},{"name":"webview_flutter_wkwebview","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.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":"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"]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2026-03-21 22:57:09.164504","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"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},{"name":"webview_flutter_wkwebview","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"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},{"name":"webview_flutter_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_android-4.10.11/","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},{"name":"webview_flutter_wkwebview","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.23.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":"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"]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2026-03-25 02:38:21.345955","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}

View File

@@ -629,7 +629,78 @@
"measure": "Messen",
"callHistory": "Anrufverlauf",
"callHistoryEmpty": "Keine Anrufe aufgezeichnet",
"timezoneSearch": "Stadt suchen...",
"timezoneNoResults": "Keine Städte gefunden",
"callIncoming": "Eingehend",
"callOutgoing": "Ausgehend",
"callMissed": "Verpasst"
"callMissed": "Verpasst",
"healthFrequency": "Frequenz",
"healthMeasuring": "Messung läuft...",
"geofenceCreated": "Geofence erstellt",
"geofenceUpdated": "Geofence aktualisiert",
"geofenceDeleted": "Geofence gelöscht",
"frequentPlaceCreated": "Häufiger Ort erstellt",
"frequentPlaceUpdated": "Häufiger Ort aktualisiert",
"frequentPlaceDeleted": "Häufiger Ort gelöscht",
"errorGeneric": "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",
"errorGeofenceCreate": "Die Sicherheitszone konnte nicht erstellt werden",
"errorGeofenceUpdate": "Die Sicherheitszone konnte nicht aktualisiert werden",
"errorGeofenceDelete": "Die Sicherheitszone konnte nicht gelöscht werden",
"errorFrequentPlaceCreate": "Der häufige Ort konnte nicht erstellt werden",
"errorFrequentPlaceUpdate": "Der häufige Ort konnte nicht aktualisiert werden",
"errorFrequentPlaceDelete": "Der häufige Ort konnte nicht gelöscht werden",
"errorPositionHistory": "Der Positionsverlauf konnte nicht geladen werden",
"errorLocationFrequency": "Die Standortfrequenz konnte nicht aktualisiert werden",
"errorRefreshPosition": "Die Position konnte nicht aktualisiert werden",
"errorHealthData": "Die Gesundheitsdaten konnten nicht geladen werden",
"errorHealthMeasure": "Der Messbefehl konnte nicht gesendet werden",
"errorHeartRateFrequency": "Die Herzfrequenz konnte nicht aktualisiert werden",
"errorSoundMode": "Der Tonmodus konnte nicht aktualisiert werden",
"errorVolumeControl": "Die Lautstärke konnte nicht aktualisiert werden",
"errorLanguage": "Die Sprache konnte nicht aktualisiert werden",
"locationFrequencyUpdated": "Frequenz auf {minutes} Min. aktualisiert",
"activityMeterPedometer": "Schrittzähler",
"activityMeterPedometerEnabled": "Schrittzähler aktiviert",
"activityMeterPedometerDisabled": "Schrittzähler deaktiviert",
"errorActivityData": "Aktivitätsdaten konnten nicht geladen werden",
"errorPedometer": "Der Schrittzähler konnte nicht aktualisiert werden",
"errorContactsMin": "Das Gerät muss mindestens einen Kontakt haben",
"errorContactsMax": "Das Gerät kann nicht mehr als 10 Kontakte haben",
"customBackground": "Benutzerdefiniertes Hintergrundbild",
"backgroundImageDescription": "Legen Sie ein Foto als benutzerdefinierten Bildschirmschoner für das Gerät fest",
"backgroundImageTapToSelect": "Tippen Sie, um ein Foto auszuwählen",
"backgroundImageTapToChange": "Tippen Sie auf das Bild, um den Bildschirmschoner zu ändern",
"backgroundImageUploaded": "Hintergrundbild aktualisiert",
"errorBackgroundImageLoad": "Das Hintergrundbild konnte nicht geladen werden",
"errorBackgroundImageUpload": "Das Hintergrundbild konnte nicht hochgeladen werden",
"errorBackgroundImageSet": "Das Hintergrundbild konnte nicht festgelegt werden",
"backgroundImageSet": "Hintergrundbild erfolgreich festgelegt",
"alerts": "Warnungen",
"alertsDescription": "Legen Sie die Parameter fest, die die Überwachung und Warnungen des Geräts steuern.",
"alertsUpdated": "Warnungen aktualisiert",
"errorAlertUpdate": "Warnungen konnten nicht aktualisiert werden",
"alertSos": "Notfall",
"alertFalldown": "Sturz",
"alertLowBattery": "Niedriger Akkustand",
"alertGeofenceIn": "Zoneneintritt",
"alertGeofenceOut": "Zonenaustritt",
"alertDisconnect": "Getrennt",
"alertBraceletRemoved": "Armband entfernt",
"alertStandstill": "Längere Inaktivität",
"alertAbnormalHeartRate": "Abnormale Herzfrequenz",
"alertReconnect": "Wieder verbunden",
"alertMovement": "Bewegung",
"disableFunctionsKeyboard": "Wähltastatur",
"disableFunctionsGps": "GPS-Positionierung",
"disableFunctionsNightMode": "Nachtmodus",
"disableFunctionsUpdated": "Funktionen aktualisiert",
"errorDisableFunctions": "Funktionen konnten nicht aktualisiert werden",
"batteryNightSaving": "Nächtliche Batterieschonung",
"batteryNightModeTitle": "Nächtlicher Energiesparmodus",
"batteryNightModeDescription": "Die Uhr spart Batterie und trennt sich zwischen 22:00 und 06:00 Uhr von allen Netzwerken.",
"batteryNightModeUpdated": "Nachtmodus aktualisiert",
"errorBatteryNightMode": "Der Nachtmodus konnte nicht aktualisiert werden",
"timezoneUpdated": "Zeitzone aktualisiert",
"errorTimezone": "Die Zeitzone konnte nicht aktualisiert werden",
"timezoneOther": "Andere Zeitzonen"
}

View File

@@ -602,7 +602,7 @@
"legacyNotifications": "Notifications",
"remoteManagement": "Remote Management",
"remoteOnOff": "Scheduled On/Off",
"smsAlert": "SMS Alerts",
"alerts": "Alerts",
"sosContacts": "SOS Contacts",
"sound": "Sounds",
"volumeControl": "Volume control",
@@ -761,10 +761,78 @@
"measure": "Measure",
"callHistory": "Call history",
"callHistoryEmpty": "No calls recorded",
"timezoneSearch": "Search city...",
"timezoneNoResults": "No cities found",
"callIncoming": "Incoming",
"callOutgoing": "Outgoing",
"callMissed": "Missed",
"healthFrequency": "Frequency",
"healthMeasuring": "Measuring...",
"geofenceCreated": "Geofence created",
"geofenceUpdated": "Geofence updated",
"geofenceDeleted": "Geofence deleted",
"frequentPlaceCreated": "Frequent place created",
"frequentPlaceUpdated": "Frequent place updated",
"frequentPlaceDeleted": "Frequent place deleted",
"errorGeneric": "Something went wrong. Please try again.",
"errorGeofenceCreate": "Could not create the safety zone",
"errorGeofenceUpdate": "Could not update the safety zone",
"errorGeofenceDelete": "Could not delete the safety zone",
"errorFrequentPlaceCreate": "Could not create the frequent place",
"errorFrequentPlaceUpdate": "Could not update the frequent place",
"errorFrequentPlaceDelete": "Could not delete the frequent place",
"errorPositionHistory": "Could not load position history",
"errorLocationFrequency": "Could not update location frequency",
"errorRefreshPosition": "Could not refresh position",
"errorHealthData": "Could not load health data",
"errorHealthMeasure": "Could not send measurement command",
"errorHeartRateFrequency": "Could not update heart rate frequency",
"errorSoundMode": "Could not update sound mode",
"errorVolumeControl": "Could not update volume",
"errorLanguage": "Could not update language",
"locationFrequencyUpdated": "Frequency updated to {minutes} min",
"activityMeterPedometer": "Pedometer",
"activityMeterPedometerEnabled": "Pedometer enabled",
"activityMeterPedometerDisabled": "Pedometer disabled",
"errorActivityData": "Could not load activity data",
"errorPedometer": "Could not update pedometer",
"errorContactsMin": "The device must have at least one contact",
"errorContactsMax": "The device cannot have more than 10 contacts",
"customBackground": "Custom background image",
"backgroundImageDescription": "Set a photo as a custom screensaver for the device",
"backgroundImageTapToSelect": "Tap to select a photo",
"backgroundImageTapToChange": "Tap on the image to change the screensaver",
"backgroundImageUploaded": "Background image updated",
"errorBackgroundImageLoad": "Could not load background image",
"errorBackgroundImageUpload": "Could not upload background image",
"errorBackgroundImageSet": "Could not set background image",
"backgroundImageSet": "Background image set successfully",
"alertsDescription": "Set the parameters that control monitoring and alerts for the device.",
"alertsUpdated": "Alerts updated",
"errorAlertUpdate": "Could not update alerts",
"alertSos": "Emergency",
"alertFalldown": "Fall",
"alertLowBattery": "Low battery",
"alertGeofenceIn": "Zone entry",
"alertGeofenceOut": "Zone exit",
"alertDisconnect": "Disconnected",
"alertBraceletRemoved": "Bracelet removed",
"alertStandstill": "Prolonged inactivity",
"alertAbnormalHeartRate": "Abnormal heart rate",
"alertReconnect": "Reconnected",
"alertMovement": "Movement",
"disableFunctionsKeyboard": "Dial keypad",
"disableFunctionsGps": "GPS positioning",
"disableFunctionsNightMode": "Night mode",
"disableFunctionsUpdated": "Functions updated",
"errorDisableFunctions": "Could not update functions",
"batteryNightSaving": "Night battery saving",
"batteryNightModeTitle": "Night energy saving mode",
"batteryNightModeDescription": "The watch will save battery and disconnect from all networks between 22:00 and 06:00.",
"batteryNightModeUpdated": "Night mode updated",
"errorBatteryNightMode": "Could not update night mode",
"timezoneUpdated": "Timezone updated",
"errorTimezone": "Could not update timezone",
"timezoneOther": "Other timezones",
"blockedCallsList": "Blocked calls list"
}
}

View File

@@ -600,7 +600,7 @@
"legacyNotifications": "Notificaciones",
"remoteManagement": "Programación remota",
"remoteOnOff": "Encendido y Apagado Programado",
"smsAlert": "Alertas SMS",
"alerts": "Alertas",
"sosContacts": "Agenda SOS",
"sound": "Sonidos",
"volumeControl": "Control de volumen",
@@ -759,10 +759,78 @@
"measure": "Medir",
"callHistory": "Historial de llamadas",
"callHistoryEmpty": "No hay llamadas registradas",
"timezoneSearch": "Buscar ciudad...",
"timezoneNoResults": "No se encontraron ciudades",
"callIncoming": "Entrantes",
"callOutgoing": "Salientes",
"callMissed": "Perdidas",
"healthFrequency": "Frecuencia",
"healthMeasuring": "Midiendo...",
"geofenceCreated": "Zona de seguridad creada",
"geofenceUpdated": "Zona de seguridad actualizada",
"geofenceDeleted": "Zona de seguridad eliminada",
"frequentPlaceCreated": "Lugar frecuente creado",
"frequentPlaceUpdated": "Lugar frecuente actualizado",
"frequentPlaceDeleted": "Lugar frecuente eliminado",
"errorGeneric": "Algo salió mal. Inténtalo de nuevo.",
"errorGeofenceCreate": "No se pudo crear la zona de seguridad",
"errorGeofenceUpdate": "No se pudo actualizar la zona de seguridad",
"errorGeofenceDelete": "No se pudo eliminar la zona de seguridad",
"errorFrequentPlaceCreate": "No se pudo crear el lugar frecuente",
"errorFrequentPlaceUpdate": "No se pudo actualizar el lugar frecuente",
"errorFrequentPlaceDelete": "No se pudo eliminar el lugar frecuente",
"errorPositionHistory": "No se pudo cargar el historial de posiciones",
"errorLocationFrequency": "No se pudo actualizar la frecuencia de localización",
"errorRefreshPosition": "No se pudo actualizar la posición",
"errorHealthData": "No se pudieron cargar los datos de salud",
"errorHealthMeasure": "No se pudo enviar el comando de medición",
"errorHeartRateFrequency": "No se pudo actualizar la frecuencia cardíaca",
"errorSoundMode": "No se pudo actualizar el modo de sonido",
"errorVolumeControl": "No se pudo actualizar el volumen",
"errorLanguage": "No se pudo actualizar el idioma",
"locationFrequencyUpdated": "Frecuencia actualizada a {minutes} min",
"activityMeterPedometer": "Podómetro",
"activityMeterPedometerEnabled": "Podómetro activado",
"activityMeterPedometerDisabled": "Podómetro desactivado",
"errorActivityData": "No se pudieron cargar los datos de actividad",
"errorPedometer": "No se pudo actualizar el podómetro",
"errorContactsMin": "El dispositivo debe tener al menos un contacto",
"errorContactsMax": "El dispositivo no puede tener más de 10 contactos",
"customBackground": "Fondo de pantalla personalizado",
"backgroundImageDescription": "Configura una foto como protector de pantalla exclusivo para el dispositivo",
"backgroundImageTapToSelect": "Pulsa para seleccionar una foto",
"backgroundImageTapToChange": "Pulsa en la imagen para cambiar el protector de pantalla",
"backgroundImageUploaded": "Imagen de fondo actualizada",
"errorBackgroundImageLoad": "No se pudo cargar la imagen de fondo",
"errorBackgroundImageUpload": "No se pudo subir la imagen de fondo",
"errorBackgroundImageSet": "No se pudo asignar la imagen de fondo",
"backgroundImageSet": "Imagen de fondo asignada correctamente",
"alertsDescription": "Establece los parámetros que controlan el monitoreo y las alertas del dispositivo.",
"alertsUpdated": "Alertas actualizadas",
"errorAlertUpdate": "No se pudieron actualizar las alertas",
"alertSos": "Emergencia",
"alertFalldown": "Caída",
"alertLowBattery": "Batería baja",
"alertGeofenceIn": "Entrada a zona",
"alertGeofenceOut": "Salida de zona",
"alertDisconnect": "Desconectado",
"alertBraceletRemoved": "Pulsera quitada",
"alertStandstill": "Inactividad prolongada",
"alertAbnormalHeartRate": "Ritmo cardíaco anormal",
"alertReconnect": "Reconectado",
"alertMovement": "Movimiento",
"disableFunctionsKeyboard": "Teclado de marcación",
"disableFunctionsGps": "Posicionamiento GPS",
"disableFunctionsNightMode": "Modo nocturno",
"disableFunctionsUpdated": "Funciones actualizadas",
"errorDisableFunctions": "No se pudieron actualizar las funciones",
"batteryNightSaving": "Ahorro nocturno de batería",
"batteryNightModeTitle": "Modo de ahorro de energía nocturno",
"batteryNightModeDescription": "El reloj ahorrará batería y se desconectará de todas las redes entre las 22:00 y las 06:00.",
"batteryNightModeUpdated": "Modo nocturno actualizado",
"errorBatteryNightMode": "No se pudo actualizar el modo nocturno",
"timezoneUpdated": "Zona horaria actualizada",
"errorTimezone": "No se pudo actualizar la zona horaria",
"timezoneOther": "Otras zonas horarias",
"blockedCallsList": "Lista de llamadas bloqueados"
}

View File

@@ -629,7 +629,78 @@
"measure": "Mesurer",
"callHistory": "Historique des appels",
"callHistoryEmpty": "Aucun appel enregistré",
"timezoneSearch": "Rechercher une ville...",
"timezoneNoResults": "Aucune ville trouvée",
"callIncoming": "Entrants",
"callOutgoing": "Sortants",
"callMissed": "Manqués"
"callMissed": "Manqués",
"healthFrequency": "Fréquence",
"healthMeasuring": "Mesure en cours...",
"geofenceCreated": "Géorepère créé",
"geofenceUpdated": "Géorepère mis à jour",
"geofenceDeleted": "Géorepère supprimé",
"frequentPlaceCreated": "Lieu fréquent créé",
"frequentPlaceUpdated": "Lieu fréquent mis à jour",
"frequentPlaceDeleted": "Lieu fréquent supprimé",
"errorGeneric": "Une erreur est survenue. Veuillez réessayer.",
"errorGeofenceCreate": "Impossible de créer la zone de sécurité",
"errorGeofenceUpdate": "Impossible de mettre à jour la zone de sécurité",
"errorGeofenceDelete": "Impossible de supprimer la zone de sécurité",
"errorFrequentPlaceCreate": "Impossible de créer le lieu fréquent",
"errorFrequentPlaceUpdate": "Impossible de mettre à jour le lieu fréquent",
"errorFrequentPlaceDelete": "Impossible de supprimer le lieu fréquent",
"errorPositionHistory": "Impossible de charger l'historique des positions",
"errorLocationFrequency": "Impossible de mettre à jour la fréquence de localisation",
"errorRefreshPosition": "Impossible de rafraîchir la position",
"errorHealthData": "Impossible de charger les données de santé",
"errorHealthMeasure": "Impossible d'envoyer la commande de mesure",
"errorHeartRateFrequency": "Impossible de mettre à jour la fréquence cardiaque",
"errorSoundMode": "Impossible de mettre à jour le mode sonore",
"errorVolumeControl": "Impossible de mettre à jour le volume",
"errorLanguage": "Impossible de mettre à jour la langue",
"locationFrequencyUpdated": "Fréquence mise à jour à {minutes} min",
"activityMeterPedometer": "Podomètre",
"activityMeterPedometerEnabled": "Podomètre activé",
"activityMeterPedometerDisabled": "Podomètre désactivé",
"errorActivityData": "Impossible de charger les données d'activité",
"errorPedometer": "Impossible de mettre à jour le podomètre",
"errorContactsMin": "L'appareil doit avoir au moins un contact",
"errorContactsMax": "L'appareil ne peut pas avoir plus de 10 contacts",
"customBackground": "Image de fond personnalisée",
"backgroundImageDescription": "Définissez une photo comme écran de veille personnalisé pour l'appareil",
"backgroundImageTapToSelect": "Appuyez pour sélectionner une photo",
"backgroundImageTapToChange": "Appuyez sur l'image pour changer l'écran de veille",
"backgroundImageUploaded": "Image de fond mise à jour",
"errorBackgroundImageLoad": "Impossible de charger l'image de fond",
"errorBackgroundImageUpload": "Impossible de télécharger l'image de fond",
"errorBackgroundImageSet": "Impossible de définir l'image de fond",
"backgroundImageSet": "Image de fond définie avec succès",
"alerts": "Alertes",
"alertsDescription": "Définissez les paramètres de surveillance et d'alertes de l'appareil.",
"alertsUpdated": "Alertes mises à jour",
"errorAlertUpdate": "Impossible de mettre à jour les alertes",
"alertSos": "Urgence",
"alertFalldown": "Chute",
"alertLowBattery": "Batterie faible",
"alertGeofenceIn": "Entrée de zone",
"alertGeofenceOut": "Sortie de zone",
"alertDisconnect": "Déconnecté",
"alertBraceletRemoved": "Bracelet retiré",
"alertStandstill": "Inactivité prolongée",
"alertAbnormalHeartRate": "Rythme cardiaque anormal",
"alertReconnect": "Reconnecté",
"alertMovement": "Mouvement",
"disableFunctionsKeyboard": "Clavier de numérotation",
"disableFunctionsGps": "Positionnement GPS",
"disableFunctionsNightMode": "Mode nuit",
"disableFunctionsUpdated": "Fonctions mises à jour",
"errorDisableFunctions": "Impossible de mettre à jour les fonctions",
"batteryNightSaving": "Économie nocturne de batterie",
"batteryNightModeTitle": "Mode d'économie d'énergie nocturne",
"batteryNightModeDescription": "La montre économisera la batterie et se déconnectera de tous les réseaux entre 22h00 et 06h00.",
"batteryNightModeUpdated": "Mode nuit mis à jour",
"errorBatteryNightMode": "Impossible de mettre à jour le mode nuit",
"timezoneUpdated": "Fuseau horaire mis à jour",
"errorTimezone": "Impossible de mettre à jour le fuseau horaire",
"timezoneOther": "Autres fuseaux horaires"
}

View File

@@ -629,7 +629,78 @@
"measure": "Misurare",
"callHistory": "Cronologia chiamate",
"callHistoryEmpty": "Nessuna chiamata registrata",
"timezoneSearch": "Cerca città...",
"timezoneNoResults": "Nessuna città trovata",
"callIncoming": "In arrivo",
"callOutgoing": "In uscita",
"callMissed": "Perse"
"callMissed": "Perse",
"healthFrequency": "Frequenza",
"healthMeasuring": "Misurazione in corso...",
"geofenceCreated": "Geofence creato",
"geofenceUpdated": "Geofence aggiornato",
"geofenceDeleted": "Geofence eliminato",
"frequentPlaceCreated": "Luogo frequente creato",
"frequentPlaceUpdated": "Luogo frequente aggiornato",
"frequentPlaceDeleted": "Luogo frequente eliminato",
"errorGeneric": "Qualcosa è andato storto. Riprova.",
"errorGeofenceCreate": "Impossibile creare la zona di sicurezza",
"errorGeofenceUpdate": "Impossibile aggiornare la zona di sicurezza",
"errorGeofenceDelete": "Impossibile eliminare la zona di sicurezza",
"errorFrequentPlaceCreate": "Impossibile creare il luogo frequente",
"errorFrequentPlaceUpdate": "Impossibile aggiornare il luogo frequente",
"errorFrequentPlaceDelete": "Impossibile eliminare il luogo frequente",
"errorPositionHistory": "Impossibile caricare la cronologia delle posizioni",
"errorLocationFrequency": "Impossibile aggiornare la frequenza di localizzazione",
"errorRefreshPosition": "Impossibile aggiornare la posizione",
"errorHealthData": "Impossibile caricare i dati sanitari",
"errorHealthMeasure": "Impossibile inviare il comando di misurazione",
"errorHeartRateFrequency": "Impossibile aggiornare la frequenza cardiaca",
"errorSoundMode": "Impossibile aggiornare la modalità audio",
"errorVolumeControl": "Impossibile aggiornare il volume",
"errorLanguage": "Impossibile aggiornare la lingua",
"locationFrequencyUpdated": "Frequenza aggiornata a {minutes} min",
"activityMeterPedometer": "Contapassi",
"activityMeterPedometerEnabled": "Contapassi attivato",
"activityMeterPedometerDisabled": "Contapassi disattivato",
"errorActivityData": "Impossibile caricare i dati di attività",
"errorPedometer": "Impossibile aggiornare il contapassi",
"errorContactsMin": "Il dispositivo deve avere almeno un contatto",
"errorContactsMax": "Il dispositivo non può avere più di 10 contatti",
"customBackground": "Immagine di sfondo personalizzata",
"backgroundImageDescription": "Imposta una foto come screensaver personalizzato per il dispositivo",
"backgroundImageTapToSelect": "Tocca per selezionare una foto",
"backgroundImageTapToChange": "Tocca l'immagine per cambiare lo screensaver",
"backgroundImageUploaded": "Immagine di sfondo aggiornata",
"errorBackgroundImageLoad": "Impossibile caricare l'immagine di sfondo",
"errorBackgroundImageUpload": "Impossibile caricare l'immagine di sfondo",
"errorBackgroundImageSet": "Impossibile impostare l'immagine di sfondo",
"backgroundImageSet": "Immagine di sfondo impostata con successo",
"alerts": "Avvisi",
"alertsDescription": "Imposta i parametri che controllano il monitoraggio e gli avvisi del dispositivo.",
"alertsUpdated": "Avvisi aggiornati",
"errorAlertUpdate": "Impossibile aggiornare gli avvisi",
"alertSos": "Emergenza",
"alertFalldown": "Caduta",
"alertLowBattery": "Batteria scarica",
"alertGeofenceIn": "Ingresso zona",
"alertGeofenceOut": "Uscita zona",
"alertDisconnect": "Disconnesso",
"alertBraceletRemoved": "Braccialetto rimosso",
"alertStandstill": "Inattività prolungata",
"alertAbnormalHeartRate": "Frequenza cardiaca anomala",
"alertReconnect": "Riconnesso",
"alertMovement": "Movimento",
"disableFunctionsKeyboard": "Tastierino di composizione",
"disableFunctionsGps": "Posizionamento GPS",
"disableFunctionsNightMode": "Modalità notturna",
"disableFunctionsUpdated": "Funzioni aggiornate",
"errorDisableFunctions": "Impossibile aggiornare le funzioni",
"batteryNightSaving": "Risparmio notturno batteria",
"batteryNightModeTitle": "Modalità risparmio energetico notturno",
"batteryNightModeDescription": "L'orologio risparmierà batteria e si disconnetterà da tutte le reti tra le 22:00 e le 06:00.",
"batteryNightModeUpdated": "Modalità notturna aggiornata",
"errorBatteryNightMode": "Impossibile aggiornare la modalità notturna",
"timezoneUpdated": "Fuso orario aggiornato",
"errorTimezone": "Impossibile aggiornare il fuso orario",
"timezoneOther": "Altri fusi orari"
}

View File

@@ -629,7 +629,78 @@
"measure": "Medir",
"callHistory": "Histórico de chamadas",
"callHistoryEmpty": "Nenhuma chamada registrada",
"timezoneSearch": "Buscar cidade...",
"timezoneNoResults": "Nenhuma cidade encontrada",
"callIncoming": "Recebidas",
"callOutgoing": "Efetuadas",
"callMissed": "Perdidas"
"callMissed": "Perdidas",
"healthFrequency": "Frequência",
"healthMeasuring": "Medindo...",
"geofenceCreated": "Geocerca criada",
"geofenceUpdated": "Geocerca atualizada",
"geofenceDeleted": "Geocerca eliminada",
"frequentPlaceCreated": "Local frequente criado",
"frequentPlaceUpdated": "Local frequente atualizado",
"frequentPlaceDeleted": "Local frequente eliminado",
"errorGeneric": "Algo correu mal. Tente novamente.",
"errorGeofenceCreate": "Não foi possível criar a zona de segurança",
"errorGeofenceUpdate": "Não foi possível atualizar a zona de segurança",
"errorGeofenceDelete": "Não foi possível eliminar a zona de segurança",
"errorFrequentPlaceCreate": "Não foi possível criar o local frequente",
"errorFrequentPlaceUpdate": "Não foi possível atualizar o local frequente",
"errorFrequentPlaceDelete": "Não foi possível eliminar o local frequente",
"errorPositionHistory": "Não foi possível carregar o histórico de posições",
"errorLocationFrequency": "Não foi possível atualizar a frequência de localização",
"errorRefreshPosition": "Não foi possível atualizar a posição",
"errorHealthData": "Não foi possível carregar os dados de saúde",
"errorHealthMeasure": "Não foi possível enviar o comando de medição",
"errorHeartRateFrequency": "Não foi possível atualizar a frequência cardíaca",
"errorSoundMode": "Não foi possível atualizar o modo de som",
"errorVolumeControl": "Não foi possível atualizar o volume",
"errorLanguage": "Não foi possível atualizar o idioma",
"locationFrequencyUpdated": "Frequência atualizada para {minutes} min",
"activityMeterPedometer": "Pedómetro",
"activityMeterPedometerEnabled": "Pedómetro ativado",
"activityMeterPedometerDisabled": "Pedómetro desativado",
"errorActivityData": "Não foi possível carregar os dados de atividade",
"errorPedometer": "Não foi possível atualizar o pedómetro",
"errorContactsMin": "O dispositivo deve ter pelo menos um contacto",
"errorContactsMax": "O dispositivo não pode ter mais de 10 contactos",
"customBackground": "Imagem de fundo personalizada",
"backgroundImageDescription": "Defina uma foto como protetor de ecrã personalizado para o dispositivo",
"backgroundImageTapToSelect": "Toque para selecionar uma foto",
"backgroundImageTapToChange": "Toque na imagem para alterar o protetor de ecrã",
"backgroundImageUploaded": "Imagem de fundo atualizada",
"errorBackgroundImageLoad": "Não foi possível carregar a imagem de fundo",
"errorBackgroundImageUpload": "Não foi possível carregar a imagem de fundo",
"errorBackgroundImageSet": "Não foi possível definir a imagem de fundo",
"backgroundImageSet": "Imagem de fundo definida com sucesso",
"alerts": "Alertas",
"alertsDescription": "Define os parâmetros que controlam a monitorização e os alertas do dispositivo.",
"alertsUpdated": "Alertas atualizados",
"errorAlertUpdate": "Não foi possível atualizar os alertas",
"alertSos": "Emergência",
"alertFalldown": "Queda",
"alertLowBattery": "Bateria fraca",
"alertGeofenceIn": "Entrada na zona",
"alertGeofenceOut": "Saída da zona",
"alertDisconnect": "Desconectado",
"alertBraceletRemoved": "Pulseira removida",
"alertStandstill": "Inatividade prolongada",
"alertAbnormalHeartRate": "Frequência cardíaca anormal",
"alertReconnect": "Reconectado",
"alertMovement": "Movimento",
"disableFunctionsKeyboard": "Teclado de marcação",
"disableFunctionsGps": "Posicionamento GPS",
"disableFunctionsNightMode": "Modo noturno",
"disableFunctionsUpdated": "Funções atualizadas",
"errorDisableFunctions": "Não foi possível atualizar as funções",
"batteryNightSaving": "Economia noturna de bateria",
"batteryNightModeTitle": "Modo de economia de energia noturno",
"batteryNightModeDescription": "O relógio poupará bateria e desconectar-se-á de todas as redes entre as 22:00 e as 06:00.",
"batteryNightModeUpdated": "Modo noturno atualizado",
"errorBatteryNightMode": "Não foi possível atualizar o modo noturno",
"timezoneUpdated": "Fuso horário atualizado",
"errorTimezone": "Não foi possível atualizar o fuso horário",
"timezoneOther": "Outros fusos horários"
}

View File

@@ -641,7 +641,7 @@ class I18n {
static const String signIn = 'signIn';
static const String silent = 'silent';
static const String skip = 'skip';
static const String smsAlert = 'smsAlert';
static const String alerts = 'alerts';
static const String smsSent = 'smsSent';
static const String sosContacts = 'sosContacts';
static const String sosContactsCount = 'sosContactsCount';
@@ -768,8 +768,74 @@ class I18n {
static const String noPhotosAvailable = 'noPhotosAvailable';
static const String yesterday = 'yesterday';
static const String measure = 'measure';
static const String healthFrequency = 'healthFrequency';
static const String healthMeasuring = 'healthMeasuring';
static const String geofenceCreated = 'geofenceCreated';
static const String geofenceUpdated = 'geofenceUpdated';
static const String geofenceDeleted = 'geofenceDeleted';
static const String frequentPlaceCreated = 'frequentPlaceCreated';
static const String frequentPlaceUpdated = 'frequentPlaceUpdated';
static const String frequentPlaceDeleted = 'frequentPlaceDeleted';
static const String errorGeneric = 'errorGeneric';
static const String errorGeofenceCreate = 'errorGeofenceCreate';
static const String errorGeofenceUpdate = 'errorGeofenceUpdate';
static const String errorGeofenceDelete = 'errorGeofenceDelete';
static const String errorFrequentPlaceCreate = 'errorFrequentPlaceCreate';
static const String errorFrequentPlaceUpdate = 'errorFrequentPlaceUpdate';
static const String errorFrequentPlaceDelete = 'errorFrequentPlaceDelete';
static const String errorPositionHistory = 'errorPositionHistory';
static const String errorLocationFrequency = 'errorLocationFrequency';
static const String errorRefreshPosition = 'errorRefreshPosition';
static const String errorHealthData = 'errorHealthData';
static const String errorHealthMeasure = 'errorHealthMeasure';
static const String errorHeartRateFrequency = 'errorHeartRateFrequency';
static const String errorSoundMode = 'errorSoundMode';
static const String errorVolumeControl = 'errorVolumeControl';
static const String errorLanguage = 'errorLanguage';
static const String locationFrequencyUpdated = 'locationFrequencyUpdated';
static const String activityMeterPedometer = 'activityMeterPedometer';
static const String activityMeterPedometerEnabled = 'activityMeterPedometerEnabled';
static const String activityMeterPedometerDisabled = 'activityMeterPedometerDisabled';
static const String errorActivityData = 'errorActivityData';
static const String errorPedometer = 'errorPedometer';
static const String errorContactsMin = 'errorContactsMin';
static const String errorContactsMax = 'errorContactsMax';
static const String customBackground = 'customBackground';
static const String backgroundImageDescription = 'backgroundImageDescription';
static const String backgroundImageTapToSelect = 'backgroundImageTapToSelect';
static const String backgroundImageTapToChange = 'backgroundImageTapToChange';
static const String backgroundImageUploaded = 'backgroundImageUploaded';
static const String errorBackgroundImageLoad = 'errorBackgroundImageLoad';
static const String errorBackgroundImageUpload = 'errorBackgroundImageUpload';
static const String errorBackgroundImageSet = 'errorBackgroundImageSet';
static const String backgroundImageSet = 'backgroundImageSet';
static const String alertsDescription = 'alertsDescription';
static const String alertsUpdated = 'alertsUpdated';
static const String errorAlertUpdate = 'errorAlertUpdate';
static const String alertSos = 'alertSos';
static const String alertFalldown = 'alertFalldown';
static const String alertLowBattery = 'alertLowBattery';
static const String alertGeofenceIn = 'alertGeofenceIn';
static const String alertGeofenceOut = 'alertGeofenceOut';
static const String alertDisconnect = 'alertDisconnect';
static const String alertBraceletRemoved = 'alertBraceletRemoved';
static const String alertStandstill = 'alertStandstill';
static const String alertAbnormalHeartRate = 'alertAbnormalHeartRate';
static const String alertReconnect = 'alertReconnect';
static const String alertMovement = 'alertMovement';
static const String disableFunctionsKeyboard = 'disableFunctionsKeyboard';
static const String disableFunctionsGps = 'disableFunctionsGps';
static const String disableFunctionsNightMode = 'disableFunctionsNightMode';
static const String disableFunctionsUpdated = 'disableFunctionsUpdated';
static const String errorDisableFunctions = 'errorDisableFunctions';
static const String batteryNightSaving = 'batteryNightSaving';
static const String batteryNightModeTitle = 'batteryNightModeTitle';
static const String batteryNightModeDescription = 'batteryNightModeDescription';
static const String batteryNightModeUpdated = 'batteryNightModeUpdated';
static const String errorBatteryNightMode = 'errorBatteryNightMode';
static const String timezoneUpdated = 'timezoneUpdated';
static const String errorTimezone = 'errorTimezone';
static const String timezoneOther = 'timezoneOther';
static const String blockedCallsList = 'blockedCallsList';
static const String allowContacts = 'allowContacts';
static const String allowContactsMessage = 'allowContactsMessage';

View File

@@ -34,7 +34,11 @@ export 'src/domain/entities/transaction_beneficiary_entity.dart';
export 'src/data/models/payout_beneficiary_model.dart';
export 'src/domain/entities/payout_beneficiary_entity.dart';
export 'src/data/models/device_model.dart';
export 'src/data/models/device_settings_model.dart';
export 'src/data/models/device_capabilities_model.dart';
export 'src/domain/entities/device_entity.dart';
export 'src/domain/entities/device_settings_entity.dart';
export 'src/domain/entities/device_capabilities_entity.dart';
export 'src/data/models/child_wallet_model.dart';
export 'src/domain/entities/child_wallet_entity.dart';
export 'src/providers/wallet_refresh_provider.dart';

View File

@@ -0,0 +1,194 @@
// ignore_for_file: invalid_annotation_target
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:sf_shared/src/domain/entities/device_capabilities_entity.dart';
part 'device_capabilities_model.freezed.dart';
part 'device_capabilities_model.g.dart';
@freezed
abstract class DeviceCapabilitiesModel with _$DeviceCapabilitiesModel {
const factory DeviceCapabilitiesModel({
DeviceCapabilityOptionModel? heartbeats,
DeviceCapabilityEnabledModel? bloodPressure,
DeviceCapabilityAlertsModel? alerts,
DeviceCapabilityEnabledModel? podometer,
DeviceCapabilityContactsModel? contacts,
DeviceCapabilitySettingsModel? settings,
DeviceCapabilityCommandsModel? commands,
DeviceCapabilityTakepillsModel? takepills,
DeviceCapabilityOptionModel? location,
DeviceCapabilityCameraModel? camera,
}) = _DeviceCapabilitiesModel;
factory DeviceCapabilitiesModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilitiesModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityEnabledModel with _$DeviceCapabilityEnabledModel {
const factory DeviceCapabilityEnabledModel({
@Default(false) bool enabled,
}) = _DeviceCapabilityEnabledModel;
factory DeviceCapabilityEnabledModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityEnabledModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityOptionModel with _$DeviceCapabilityOptionModel {
const factory DeviceCapabilityOptionModel({
@JsonKey(name: 'default') @Default(0) int defaultValue,
@Default(false) bool enabled,
@Default([]) List<int> options,
}) = _DeviceCapabilityOptionModel;
factory DeviceCapabilityOptionModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityOptionModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityAlertsModel with _$DeviceCapabilityAlertsModel {
const factory DeviceCapabilityAlertsModel({
@Default(false) bool enabled,
@Default([]) List<String> types,
}) = _DeviceCapabilityAlertsModel;
factory DeviceCapabilityAlertsModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityAlertsModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityContactsModel with _$DeviceCapabilityContactsModel {
const factory DeviceCapabilityContactsModel({
@Default(false) bool enabled,
@Default([]) List<DeviceCapabilityContactTypeModel> types,
@Default(false) bool isPhonebookWithPhoto,
}) = _DeviceCapabilityContactsModel;
factory DeviceCapabilityContactsModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityContactsModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityContactTypeModel with _$DeviceCapabilityContactTypeModel {
const factory DeviceCapabilityContactTypeModel({
@Default('') String type,
@Default(0) int amount,
}) = _DeviceCapabilityContactTypeModel;
factory DeviceCapabilityContactTypeModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityContactTypeModelFromJson(json);
}
@freezed
abstract class DeviceCapabilitySettingsModel with _$DeviceCapabilitySettingsModel {
const factory DeviceCapabilitySettingsModel({
@Default(false) bool language,
@Default(false) bool timezone,
@Default([]) List<String> soundModes,
}) = _DeviceCapabilitySettingsModel;
factory DeviceCapabilitySettingsModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilitySettingsModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityCommandsModel with _$DeviceCapabilityCommandsModel {
const factory DeviceCapabilityCommandsModel({
@Default(false) bool enabled,
@Default([]) List<String> types,
}) = _DeviceCapabilityCommandsModel;
factory DeviceCapabilityCommandsModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityCommandsModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityTakepillsModel with _$DeviceCapabilityTakepillsModel {
const factory DeviceCapabilityTakepillsModel({
@Default(false) bool enabled,
@Default(0) int maxReminders,
}) = _DeviceCapabilityTakepillsModel;
factory DeviceCapabilityTakepillsModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityTakepillsModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityCameraModel with _$DeviceCapabilityCameraModel {
const factory DeviceCapabilityCameraModel({
@Default('') String format,
@Default(false) bool enabled,
}) = _DeviceCapabilityCameraModel;
factory DeviceCapabilityCameraModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityCameraModelFromJson(json);
}
extension DeviceCapabilitiesModelMapper on DeviceCapabilitiesModel {
DeviceCapabilitiesEntity toEntity() => DeviceCapabilitiesEntity(
heartbeats: heartbeats != null
? DeviceCapabilityOptionEntity(
defaultValue: heartbeats!.defaultValue,
enabled: heartbeats!.enabled,
options: heartbeats!.options,
)
: null,
bloodPressure: bloodPressure != null
? DeviceCapabilityEnabledEntity(enabled: bloodPressure!.enabled)
: null,
alerts: alerts != null
? DeviceCapabilityAlertsEntity(
enabled: alerts!.enabled,
types: alerts!.types,
)
: null,
podometer: podometer != null
? DeviceCapabilityEnabledEntity(enabled: podometer!.enabled)
: null,
contacts: contacts != null
? DeviceCapabilityContactsEntity(
enabled: contacts!.enabled,
types: contacts!.types
.map((t) => DeviceCapabilityContactTypeEntity(
type: t.type,
amount: t.amount,
))
.toList(),
isPhonebookWithPhoto: contacts!.isPhonebookWithPhoto,
)
: null,
settings: settings != null
? DeviceCapabilitySettingsEntity(
language: settings!.language,
timezone: settings!.timezone,
soundModes: settings!.soundModes,
)
: null,
commands: commands != null
? DeviceCapabilityCommandsEntity(
enabled: commands!.enabled,
types: commands!.types,
)
: null,
takepills: takepills != null
? DeviceCapabilityTakepillsEntity(
enabled: takepills!.enabled,
maxReminders: takepills!.maxReminders,
)
: null,
location: location != null
? DeviceCapabilityOptionEntity(
defaultValue: location!.defaultValue,
enabled: location!.enabled,
options: location!.options,
)
: null,
camera: camera != null
? DeviceCapabilityCameraEntity(
format: camera!.format,
enabled: camera!.enabled,
)
: null,
);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,211 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'device_capabilities_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_DeviceCapabilitiesModel _$DeviceCapabilitiesModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilitiesModel(
heartbeats: json['heartbeats'] == null
? null
: DeviceCapabilityOptionModel.fromJson(
json['heartbeats'] as Map<String, dynamic>,
),
bloodPressure: json['bloodPressure'] == null
? null
: DeviceCapabilityEnabledModel.fromJson(
json['bloodPressure'] as Map<String, dynamic>,
),
alerts: json['alerts'] == null
? null
: DeviceCapabilityAlertsModel.fromJson(
json['alerts'] as Map<String, dynamic>,
),
podometer: json['podometer'] == null
? null
: DeviceCapabilityEnabledModel.fromJson(
json['podometer'] as Map<String, dynamic>,
),
contacts: json['contacts'] == null
? null
: DeviceCapabilityContactsModel.fromJson(
json['contacts'] as Map<String, dynamic>,
),
settings: json['settings'] == null
? null
: DeviceCapabilitySettingsModel.fromJson(
json['settings'] as Map<String, dynamic>,
),
commands: json['commands'] == null
? null
: DeviceCapabilityCommandsModel.fromJson(
json['commands'] as Map<String, dynamic>,
),
takepills: json['takepills'] == null
? null
: DeviceCapabilityTakepillsModel.fromJson(
json['takepills'] as Map<String, dynamic>,
),
location: json['location'] == null
? null
: DeviceCapabilityOptionModel.fromJson(
json['location'] as Map<String, dynamic>,
),
camera: json['camera'] == null
? null
: DeviceCapabilityCameraModel.fromJson(
json['camera'] as Map<String, dynamic>,
),
);
Map<String, dynamic> _$DeviceCapabilitiesModelToJson(
_DeviceCapabilitiesModel instance,
) => <String, dynamic>{
'heartbeats': instance.heartbeats,
'bloodPressure': instance.bloodPressure,
'alerts': instance.alerts,
'podometer': instance.podometer,
'contacts': instance.contacts,
'settings': instance.settings,
'commands': instance.commands,
'takepills': instance.takepills,
'location': instance.location,
'camera': instance.camera,
};
_DeviceCapabilityEnabledModel _$DeviceCapabilityEnabledModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityEnabledModel(enabled: json['enabled'] as bool? ?? false);
Map<String, dynamic> _$DeviceCapabilityEnabledModelToJson(
_DeviceCapabilityEnabledModel instance,
) => <String, dynamic>{'enabled': instance.enabled};
_DeviceCapabilityOptionModel _$DeviceCapabilityOptionModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityOptionModel(
defaultValue: (json['default'] as num?)?.toInt() ?? 0,
enabled: json['enabled'] as bool? ?? false,
options:
(json['options'] as List<dynamic>?)
?.map((e) => (e as num).toInt())
.toList() ??
const [],
);
Map<String, dynamic> _$DeviceCapabilityOptionModelToJson(
_DeviceCapabilityOptionModel instance,
) => <String, dynamic>{
'default': instance.defaultValue,
'enabled': instance.enabled,
'options': instance.options,
};
_DeviceCapabilityAlertsModel _$DeviceCapabilityAlertsModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityAlertsModel(
enabled: json['enabled'] as bool? ?? false,
types:
(json['types'] as List<dynamic>?)?.map((e) => e as String).toList() ??
const [],
);
Map<String, dynamic> _$DeviceCapabilityAlertsModelToJson(
_DeviceCapabilityAlertsModel instance,
) => <String, dynamic>{'enabled': instance.enabled, 'types': instance.types};
_DeviceCapabilityContactsModel _$DeviceCapabilityContactsModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityContactsModel(
enabled: json['enabled'] as bool? ?? false,
types:
(json['types'] as List<dynamic>?)
?.map(
(e) => DeviceCapabilityContactTypeModel.fromJson(
e as Map<String, dynamic>,
),
)
.toList() ??
const [],
isPhonebookWithPhoto: json['isPhonebookWithPhoto'] as bool? ?? false,
);
Map<String, dynamic> _$DeviceCapabilityContactsModelToJson(
_DeviceCapabilityContactsModel instance,
) => <String, dynamic>{
'enabled': instance.enabled,
'types': instance.types,
'isPhonebookWithPhoto': instance.isPhonebookWithPhoto,
};
_DeviceCapabilityContactTypeModel _$DeviceCapabilityContactTypeModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityContactTypeModel(
type: json['type'] as String? ?? '',
amount: (json['amount'] as num?)?.toInt() ?? 0,
);
Map<String, dynamic> _$DeviceCapabilityContactTypeModelToJson(
_DeviceCapabilityContactTypeModel instance,
) => <String, dynamic>{'type': instance.type, 'amount': instance.amount};
_DeviceCapabilitySettingsModel _$DeviceCapabilitySettingsModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilitySettingsModel(
language: json['language'] as bool? ?? false,
timezone: json['timezone'] as bool? ?? false,
soundModes:
(json['soundModes'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
const [],
);
Map<String, dynamic> _$DeviceCapabilitySettingsModelToJson(
_DeviceCapabilitySettingsModel instance,
) => <String, dynamic>{
'language': instance.language,
'timezone': instance.timezone,
'soundModes': instance.soundModes,
};
_DeviceCapabilityCommandsModel _$DeviceCapabilityCommandsModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityCommandsModel(
enabled: json['enabled'] as bool? ?? false,
types:
(json['types'] as List<dynamic>?)?.map((e) => e as String).toList() ??
const [],
);
Map<String, dynamic> _$DeviceCapabilityCommandsModelToJson(
_DeviceCapabilityCommandsModel instance,
) => <String, dynamic>{'enabled': instance.enabled, 'types': instance.types};
_DeviceCapabilityTakepillsModel _$DeviceCapabilityTakepillsModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityTakepillsModel(
enabled: json['enabled'] as bool? ?? false,
maxReminders: (json['maxReminders'] as num?)?.toInt() ?? 0,
);
Map<String, dynamic> _$DeviceCapabilityTakepillsModelToJson(
_DeviceCapabilityTakepillsModel instance,
) => <String, dynamic>{
'enabled': instance.enabled,
'maxReminders': instance.maxReminders,
};
_DeviceCapabilityCameraModel _$DeviceCapabilityCameraModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityCameraModel(
format: json['format'] as String? ?? '',
enabled: json['enabled'] as bool? ?? false,
);
Map<String, dynamic> _$DeviceCapabilityCameraModelToJson(
_DeviceCapabilityCameraModel instance,
) => <String, dynamic>{'format': instance.format, 'enabled': instance.enabled};

View File

@@ -2,6 +2,9 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:sf_shared/src/domain/entities/device_entity.dart';
import 'device_capabilities_model.dart';
import 'device_settings_model.dart';
part 'device_model.freezed.dart';
part 'device_model.g.dart';
@@ -41,11 +44,11 @@ abstract class DeviceModel with _$DeviceModel {
@Default(null) String? phone,
@Default(null) String? simId,
@Default(null) Map<String, dynamic>? paymentOptions,
@Default({}) Map<String, dynamic> settings,
@Default(DeviceSettingsModel()) DeviceSettingsModel settings,
@Default('') String connectionServer,
@Default('') String protocol,
@Default('') String type,
@Default(null) Map<String, dynamic>? capabilities,
@Default(null) DeviceCapabilitiesModel? capabilities,
@JsonKey(fromJson: _toString) @Default('') String createdAt,
@JsonKey(fromJson: _toNullableString) @Default(null) String? updatedAt,
}) = _DeviceModel;
@@ -75,11 +78,11 @@ extension DeviceModelMapper on DeviceModel {
phone: phone,
simId: simId,
paymentOptions: paymentOptions,
settings: settings,
settings: settings.toEntity(),
connectionServer: connectionServer,
protocol: protocol,
type: type,
capabilities: capabilities,
capabilities: capabilities?.toEntity(),
createdAt: createdAt,
updatedAt: updatedAt,
);

View File

@@ -296,7 +296,7 @@ $DeviceModelCopyWith<$Res> get item {
/// @nodoc
mixin _$DeviceModel {
String get id;@JsonKey(fromJson: _toString) String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map<String, dynamic> get flags; List<String>? get tags; String? get lastConnection; String? get carrierGenre;@JsonKey(fromJson: _toNullableString) String? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String? get carrierName; String? get comment; String? get phone; String? get simId; Map<String, dynamic>? get paymentOptions; Map<String, dynamic> get settings; String get connectionServer; String get protocol; String get type; Map<String, dynamic>? get capabilities;@JsonKey(fromJson: _toString) String get createdAt;@JsonKey(fromJson: _toNullableString) String? get updatedAt;
String get id;@JsonKey(fromJson: _toString) String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map<String, dynamic> get flags; List<String>? get tags; String? get lastConnection; String? get carrierGenre;@JsonKey(fromJson: _toNullableString) String? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String? get carrierName; String? get comment; String? get phone; String? get simId; Map<String, dynamic>? get paymentOptions; DeviceSettingsModel get settings; String get connectionServer; String get protocol; String get type; DeviceCapabilitiesModel? get capabilities;@JsonKey(fromJson: _toString) String get createdAt;@JsonKey(fromJson: _toNullableString) String? get updatedAt;
/// Create a copy of DeviceModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -309,12 +309,12 @@ $DeviceModelCopyWith<DeviceModel> get copyWith => _$DeviceModelCopyWithImpl<Devi
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceModel&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other.flags, flags)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&const DeepCollectionEquality().equals(other.settings, settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.capabilities, capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceModel&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other.flags, flags)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(flags),const DeepCollectionEquality().hash(tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(paymentOptions),const DeepCollectionEquality().hash(settings),connectionServer,protocol,type,const DeepCollectionEquality().hash(capabilities),createdAt,updatedAt]);
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(flags),const DeepCollectionEquality().hash(tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(paymentOptions),settings,connectionServer,protocol,type,capabilities,createdAt,updatedAt]);
@override
String toString() {
@@ -329,11 +329,11 @@ abstract mixin class $DeviceModelCopyWith<$Res> {
factory $DeviceModelCopyWith(DeviceModel value, $Res Function(DeviceModel) _then) = _$DeviceModelCopyWithImpl;
@useResult
$Res call({
String id,@JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre,@JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities,@JsonKey(fromJson: _toString) String createdAt,@JsonKey(fromJson: _toNullableString) String? updatedAt
String id,@JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre,@JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsModel settings, String connectionServer, String protocol, String type, DeviceCapabilitiesModel? capabilities,@JsonKey(fromJson: _toString) String createdAt,@JsonKey(fromJson: _toNullableString) String? updatedAt
});
$DeviceSettingsModelCopyWith<$Res> get settings;$DeviceCapabilitiesModelCopyWith<$Res>? get capabilities;
}
/// @nodoc
@@ -368,16 +368,37 @@ as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullabl
as String?,simId: freezed == simId ? _self.simId : simId // ignore: cast_nullable_to_non_nullable
as String?,paymentOptions: freezed == paymentOptions ? _self.paymentOptions : paymentOptions // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,settings: null == settings ? _self.settings : settings // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as DeviceSettingsModel,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as String,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DeviceCapabilitiesModel?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of DeviceModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceSettingsModelCopyWith<$Res> get settings {
return $DeviceSettingsModelCopyWith<$Res>(_self.settings, (value) {
return _then(_self.copyWith(settings: value));
});
}/// Create a copy of DeviceModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilitiesModelCopyWith<$Res>? get capabilities {
if (_self.capabilities == null) {
return null;
}
return $DeviceCapabilitiesModelCopyWith<$Res>(_self.capabilities!, (value) {
return _then(_self.copyWith(capabilities: value));
});
}
}
@@ -459,7 +480,7 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, @JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, @JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, @JsonKey(fromJson: _toString) String createdAt, @JsonKey(fromJson: _toNullableString) String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, @JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, @JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsModel settings, String connectionServer, String protocol, String type, DeviceCapabilitiesModel? capabilities, @JsonKey(fromJson: _toString) String createdAt, @JsonKey(fromJson: _toNullableString) String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceModel() when $default != null:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _:
@@ -480,7 +501,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, @JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, @JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, @JsonKey(fromJson: _toString) String createdAt, @JsonKey(fromJson: _toNullableString) String? updatedAt) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, @JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, @JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsModel settings, String connectionServer, String protocol, String type, DeviceCapabilitiesModel? capabilities, @JsonKey(fromJson: _toString) String createdAt, @JsonKey(fromJson: _toNullableString) String? updatedAt) $default,) {final _that = this;
switch (_that) {
case _DeviceModel():
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _:
@@ -500,7 +521,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, @JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, @JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, @JsonKey(fromJson: _toString) String createdAt, @JsonKey(fromJson: _toNullableString) String? updatedAt)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, @JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, @JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsModel settings, String connectionServer, String protocol, String type, DeviceCapabilitiesModel? capabilities, @JsonKey(fromJson: _toString) String createdAt, @JsonKey(fromJson: _toNullableString) String? updatedAt)? $default,) {final _that = this;
switch (_that) {
case _DeviceModel() when $default != null:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _:
@@ -515,7 +536,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
@JsonSerializable()
class _DeviceModel extends DeviceModel {
const _DeviceModel({required this.id, @JsonKey(fromJson: _toString) required this.identificator, this.battery = null, this.userId = null, this.companyId = null, this.delegationId = null, this.groupId = null, final Map<String, dynamic> flags = const {}, final List<String>? tags = null, this.lastConnection = null, this.carrierGenre = null, @JsonKey(fromJson: _toNullableString) this.carrierBirthday = null, this.carrierWeight = null, this.carrierStepLength = null, this.carrierName = null, this.comment = null, this.phone = null, this.simId = null, final Map<String, dynamic>? paymentOptions = null, final Map<String, dynamic> settings = const {}, this.connectionServer = '', this.protocol = '', this.type = '', final Map<String, dynamic>? capabilities = null, @JsonKey(fromJson: _toString) this.createdAt = '', @JsonKey(fromJson: _toNullableString) this.updatedAt = null}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions,_settings = settings,_capabilities = capabilities,super._();
const _DeviceModel({required this.id, @JsonKey(fromJson: _toString) required this.identificator, this.battery = null, this.userId = null, this.companyId = null, this.delegationId = null, this.groupId = null, final Map<String, dynamic> flags = const {}, final List<String>? tags = null, this.lastConnection = null, this.carrierGenre = null, @JsonKey(fromJson: _toNullableString) this.carrierBirthday = null, this.carrierWeight = null, this.carrierStepLength = null, this.carrierName = null, this.comment = null, this.phone = null, this.simId = null, final Map<String, dynamic>? paymentOptions = null, this.settings = const DeviceSettingsModel(), this.connectionServer = '', this.protocol = '', this.type = '', this.capabilities = null, @JsonKey(fromJson: _toString) this.createdAt = '', @JsonKey(fromJson: _toNullableString) this.updatedAt = null}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions,super._();
factory _DeviceModel.fromJson(Map<String, dynamic> json) => _$DeviceModelFromJson(json);
@override final String id;
@@ -559,25 +580,11 @@ class _DeviceModel extends DeviceModel {
return EqualUnmodifiableMapView(value);
}
final Map<String, dynamic> _settings;
@override@JsonKey() Map<String, dynamic> get settings {
if (_settings is EqualUnmodifiableMapView) return _settings;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_settings);
}
@override@JsonKey() final DeviceSettingsModel settings;
@override@JsonKey() final String connectionServer;
@override@JsonKey() final String protocol;
@override@JsonKey() final String type;
final Map<String, dynamic>? _capabilities;
@override@JsonKey() Map<String, dynamic>? get capabilities {
final value = _capabilities;
if (value == null) return null;
if (_capabilities is EqualUnmodifiableMapView) return _capabilities;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
@override@JsonKey() final DeviceCapabilitiesModel? capabilities;
@override@JsonKey(fromJson: _toString) final String createdAt;
@override@JsonKey(fromJson: _toNullableString) final String? updatedAt;
@@ -594,12 +601,12 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceModel&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other._flags, _flags)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&const DeepCollectionEquality().equals(other._settings, _settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._capabilities, _capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceModel&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other._flags, _flags)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(_flags),const DeepCollectionEquality().hash(_tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(_paymentOptions),const DeepCollectionEquality().hash(_settings),connectionServer,protocol,type,const DeepCollectionEquality().hash(_capabilities),createdAt,updatedAt]);
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(_flags),const DeepCollectionEquality().hash(_tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(_paymentOptions),settings,connectionServer,protocol,type,capabilities,createdAt,updatedAt]);
@override
String toString() {
@@ -614,11 +621,11 @@ abstract mixin class _$DeviceModelCopyWith<$Res> implements $DeviceModelCopyWith
factory _$DeviceModelCopyWith(_DeviceModel value, $Res Function(_DeviceModel) _then) = __$DeviceModelCopyWithImpl;
@override @useResult
$Res call({
String id,@JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre,@JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities,@JsonKey(fromJson: _toString) String createdAt,@JsonKey(fromJson: _toNullableString) String? updatedAt
String id,@JsonKey(fromJson: _toString) String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre,@JsonKey(fromJson: _toNullableString) String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsModel settings, String connectionServer, String protocol, String type, DeviceCapabilitiesModel? capabilities,@JsonKey(fromJson: _toString) String createdAt,@JsonKey(fromJson: _toNullableString) String? updatedAt
});
@override $DeviceSettingsModelCopyWith<$Res> get settings;@override $DeviceCapabilitiesModelCopyWith<$Res>? get capabilities;
}
/// @nodoc
@@ -652,18 +659,39 @@ as String?,comment: freezed == comment ? _self.comment : comment // ignore: cast
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
as String?,simId: freezed == simId ? _self.simId : simId // ignore: cast_nullable_to_non_nullable
as String?,paymentOptions: freezed == paymentOptions ? _self._paymentOptions : paymentOptions // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,settings: null == settings ? _self._settings : settings // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,settings: null == settings ? _self.settings : settings // ignore: cast_nullable_to_non_nullable
as DeviceSettingsModel,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as String,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self._capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as DeviceCapabilitiesModel?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of DeviceModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceSettingsModelCopyWith<$Res> get settings {
return $DeviceSettingsModelCopyWith<$Res>(_self.settings, (value) {
return _then(_self.copyWith(settings: value));
});
}/// Create a copy of DeviceModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilitiesModelCopyWith<$Res>? get capabilities {
if (_self.capabilities == null) {
return null;
}
return $DeviceCapabilitiesModelCopyWith<$Res>(_self.capabilities!, (value) {
return _then(_self.copyWith(capabilities: value));
});
}
}
// dart format on

View File

@@ -39,11 +39,17 @@ _DeviceModel _$DeviceModelFromJson(Map<String, dynamic> json) => _DeviceModel(
phone: json['phone'] as String? ?? null,
simId: json['simId'] as String? ?? null,
paymentOptions: json['paymentOptions'] as Map<String, dynamic>? ?? null,
settings: json['settings'] as Map<String, dynamic>? ?? const {},
settings: json['settings'] == null
? const DeviceSettingsModel()
: DeviceSettingsModel.fromJson(json['settings'] as Map<String, dynamic>),
connectionServer: json['connectionServer'] as String? ?? '',
protocol: json['protocol'] as String? ?? '',
type: json['type'] as String? ?? '',
capabilities: json['capabilities'] as Map<String, dynamic>? ?? null,
capabilities: json['capabilities'] == null
? null
: DeviceCapabilitiesModel.fromJson(
json['capabilities'] as Map<String, dynamic>,
),
createdAt: json['createdAt'] == null ? '' : _toString(json['createdAt']),
updatedAt: json['updatedAt'] == null
? null

View File

@@ -0,0 +1,77 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:sf_shared/src/domain/entities/device_settings_entity.dart';
part 'device_settings_model.freezed.dart';
part 'device_settings_model.g.dart';
@freezed
abstract class DeviceSettingsModel with _$DeviceSettingsModel {
const factory DeviceSettingsModel({
@Default(60) int frequency,
@Default(120) int frequencyHeartRate,
@Default(0) int timezone,
@Default(false) bool pedometer,
@Default('es') String language,
@Default([]) List<String> alerts,
@Default(DeviceVolumeModel()) DeviceVolumeModel volume,
String? soundMode,
@Default(true) bool keyboard,
@Default(true) bool gps,
@Default(false) bool nightMode,
}) = _DeviceSettingsModel;
factory DeviceSettingsModel.fromJson(Map<String, dynamic> json) =>
_$DeviceSettingsModelFromJson(json);
}
@freezed
abstract class DeviceVolumeModel with _$DeviceVolumeModel {
const factory DeviceVolumeModel({
@Default(50) int media,
@Default(50) int ringtone,
@Default(50) int alarm,
}) = _DeviceVolumeModel;
factory DeviceVolumeModel.fromJson(Map<String, dynamic> json) =>
_$DeviceVolumeModelFromJson(json);
}
extension DeviceSettingsModelMapper on DeviceSettingsModel {
DeviceSettingsEntity toEntity() => DeviceSettingsEntity(
frequency: frequency,
frequencyHeartRate: frequencyHeartRate,
timezone: timezone,
pedometer: pedometer,
language: language,
alerts: alerts,
volume: DeviceVolumeEntity(
media: volume.media,
ringtone: volume.ringtone,
alarm: volume.alarm,
),
soundMode: soundMode,
keyboard: keyboard,
gps: gps,
nightMode: nightMode,
);
}
extension DeviceSettingsEntityMapper on DeviceSettingsEntity {
Map<String, dynamic> toMap() => {
'frequency': frequency,
'frequencyHeartRate': frequencyHeartRate,
'timezone': timezone,
'pedometer': pedometer,
'language': language,
'alerts': alerts,
'volume': {
'media': volume.media,
'ringtone': volume.ringtone,
'alarm': volume.alarm,
},
'soundMode': soundMode ?? 'VIBRATION',
'keyboard': keyboard,
'gps': gps,
'nightMode': nightMode,
};
}

View File

@@ -0,0 +1,600 @@
// 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 'device_settings_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DeviceSettingsModel {
int get frequency; int get frequencyHeartRate; int get timezone; bool get pedometer; String get language; List<String> get alerts; DeviceVolumeModel get volume; String? get soundMode; bool get keyboard; bool get gps; bool get nightMode;
/// Create a copy of DeviceSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeviceSettingsModelCopyWith<DeviceSettingsModel> get copyWith => _$DeviceSettingsModelCopyWithImpl<DeviceSettingsModel>(this as DeviceSettingsModel, _$identity);
/// Serializes this DeviceSettingsModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceSettingsModel&&(identical(other.frequency, frequency) || other.frequency == frequency)&&(identical(other.frequencyHeartRate, frequencyHeartRate) || other.frequencyHeartRate == frequencyHeartRate)&&(identical(other.timezone, timezone) || other.timezone == timezone)&&(identical(other.pedometer, pedometer) || other.pedometer == pedometer)&&(identical(other.language, language) || other.language == language)&&const DeepCollectionEquality().equals(other.alerts, alerts)&&(identical(other.volume, volume) || other.volume == volume)&&(identical(other.soundMode, soundMode) || other.soundMode == soundMode)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.gps, gps) || other.gps == gps)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,frequency,frequencyHeartRate,timezone,pedometer,language,const DeepCollectionEquality().hash(alerts),volume,soundMode,keyboard,gps,nightMode);
@override
String toString() {
return 'DeviceSettingsModel(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)';
}
}
/// @nodoc
abstract mixin class $DeviceSettingsModelCopyWith<$Res> {
factory $DeviceSettingsModelCopyWith(DeviceSettingsModel value, $Res Function(DeviceSettingsModel) _then) = _$DeviceSettingsModelCopyWithImpl;
@useResult
$Res call({
int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode
});
$DeviceVolumeModelCopyWith<$Res> get volume;
}
/// @nodoc
class _$DeviceSettingsModelCopyWithImpl<$Res>
implements $DeviceSettingsModelCopyWith<$Res> {
_$DeviceSettingsModelCopyWithImpl(this._self, this._then);
final DeviceSettingsModel _self;
final $Res Function(DeviceSettingsModel) _then;
/// Create a copy of DeviceSettingsModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? frequency = null,Object? frequencyHeartRate = null,Object? timezone = null,Object? pedometer = null,Object? language = null,Object? alerts = null,Object? volume = null,Object? soundMode = freezed,Object? keyboard = null,Object? gps = null,Object? nightMode = null,}) {
return _then(_self.copyWith(
frequency: null == frequency ? _self.frequency : frequency // ignore: cast_nullable_to_non_nullable
as int,frequencyHeartRate: null == frequencyHeartRate ? _self.frequencyHeartRate : frequencyHeartRate // ignore: cast_nullable_to_non_nullable
as int,timezone: null == timezone ? _self.timezone : timezone // ignore: cast_nullable_to_non_nullable
as int,pedometer: null == pedometer ? _self.pedometer : pedometer // ignore: cast_nullable_to_non_nullable
as bool,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
as String,alerts: null == alerts ? _self.alerts : alerts // ignore: cast_nullable_to_non_nullable
as List<String>,volume: null == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceVolumeModel,soundMode: freezed == soundMode ? _self.soundMode : soundMode // ignore: cast_nullable_to_non_nullable
as String?,keyboard: null == keyboard ? _self.keyboard : keyboard // ignore: cast_nullable_to_non_nullable
as bool,gps: null == gps ? _self.gps : gps // ignore: cast_nullable_to_non_nullable
as bool,nightMode: null == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of DeviceSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceVolumeModelCopyWith<$Res> get volume {
return $DeviceVolumeModelCopyWith<$Res>(_self.volume, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
/// Adds pattern-matching-related methods to [DeviceSettingsModel].
extension DeviceSettingsModelPatterns on DeviceSettingsModel {
/// 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 extends Object?>(TResult Function( _DeviceSettingsModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeviceSettingsModel() 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 extends Object?>(TResult Function( _DeviceSettingsModel value) $default,){
final _that = this;
switch (_that) {
case _DeviceSettingsModel():
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 extends Object?>(TResult? Function( _DeviceSettingsModel value)? $default,){
final _that = this;
switch (_that) {
case _DeviceSettingsModel() 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 extends Object?>(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceSettingsModel() when $default != null:
return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pedometer,_that.language,_that.alerts,_that.volume,_that.soundMode,_that.keyboard,_that.gps,_that.nightMode);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 extends Object?>(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode) $default,) {final _that = this;
switch (_that) {
case _DeviceSettingsModel():
return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pedometer,_that.language,_that.alerts,_that.volume,_that.soundMode,_that.keyboard,_that.gps,_that.nightMode);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 extends Object?>(TResult? Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode)? $default,) {final _that = this;
switch (_that) {
case _DeviceSettingsModel() when $default != null:
return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pedometer,_that.language,_that.alerts,_that.volume,_that.soundMode,_that.keyboard,_that.gps,_that.nightMode);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _DeviceSettingsModel implements DeviceSettingsModel {
const _DeviceSettingsModel({this.frequency = 60, this.frequencyHeartRate = 120, this.timezone = 0, this.pedometer = false, this.language = 'es', final List<String> alerts = const [], this.volume = const DeviceVolumeModel(), this.soundMode, this.keyboard = true, this.gps = true, this.nightMode = false}): _alerts = alerts;
factory _DeviceSettingsModel.fromJson(Map<String, dynamic> json) => _$DeviceSettingsModelFromJson(json);
@override@JsonKey() final int frequency;
@override@JsonKey() final int frequencyHeartRate;
@override@JsonKey() final int timezone;
@override@JsonKey() final bool pedometer;
@override@JsonKey() final String language;
final List<String> _alerts;
@override@JsonKey() List<String> get alerts {
if (_alerts is EqualUnmodifiableListView) return _alerts;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_alerts);
}
@override@JsonKey() final DeviceVolumeModel volume;
@override final String? soundMode;
@override@JsonKey() final bool keyboard;
@override@JsonKey() final bool gps;
@override@JsonKey() final bool nightMode;
/// Create a copy of DeviceSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeviceSettingsModelCopyWith<_DeviceSettingsModel> get copyWith => __$DeviceSettingsModelCopyWithImpl<_DeviceSettingsModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$DeviceSettingsModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceSettingsModel&&(identical(other.frequency, frequency) || other.frequency == frequency)&&(identical(other.frequencyHeartRate, frequencyHeartRate) || other.frequencyHeartRate == frequencyHeartRate)&&(identical(other.timezone, timezone) || other.timezone == timezone)&&(identical(other.pedometer, pedometer) || other.pedometer == pedometer)&&(identical(other.language, language) || other.language == language)&&const DeepCollectionEquality().equals(other._alerts, _alerts)&&(identical(other.volume, volume) || other.volume == volume)&&(identical(other.soundMode, soundMode) || other.soundMode == soundMode)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.gps, gps) || other.gps == gps)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,frequency,frequencyHeartRate,timezone,pedometer,language,const DeepCollectionEquality().hash(_alerts),volume,soundMode,keyboard,gps,nightMode);
@override
String toString() {
return 'DeviceSettingsModel(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)';
}
}
/// @nodoc
abstract mixin class _$DeviceSettingsModelCopyWith<$Res> implements $DeviceSettingsModelCopyWith<$Res> {
factory _$DeviceSettingsModelCopyWith(_DeviceSettingsModel value, $Res Function(_DeviceSettingsModel) _then) = __$DeviceSettingsModelCopyWithImpl;
@override @useResult
$Res call({
int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode
});
@override $DeviceVolumeModelCopyWith<$Res> get volume;
}
/// @nodoc
class __$DeviceSettingsModelCopyWithImpl<$Res>
implements _$DeviceSettingsModelCopyWith<$Res> {
__$DeviceSettingsModelCopyWithImpl(this._self, this._then);
final _DeviceSettingsModel _self;
final $Res Function(_DeviceSettingsModel) _then;
/// Create a copy of DeviceSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? frequency = null,Object? frequencyHeartRate = null,Object? timezone = null,Object? pedometer = null,Object? language = null,Object? alerts = null,Object? volume = null,Object? soundMode = freezed,Object? keyboard = null,Object? gps = null,Object? nightMode = null,}) {
return _then(_DeviceSettingsModel(
frequency: null == frequency ? _self.frequency : frequency // ignore: cast_nullable_to_non_nullable
as int,frequencyHeartRate: null == frequencyHeartRate ? _self.frequencyHeartRate : frequencyHeartRate // ignore: cast_nullable_to_non_nullable
as int,timezone: null == timezone ? _self.timezone : timezone // ignore: cast_nullable_to_non_nullable
as int,pedometer: null == pedometer ? _self.pedometer : pedometer // ignore: cast_nullable_to_non_nullable
as bool,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
as String,alerts: null == alerts ? _self._alerts : alerts // ignore: cast_nullable_to_non_nullable
as List<String>,volume: null == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceVolumeModel,soundMode: freezed == soundMode ? _self.soundMode : soundMode // ignore: cast_nullable_to_non_nullable
as String?,keyboard: null == keyboard ? _self.keyboard : keyboard // ignore: cast_nullable_to_non_nullable
as bool,gps: null == gps ? _self.gps : gps // ignore: cast_nullable_to_non_nullable
as bool,nightMode: null == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of DeviceSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceVolumeModelCopyWith<$Res> get volume {
return $DeviceVolumeModelCopyWith<$Res>(_self.volume, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
/// @nodoc
mixin _$DeviceVolumeModel {
int get media; int get ringtone; int get alarm;
/// Create a copy of DeviceVolumeModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeviceVolumeModelCopyWith<DeviceVolumeModel> get copyWith => _$DeviceVolumeModelCopyWithImpl<DeviceVolumeModel>(this as DeviceVolumeModel, _$identity);
/// Serializes this DeviceVolumeModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceVolumeModel&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceVolumeModel(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class $DeviceVolumeModelCopyWith<$Res> {
factory $DeviceVolumeModelCopyWith(DeviceVolumeModel value, $Res Function(DeviceVolumeModel) _then) = _$DeviceVolumeModelCopyWithImpl;
@useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class _$DeviceVolumeModelCopyWithImpl<$Res>
implements $DeviceVolumeModelCopyWith<$Res> {
_$DeviceVolumeModelCopyWithImpl(this._self, this._then);
final DeviceVolumeModel _self;
final $Res Function(DeviceVolumeModel) _then;
/// Create a copy of DeviceVolumeModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_self.copyWith(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [DeviceVolumeModel].
extension DeviceVolumeModelPatterns on DeviceVolumeModel {
/// 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 extends Object?>(TResult Function( _DeviceVolumeModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeviceVolumeModel() 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 extends Object?>(TResult Function( _DeviceVolumeModel value) $default,){
final _that = this;
switch (_that) {
case _DeviceVolumeModel():
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 extends Object?>(TResult? Function( _DeviceVolumeModel value)? $default,){
final _that = this;
switch (_that) {
case _DeviceVolumeModel() 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 extends Object?>(TResult Function( int media, int ringtone, int alarm)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceVolumeModel() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult Function( int media, int ringtone, int alarm) $default,) {final _that = this;
switch (_that) {
case _DeviceVolumeModel():
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult? Function( int media, int ringtone, int alarm)? $default,) {final _that = this;
switch (_that) {
case _DeviceVolumeModel() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _DeviceVolumeModel implements DeviceVolumeModel {
const _DeviceVolumeModel({this.media = 50, this.ringtone = 50, this.alarm = 50});
factory _DeviceVolumeModel.fromJson(Map<String, dynamic> json) => _$DeviceVolumeModelFromJson(json);
@override@JsonKey() final int media;
@override@JsonKey() final int ringtone;
@override@JsonKey() final int alarm;
/// Create a copy of DeviceVolumeModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeviceVolumeModelCopyWith<_DeviceVolumeModel> get copyWith => __$DeviceVolumeModelCopyWithImpl<_DeviceVolumeModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$DeviceVolumeModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceVolumeModel&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceVolumeModel(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class _$DeviceVolumeModelCopyWith<$Res> implements $DeviceVolumeModelCopyWith<$Res> {
factory _$DeviceVolumeModelCopyWith(_DeviceVolumeModel value, $Res Function(_DeviceVolumeModel) _then) = __$DeviceVolumeModelCopyWithImpl;
@override @useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class __$DeviceVolumeModelCopyWithImpl<$Res>
implements _$DeviceVolumeModelCopyWith<$Res> {
__$DeviceVolumeModelCopyWithImpl(this._self, this._then);
final _DeviceVolumeModel _self;
final $Res Function(_DeviceVolumeModel) _then;
/// Create a copy of DeviceVolumeModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_DeviceVolumeModel(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
// dart format on

View File

@@ -0,0 +1,58 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'device_settings_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_DeviceSettingsModel _$DeviceSettingsModelFromJson(Map<String, dynamic> json) =>
_DeviceSettingsModel(
frequency: (json['frequency'] as num?)?.toInt() ?? 60,
frequencyHeartRate: (json['frequencyHeartRate'] as num?)?.toInt() ?? 120,
timezone: (json['timezone'] as num?)?.toInt() ?? 0,
pedometer: json['pedometer'] as bool? ?? false,
language: json['language'] as String? ?? 'es',
alerts:
(json['alerts'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
const [],
volume: json['volume'] == null
? const DeviceVolumeModel()
: DeviceVolumeModel.fromJson(json['volume'] as Map<String, dynamic>),
soundMode: json['soundMode'] as String?,
keyboard: json['keyboard'] as bool? ?? true,
gps: json['gps'] as bool? ?? true,
nightMode: json['nightMode'] as bool? ?? false,
);
Map<String, dynamic> _$DeviceSettingsModelToJson(
_DeviceSettingsModel instance,
) => <String, dynamic>{
'frequency': instance.frequency,
'frequencyHeartRate': instance.frequencyHeartRate,
'timezone': instance.timezone,
'pedometer': instance.pedometer,
'language': instance.language,
'alerts': instance.alerts,
'volume': instance.volume,
'soundMode': instance.soundMode,
'keyboard': instance.keyboard,
'gps': instance.gps,
'nightMode': instance.nightMode,
};
_DeviceVolumeModel _$DeviceVolumeModelFromJson(Map<String, dynamic> json) =>
_DeviceVolumeModel(
media: (json['media'] as num?)?.toInt() ?? 50,
ringtone: (json['ringtone'] as num?)?.toInt() ?? 50,
alarm: (json['alarm'] as num?)?.toInt() ?? 50,
);
Map<String, dynamic> _$DeviceVolumeModelToJson(_DeviceVolumeModel instance) =>
<String, dynamic>{
'media': instance.media,
'ringtone': instance.ringtone,
'alarm': instance.alarm,
};

View File

@@ -0,0 +1,93 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'device_capabilities_entity.freezed.dart';
@freezed
abstract class DeviceCapabilitiesEntity with _$DeviceCapabilitiesEntity {
const factory DeviceCapabilitiesEntity({
DeviceCapabilityOptionEntity? heartbeats,
DeviceCapabilityEnabledEntity? bloodPressure,
DeviceCapabilityAlertsEntity? alerts,
DeviceCapabilityEnabledEntity? podometer,
DeviceCapabilityContactsEntity? contacts,
DeviceCapabilitySettingsEntity? settings,
DeviceCapabilityCommandsEntity? commands,
DeviceCapabilityTakepillsEntity? takepills,
DeviceCapabilityOptionEntity? location,
DeviceCapabilityCameraEntity? camera,
}) = _DeviceCapabilitiesEntity;
}
@freezed
abstract class DeviceCapabilityEnabledEntity with _$DeviceCapabilityEnabledEntity {
const factory DeviceCapabilityEnabledEntity({
@Default(false) bool enabled,
}) = _DeviceCapabilityEnabledEntity;
}
@freezed
abstract class DeviceCapabilityOptionEntity with _$DeviceCapabilityOptionEntity {
const factory DeviceCapabilityOptionEntity({
@Default(0) int defaultValue,
@Default(false) bool enabled,
@Default([]) List<int> options,
}) = _DeviceCapabilityOptionEntity;
}
@freezed
abstract class DeviceCapabilityAlertsEntity with _$DeviceCapabilityAlertsEntity {
const factory DeviceCapabilityAlertsEntity({
@Default(false) bool enabled,
@Default([]) List<String> types,
}) = _DeviceCapabilityAlertsEntity;
}
@freezed
abstract class DeviceCapabilityContactsEntity with _$DeviceCapabilityContactsEntity {
const factory DeviceCapabilityContactsEntity({
@Default(false) bool enabled,
@Default([]) List<DeviceCapabilityContactTypeEntity> types,
@Default(false) bool isPhonebookWithPhoto,
}) = _DeviceCapabilityContactsEntity;
}
@freezed
abstract class DeviceCapabilityContactTypeEntity with _$DeviceCapabilityContactTypeEntity {
const factory DeviceCapabilityContactTypeEntity({
@Default('') String type,
@Default(0) int amount,
}) = _DeviceCapabilityContactTypeEntity;
}
@freezed
abstract class DeviceCapabilitySettingsEntity with _$DeviceCapabilitySettingsEntity {
const factory DeviceCapabilitySettingsEntity({
@Default(false) bool language,
@Default(false) bool timezone,
@Default([]) List<String> soundModes,
}) = _DeviceCapabilitySettingsEntity;
}
@freezed
abstract class DeviceCapabilityCommandsEntity with _$DeviceCapabilityCommandsEntity {
const factory DeviceCapabilityCommandsEntity({
@Default(false) bool enabled,
@Default([]) List<String> types,
}) = _DeviceCapabilityCommandsEntity;
}
@freezed
abstract class DeviceCapabilityTakepillsEntity with _$DeviceCapabilityTakepillsEntity {
const factory DeviceCapabilityTakepillsEntity({
@Default(false) bool enabled,
@Default(0) int maxReminders,
}) = _DeviceCapabilityTakepillsEntity;
}
@freezed
abstract class DeviceCapabilityCameraEntity with _$DeviceCapabilityCameraEntity {
const factory DeviceCapabilityCameraEntity({
@Default('') String format,
@Default(false) bool enabled,
}) = _DeviceCapabilityCameraEntity;
}

View File

@@ -1,5 +1,8 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'device_capabilities_entity.dart';
import 'device_settings_entity.dart';
part 'device_entity.freezed.dart';
@freezed
@@ -24,11 +27,11 @@ abstract class DeviceEntity with _$DeviceEntity {
String? phone,
String? simId,
Map<String, dynamic>? paymentOptions,
@Default({}) Map<String, dynamic> settings,
@Default(DeviceSettingsEntity()) DeviceSettingsEntity settings,
@Default('') String connectionServer,
@Default('') String protocol,
@Default('') String type,
Map<String, dynamic>? capabilities,
DeviceCapabilitiesEntity? capabilities,
@Default('') String createdAt,
String? updatedAt,
}) = _DeviceEntity;

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DeviceEntity {
String get id; String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map<String, dynamic> get flags; List<String>? get tags; String? get lastConnection; String? get carrierGenre; String? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String? get carrierName; String? get comment; String? get phone; String? get simId; Map<String, dynamic>? get paymentOptions; Map<String, dynamic> get settings; String get connectionServer; String get protocol; String get type; Map<String, dynamic>? get capabilities; String get createdAt; String? get updatedAt;
String get id; String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map<String, dynamic> get flags; List<String>? get tags; String? get lastConnection; String? get carrierGenre; String? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String? get carrierName; String? get comment; String? get phone; String? get simId; Map<String, dynamic>? get paymentOptions; DeviceSettingsEntity get settings; String get connectionServer; String get protocol; String get type; DeviceCapabilitiesEntity? get capabilities; String get createdAt; String? get updatedAt;
/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,12 +25,12 @@ $DeviceEntityCopyWith<DeviceEntity> get copyWith => _$DeviceEntityCopyWithImpl<D
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other.flags, flags)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&const DeepCollectionEquality().equals(other.settings, settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.capabilities, capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other.flags, flags)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(flags),const DeepCollectionEquality().hash(tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(paymentOptions),const DeepCollectionEquality().hash(settings),connectionServer,protocol,type,const DeepCollectionEquality().hash(capabilities),createdAt,updatedAt]);
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(flags),const DeepCollectionEquality().hash(tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(paymentOptions),settings,connectionServer,protocol,type,capabilities,createdAt,updatedAt]);
@override
String toString() {
@@ -45,11 +45,11 @@ abstract mixin class $DeviceEntityCopyWith<$Res> {
factory $DeviceEntityCopyWith(DeviceEntity value, $Res Function(DeviceEntity) _then) = _$DeviceEntityCopyWithImpl;
@useResult
$Res call({
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, String createdAt, String? updatedAt
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt
});
$DeviceSettingsEntityCopyWith<$Res> get settings;$DeviceCapabilitiesEntityCopyWith<$Res>? get capabilities;
}
/// @nodoc
@@ -84,16 +84,37 @@ as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullabl
as String?,simId: freezed == simId ? _self.simId : simId // ignore: cast_nullable_to_non_nullable
as String?,paymentOptions: freezed == paymentOptions ? _self.paymentOptions : paymentOptions // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,settings: null == settings ? _self.settings : settings // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as DeviceSettingsEntity,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as String,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DeviceCapabilitiesEntity?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceSettingsEntityCopyWith<$Res> get settings {
return $DeviceSettingsEntityCopyWith<$Res>(_self.settings, (value) {
return _then(_self.copyWith(settings: value));
});
}/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilitiesEntityCopyWith<$Res>? get capabilities {
if (_self.capabilities == null) {
return null;
}
return $DeviceCapabilitiesEntityCopyWith<$Res>(_self.capabilities!, (value) {
return _then(_self.copyWith(capabilities: value));
});
}
}
@@ -175,7 +196,7 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, String createdAt, String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceEntity() when $default != null:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _:
@@ -196,7 +217,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, String createdAt, String? updatedAt) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt) $default,) {final _that = this;
switch (_that) {
case _DeviceEntity():
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _:
@@ -216,7 +237,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, String createdAt, String? updatedAt)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt)? $default,) {final _that = this;
switch (_that) {
case _DeviceEntity() when $default != null:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _:
@@ -231,7 +252,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
class _DeviceEntity implements DeviceEntity {
const _DeviceEntity({required this.id, required this.identificator, this.battery, this.userId, this.companyId, this.delegationId, this.groupId, final Map<String, dynamic> flags = const {}, final List<String>? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, this.carrierName, this.comment, this.phone, this.simId, final Map<String, dynamic>? paymentOptions, final Map<String, dynamic> settings = const {}, this.connectionServer = '', this.protocol = '', this.type = '', final Map<String, dynamic>? capabilities, this.createdAt = '', this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions,_settings = settings,_capabilities = capabilities;
const _DeviceEntity({required this.id, required this.identificator, this.battery, this.userId, this.companyId, this.delegationId, this.groupId, final Map<String, dynamic> flags = const {}, final List<String>? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, this.carrierName, this.comment, this.phone, this.simId, final Map<String, dynamic>? paymentOptions, this.settings = const DeviceSettingsEntity(), this.connectionServer = '', this.protocol = '', this.type = '', this.capabilities, this.createdAt = '', this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions;
@override final String id;
@@ -275,25 +296,11 @@ class _DeviceEntity implements DeviceEntity {
return EqualUnmodifiableMapView(value);
}
final Map<String, dynamic> _settings;
@override@JsonKey() Map<String, dynamic> get settings {
if (_settings is EqualUnmodifiableMapView) return _settings;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_settings);
}
@override@JsonKey() final DeviceSettingsEntity settings;
@override@JsonKey() final String connectionServer;
@override@JsonKey() final String protocol;
@override@JsonKey() final String type;
final Map<String, dynamic>? _capabilities;
@override Map<String, dynamic>? get capabilities {
final value = _capabilities;
if (value == null) return null;
if (_capabilities is EqualUnmodifiableMapView) return _capabilities;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
@override final DeviceCapabilitiesEntity? capabilities;
@override@JsonKey() final String createdAt;
@override final String? updatedAt;
@@ -307,12 +314,12 @@ _$DeviceEntityCopyWith<_DeviceEntity> get copyWith => __$DeviceEntityCopyWithImp
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other._flags, _flags)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&const DeepCollectionEquality().equals(other._settings, _settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._capabilities, _capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other._flags, _flags)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(_flags),const DeepCollectionEquality().hash(_tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(_paymentOptions),const DeepCollectionEquality().hash(_settings),connectionServer,protocol,type,const DeepCollectionEquality().hash(_capabilities),createdAt,updatedAt]);
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(_flags),const DeepCollectionEquality().hash(_tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(_paymentOptions),settings,connectionServer,protocol,type,capabilities,createdAt,updatedAt]);
@override
String toString() {
@@ -327,11 +334,11 @@ abstract mixin class _$DeviceEntityCopyWith<$Res> implements $DeviceEntityCopyWi
factory _$DeviceEntityCopyWith(_DeviceEntity value, $Res Function(_DeviceEntity) _then) = __$DeviceEntityCopyWithImpl;
@override @useResult
$Res call({
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, Map<String, dynamic> settings, String connectionServer, String protocol, String type, Map<String, dynamic>? capabilities, String createdAt, String? updatedAt
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt
});
@override $DeviceSettingsEntityCopyWith<$Res> get settings;@override $DeviceCapabilitiesEntityCopyWith<$Res>? get capabilities;
}
/// @nodoc
@@ -365,18 +372,39 @@ as String?,comment: freezed == comment ? _self.comment : comment // ignore: cast
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
as String?,simId: freezed == simId ? _self.simId : simId // ignore: cast_nullable_to_non_nullable
as String?,paymentOptions: freezed == paymentOptions ? _self._paymentOptions : paymentOptions // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,settings: null == settings ? _self._settings : settings // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,settings: null == settings ? _self.settings : settings // ignore: cast_nullable_to_non_nullable
as DeviceSettingsEntity,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as String,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self._capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as DeviceCapabilitiesEntity?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceSettingsEntityCopyWith<$Res> get settings {
return $DeviceSettingsEntityCopyWith<$Res>(_self.settings, (value) {
return _then(_self.copyWith(settings: value));
});
}/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilitiesEntityCopyWith<$Res>? get capabilities {
if (_self.capabilities == null) {
return null;
}
return $DeviceCapabilitiesEntityCopyWith<$Res>(_self.capabilities!, (value) {
return _then(_self.copyWith(capabilities: value));
});
}
}
// dart format on

View File

@@ -0,0 +1,29 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'device_settings_entity.freezed.dart';
@freezed
abstract class DeviceSettingsEntity with _$DeviceSettingsEntity {
const factory DeviceSettingsEntity({
@Default(60) int frequency,
@Default(120) int frequencyHeartRate,
@Default(0) int timezone,
@Default(false) bool pedometer,
@Default('es') String language,
@Default([]) List<String> alerts,
@Default(DeviceVolumeEntity()) DeviceVolumeEntity volume,
String? soundMode,
@Default(true) bool keyboard,
@Default(true) bool gps,
@Default(false) bool nightMode,
}) = _DeviceSettingsEntity;
}
@freezed
abstract class DeviceVolumeEntity with _$DeviceVolumeEntity {
const factory DeviceVolumeEntity({
@Default(50) int media,
@Default(50) int ringtone,
@Default(50) int alarm,
}) = _DeviceVolumeEntity;
}

View File

@@ -0,0 +1,588 @@
// 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 'device_settings_entity.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DeviceSettingsEntity {
int get frequency; int get frequencyHeartRate; int get timezone; bool get pedometer; String get language; List<String> get alerts; DeviceVolumeEntity get volume; String? get soundMode; bool get keyboard; bool get gps; bool get nightMode;
/// Create a copy of DeviceSettingsEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeviceSettingsEntityCopyWith<DeviceSettingsEntity> get copyWith => _$DeviceSettingsEntityCopyWithImpl<DeviceSettingsEntity>(this as DeviceSettingsEntity, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceSettingsEntity&&(identical(other.frequency, frequency) || other.frequency == frequency)&&(identical(other.frequencyHeartRate, frequencyHeartRate) || other.frequencyHeartRate == frequencyHeartRate)&&(identical(other.timezone, timezone) || other.timezone == timezone)&&(identical(other.pedometer, pedometer) || other.pedometer == pedometer)&&(identical(other.language, language) || other.language == language)&&const DeepCollectionEquality().equals(other.alerts, alerts)&&(identical(other.volume, volume) || other.volume == volume)&&(identical(other.soundMode, soundMode) || other.soundMode == soundMode)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.gps, gps) || other.gps == gps)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode));
}
@override
int get hashCode => Object.hash(runtimeType,frequency,frequencyHeartRate,timezone,pedometer,language,const DeepCollectionEquality().hash(alerts),volume,soundMode,keyboard,gps,nightMode);
@override
String toString() {
return 'DeviceSettingsEntity(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)';
}
}
/// @nodoc
abstract mixin class $DeviceSettingsEntityCopyWith<$Res> {
factory $DeviceSettingsEntityCopyWith(DeviceSettingsEntity value, $Res Function(DeviceSettingsEntity) _then) = _$DeviceSettingsEntityCopyWithImpl;
@useResult
$Res call({
int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode
});
$DeviceVolumeEntityCopyWith<$Res> get volume;
}
/// @nodoc
class _$DeviceSettingsEntityCopyWithImpl<$Res>
implements $DeviceSettingsEntityCopyWith<$Res> {
_$DeviceSettingsEntityCopyWithImpl(this._self, this._then);
final DeviceSettingsEntity _self;
final $Res Function(DeviceSettingsEntity) _then;
/// Create a copy of DeviceSettingsEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? frequency = null,Object? frequencyHeartRate = null,Object? timezone = null,Object? pedometer = null,Object? language = null,Object? alerts = null,Object? volume = null,Object? soundMode = freezed,Object? keyboard = null,Object? gps = null,Object? nightMode = null,}) {
return _then(_self.copyWith(
frequency: null == frequency ? _self.frequency : frequency // ignore: cast_nullable_to_non_nullable
as int,frequencyHeartRate: null == frequencyHeartRate ? _self.frequencyHeartRate : frequencyHeartRate // ignore: cast_nullable_to_non_nullable
as int,timezone: null == timezone ? _self.timezone : timezone // ignore: cast_nullable_to_non_nullable
as int,pedometer: null == pedometer ? _self.pedometer : pedometer // ignore: cast_nullable_to_non_nullable
as bool,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
as String,alerts: null == alerts ? _self.alerts : alerts // ignore: cast_nullable_to_non_nullable
as List<String>,volume: null == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceVolumeEntity,soundMode: freezed == soundMode ? _self.soundMode : soundMode // ignore: cast_nullable_to_non_nullable
as String?,keyboard: null == keyboard ? _self.keyboard : keyboard // ignore: cast_nullable_to_non_nullable
as bool,gps: null == gps ? _self.gps : gps // ignore: cast_nullable_to_non_nullable
as bool,nightMode: null == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of DeviceSettingsEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceVolumeEntityCopyWith<$Res> get volume {
return $DeviceVolumeEntityCopyWith<$Res>(_self.volume, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
/// Adds pattern-matching-related methods to [DeviceSettingsEntity].
extension DeviceSettingsEntityPatterns on DeviceSettingsEntity {
/// 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 extends Object?>(TResult Function( _DeviceSettingsEntity value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeviceSettingsEntity() 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 extends Object?>(TResult Function( _DeviceSettingsEntity value) $default,){
final _that = this;
switch (_that) {
case _DeviceSettingsEntity():
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 extends Object?>(TResult? Function( _DeviceSettingsEntity value)? $default,){
final _that = this;
switch (_that) {
case _DeviceSettingsEntity() 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 extends Object?>(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceSettingsEntity() when $default != null:
return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pedometer,_that.language,_that.alerts,_that.volume,_that.soundMode,_that.keyboard,_that.gps,_that.nightMode);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 extends Object?>(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode) $default,) {final _that = this;
switch (_that) {
case _DeviceSettingsEntity():
return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pedometer,_that.language,_that.alerts,_that.volume,_that.soundMode,_that.keyboard,_that.gps,_that.nightMode);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 extends Object?>(TResult? Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode)? $default,) {final _that = this;
switch (_that) {
case _DeviceSettingsEntity() when $default != null:
return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pedometer,_that.language,_that.alerts,_that.volume,_that.soundMode,_that.keyboard,_that.gps,_that.nightMode);case _:
return null;
}
}
}
/// @nodoc
class _DeviceSettingsEntity implements DeviceSettingsEntity {
const _DeviceSettingsEntity({this.frequency = 60, this.frequencyHeartRate = 120, this.timezone = 0, this.pedometer = false, this.language = 'es', final List<String> alerts = const [], this.volume = const DeviceVolumeEntity(), this.soundMode, this.keyboard = true, this.gps = true, this.nightMode = false}): _alerts = alerts;
@override@JsonKey() final int frequency;
@override@JsonKey() final int frequencyHeartRate;
@override@JsonKey() final int timezone;
@override@JsonKey() final bool pedometer;
@override@JsonKey() final String language;
final List<String> _alerts;
@override@JsonKey() List<String> get alerts {
if (_alerts is EqualUnmodifiableListView) return _alerts;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_alerts);
}
@override@JsonKey() final DeviceVolumeEntity volume;
@override final String? soundMode;
@override@JsonKey() final bool keyboard;
@override@JsonKey() final bool gps;
@override@JsonKey() final bool nightMode;
/// Create a copy of DeviceSettingsEntity
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeviceSettingsEntityCopyWith<_DeviceSettingsEntity> get copyWith => __$DeviceSettingsEntityCopyWithImpl<_DeviceSettingsEntity>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceSettingsEntity&&(identical(other.frequency, frequency) || other.frequency == frequency)&&(identical(other.frequencyHeartRate, frequencyHeartRate) || other.frequencyHeartRate == frequencyHeartRate)&&(identical(other.timezone, timezone) || other.timezone == timezone)&&(identical(other.pedometer, pedometer) || other.pedometer == pedometer)&&(identical(other.language, language) || other.language == language)&&const DeepCollectionEquality().equals(other._alerts, _alerts)&&(identical(other.volume, volume) || other.volume == volume)&&(identical(other.soundMode, soundMode) || other.soundMode == soundMode)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.gps, gps) || other.gps == gps)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode));
}
@override
int get hashCode => Object.hash(runtimeType,frequency,frequencyHeartRate,timezone,pedometer,language,const DeepCollectionEquality().hash(_alerts),volume,soundMode,keyboard,gps,nightMode);
@override
String toString() {
return 'DeviceSettingsEntity(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)';
}
}
/// @nodoc
abstract mixin class _$DeviceSettingsEntityCopyWith<$Res> implements $DeviceSettingsEntityCopyWith<$Res> {
factory _$DeviceSettingsEntityCopyWith(_DeviceSettingsEntity value, $Res Function(_DeviceSettingsEntity) _then) = __$DeviceSettingsEntityCopyWithImpl;
@override @useResult
$Res call({
int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List<String> alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode
});
@override $DeviceVolumeEntityCopyWith<$Res> get volume;
}
/// @nodoc
class __$DeviceSettingsEntityCopyWithImpl<$Res>
implements _$DeviceSettingsEntityCopyWith<$Res> {
__$DeviceSettingsEntityCopyWithImpl(this._self, this._then);
final _DeviceSettingsEntity _self;
final $Res Function(_DeviceSettingsEntity) _then;
/// Create a copy of DeviceSettingsEntity
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? frequency = null,Object? frequencyHeartRate = null,Object? timezone = null,Object? pedometer = null,Object? language = null,Object? alerts = null,Object? volume = null,Object? soundMode = freezed,Object? keyboard = null,Object? gps = null,Object? nightMode = null,}) {
return _then(_DeviceSettingsEntity(
frequency: null == frequency ? _self.frequency : frequency // ignore: cast_nullable_to_non_nullable
as int,frequencyHeartRate: null == frequencyHeartRate ? _self.frequencyHeartRate : frequencyHeartRate // ignore: cast_nullable_to_non_nullable
as int,timezone: null == timezone ? _self.timezone : timezone // ignore: cast_nullable_to_non_nullable
as int,pedometer: null == pedometer ? _self.pedometer : pedometer // ignore: cast_nullable_to_non_nullable
as bool,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
as String,alerts: null == alerts ? _self._alerts : alerts // ignore: cast_nullable_to_non_nullable
as List<String>,volume: null == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceVolumeEntity,soundMode: freezed == soundMode ? _self.soundMode : soundMode // ignore: cast_nullable_to_non_nullable
as String?,keyboard: null == keyboard ? _self.keyboard : keyboard // ignore: cast_nullable_to_non_nullable
as bool,gps: null == gps ? _self.gps : gps // ignore: cast_nullable_to_non_nullable
as bool,nightMode: null == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of DeviceSettingsEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceVolumeEntityCopyWith<$Res> get volume {
return $DeviceVolumeEntityCopyWith<$Res>(_self.volume, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
/// @nodoc
mixin _$DeviceVolumeEntity {
int get media; int get ringtone; int get alarm;
/// Create a copy of DeviceVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeviceVolumeEntityCopyWith<DeviceVolumeEntity> get copyWith => _$DeviceVolumeEntityCopyWithImpl<DeviceVolumeEntity>(this as DeviceVolumeEntity, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceVolumeEntity&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceVolumeEntity(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class $DeviceVolumeEntityCopyWith<$Res> {
factory $DeviceVolumeEntityCopyWith(DeviceVolumeEntity value, $Res Function(DeviceVolumeEntity) _then) = _$DeviceVolumeEntityCopyWithImpl;
@useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class _$DeviceVolumeEntityCopyWithImpl<$Res>
implements $DeviceVolumeEntityCopyWith<$Res> {
_$DeviceVolumeEntityCopyWithImpl(this._self, this._then);
final DeviceVolumeEntity _self;
final $Res Function(DeviceVolumeEntity) _then;
/// Create a copy of DeviceVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_self.copyWith(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [DeviceVolumeEntity].
extension DeviceVolumeEntityPatterns on DeviceVolumeEntity {
/// 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 extends Object?>(TResult Function( _DeviceVolumeEntity value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeviceVolumeEntity() 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 extends Object?>(TResult Function( _DeviceVolumeEntity value) $default,){
final _that = this;
switch (_that) {
case _DeviceVolumeEntity():
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 extends Object?>(TResult? Function( _DeviceVolumeEntity value)? $default,){
final _that = this;
switch (_that) {
case _DeviceVolumeEntity() 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 extends Object?>(TResult Function( int media, int ringtone, int alarm)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceVolumeEntity() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult Function( int media, int ringtone, int alarm) $default,) {final _that = this;
switch (_that) {
case _DeviceVolumeEntity():
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult? Function( int media, int ringtone, int alarm)? $default,) {final _that = this;
switch (_that) {
case _DeviceVolumeEntity() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);case _:
return null;
}
}
}
/// @nodoc
class _DeviceVolumeEntity implements DeviceVolumeEntity {
const _DeviceVolumeEntity({this.media = 50, this.ringtone = 50, this.alarm = 50});
@override@JsonKey() final int media;
@override@JsonKey() final int ringtone;
@override@JsonKey() final int alarm;
/// Create a copy of DeviceVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeviceVolumeEntityCopyWith<_DeviceVolumeEntity> get copyWith => __$DeviceVolumeEntityCopyWithImpl<_DeviceVolumeEntity>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceVolumeEntity&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceVolumeEntity(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class _$DeviceVolumeEntityCopyWith<$Res> implements $DeviceVolumeEntityCopyWith<$Res> {
factory _$DeviceVolumeEntityCopyWith(_DeviceVolumeEntity value, $Res Function(_DeviceVolumeEntity) _then) = __$DeviceVolumeEntityCopyWithImpl;
@override @useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class __$DeviceVolumeEntityCopyWithImpl<$Res>
implements _$DeviceVolumeEntityCopyWith<$Res> {
__$DeviceVolumeEntityCopyWithImpl(this._self, this._then);
final _DeviceVolumeEntity _self;
final $Res Function(_DeviceVolumeEntity) _then;
/// Create a copy of DeviceVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_DeviceVolumeEntity(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
// dart format on