diff --git a/modules/legacy/modules/device_management/lib/src/features/background_image/presentation/state/background_image_view_model.dart b/modules/legacy/modules/device_management/lib/src/features/background_image/presentation/state/background_image_view_model.dart index 0cffe8a7..bb96fe85 100644 --- a/modules/legacy/modules/device_management/lib/src/features/background_image/presentation/state/background_image_view_model.dart +++ b/modules/legacy/modules/device_management/lib/src/features/background_image/presentation/state/background_image_view_model.dart @@ -35,7 +35,7 @@ class BackgroundImageViewModel extends Notifier { state = state.copyWith( photos: photos, - currentBackgroundId: device.settings.backgroundImageId, + currentBackgroundId: device.backgroundImageId, isLoading: false, ); } catch (e) { diff --git a/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.dart b/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.dart index a2ce2b0d..87ee01f7 100644 --- a/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.dart +++ b/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.dart @@ -43,6 +43,7 @@ abstract class GetDevicesItemResponseModel with _$GetDevicesItemResponseModel { required String protocol, required String type, Map? capabilities, + String? backgroundImageId, required int createdAt, int? updatedAt, }) = _GetDevicesItemResponseModel; @@ -82,6 +83,7 @@ extension GetDevicesResponseModelMapper on GetDevicesResponseModel { capabilities: item.capabilities != null ? DeviceCapabilitiesModel.fromJson(item.capabilities!).toEntity() : null, + backgroundImageId: item.backgroundImageId, createdAt: item.createdAt.toString(), updatedAt: item.updatedAt?.toString(), ), diff --git a/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.freezed.dart b/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.freezed.dart index 13a4235e..88bef28b 100644 --- a/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.freezed.dart +++ b/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.freezed.dart @@ -284,7 +284,7 @@ as List, /// @nodoc mixin _$GetDevicesItemResponseModel { - String get id; String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map get flags; List? get tags; int? get lastConnection; String? get carrierGenre; int? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String get carrierName; String? get comment; String? get phone; String? get simId; String? get simStatus; Map? get paymentOptions; bool get queueCommands; Map get settings; String get connectionServer; String get protocol; String get type; Map? get capabilities; int get createdAt; int? get updatedAt; + String get id; String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map get flags; List? get tags; int? get lastConnection; String? get carrierGenre; int? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String get carrierName; String? get comment; String? get phone; String? get simId; String? get simStatus; Map? get paymentOptions; bool get queueCommands; Map get settings; String get connectionServer; String get protocol; String get type; Map? get capabilities; String? get backgroundImageId; int get createdAt; int? get updatedAt; /// Create a copy of GetDevicesItemResponseModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -297,16 +297,16 @@ $GetDevicesItemResponseModelCopyWith get copyWith = @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is GetDevicesItemResponseModel&&(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)&&(identical(other.simStatus, simStatus) || other.simStatus == simStatus)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&(identical(other.queueCommands, queueCommands) || other.queueCommands == queueCommands)&&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 GetDevicesItemResponseModel&&(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)&&(identical(other.simStatus, simStatus) || other.simStatus == simStatus)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&(identical(other.queueCommands, queueCommands) || other.queueCommands == queueCommands)&&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.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)&&(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,simStatus,const DeepCollectionEquality().hash(paymentOptions),queueCommands,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,simStatus,const DeepCollectionEquality().hash(paymentOptions),queueCommands,const DeepCollectionEquality().hash(settings),connectionServer,protocol,type,const DeepCollectionEquality().hash(capabilities),backgroundImageId,createdAt,updatedAt]); @override String toString() { - return 'GetDevicesItemResponseModel(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, simStatus: $simStatus, paymentOptions: $paymentOptions, queueCommands: $queueCommands, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, createdAt: $createdAt, updatedAt: $updatedAt)'; + return 'GetDevicesItemResponseModel(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, simStatus: $simStatus, paymentOptions: $paymentOptions, queueCommands: $queueCommands, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)'; } @@ -317,7 +317,7 @@ abstract mixin class $GetDevicesItemResponseModelCopyWith<$Res> { factory $GetDevicesItemResponseModelCopyWith(GetDevicesItemResponseModel value, $Res Function(GetDevicesItemResponseModel) _then) = _$GetDevicesItemResponseModelCopyWithImpl; @useResult $Res call({ - String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, int createdAt, int? updatedAt + String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, String? backgroundImageId, int createdAt, int? updatedAt }); @@ -334,7 +334,7 @@ class _$GetDevicesItemResponseModelCopyWithImpl<$Res> /// Create a copy of GetDevicesItemResponseModel /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = null,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? simStatus = freezed,Object? paymentOptions = freezed,Object? queueCommands = null,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = null,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? simStatus = freezed,Object? paymentOptions = freezed,Object? queueCommands = null,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,identificator: null == identificator ? _self.identificator : identificator // ignore: cast_nullable_to_non_nullable @@ -362,7 +362,8 @@ as Map,connectionServer: null == connectionServer ? _self.conne 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?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as Map?,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable +as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as int?, )); @@ -449,10 +450,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, int createdAt, int? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, String? backgroundImageId, int createdAt, int? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _GetDevicesItemResponseModel() 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.simStatus,_that.paymentOptions,_that.queueCommands,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _: +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.simStatus,_that.paymentOptions,_that.queueCommands,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _: return orElse(); } @@ -470,10 +471,10 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, int createdAt, int? updatedAt) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, String? backgroundImageId, int createdAt, int? updatedAt) $default,) {final _that = this; switch (_that) { case _GetDevicesItemResponseModel(): -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.simStatus,_that.paymentOptions,_that.queueCommands,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _: +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.simStatus,_that.paymentOptions,_that.queueCommands,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _: throw StateError('Unexpected subclass'); } @@ -490,10 +491,10 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, int createdAt, int? updatedAt)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, String? backgroundImageId, int createdAt, int? updatedAt)? $default,) {final _that = this; switch (_that) { case _GetDevicesItemResponseModel() 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.simStatus,_that.paymentOptions,_that.queueCommands,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.createdAt,_that.updatedAt);case _: +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.simStatus,_that.paymentOptions,_that.queueCommands,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _: return null; } @@ -505,7 +506,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co @JsonSerializable() class _GetDevicesItemResponseModel implements GetDevicesItemResponseModel { - const _GetDevicesItemResponseModel({required this.id, required this.identificator, this.battery, this.userId, this.companyId, this.delegationId, this.groupId, required final Map flags, final List? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, required this.carrierName, this.comment, this.phone, this.simId, this.simStatus, final Map? paymentOptions, required this.queueCommands, required final Map settings, required this.connectionServer, required this.protocol, required this.type, final Map? capabilities, required this.createdAt, this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions,_settings = settings,_capabilities = capabilities; + const _GetDevicesItemResponseModel({required this.id, required this.identificator, this.battery, this.userId, this.companyId, this.delegationId, this.groupId, required final Map flags, final List? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, required this.carrierName, this.comment, this.phone, this.simId, this.simStatus, final Map? paymentOptions, required this.queueCommands, required final Map settings, required this.connectionServer, required this.protocol, required this.type, final Map? capabilities, this.backgroundImageId, required this.createdAt, this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions,_settings = settings,_capabilities = capabilities; factory _GetDevicesItemResponseModel.fromJson(Map json) => _$GetDevicesItemResponseModelFromJson(json); @override final String id; @@ -570,6 +571,7 @@ class _GetDevicesItemResponseModel implements GetDevicesItemResponseModel { return EqualUnmodifiableMapView(value); } +@override final String? backgroundImageId; @override final int createdAt; @override final int? updatedAt; @@ -586,16 +588,16 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetDevicesItemResponseModel&&(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)&&(identical(other.simStatus, simStatus) || other.simStatus == simStatus)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&(identical(other.queueCommands, queueCommands) || other.queueCommands == queueCommands)&&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 _GetDevicesItemResponseModel&&(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)&&(identical(other.simStatus, simStatus) || other.simStatus == simStatus)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&(identical(other.queueCommands, queueCommands) || other.queueCommands == queueCommands)&&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.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)&&(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,simStatus,const DeepCollectionEquality().hash(_paymentOptions),queueCommands,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,simStatus,const DeepCollectionEquality().hash(_paymentOptions),queueCommands,const DeepCollectionEquality().hash(_settings),connectionServer,protocol,type,const DeepCollectionEquality().hash(_capabilities),backgroundImageId,createdAt,updatedAt]); @override String toString() { - return 'GetDevicesItemResponseModel(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, simStatus: $simStatus, paymentOptions: $paymentOptions, queueCommands: $queueCommands, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, createdAt: $createdAt, updatedAt: $updatedAt)'; + return 'GetDevicesItemResponseModel(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, simStatus: $simStatus, paymentOptions: $paymentOptions, queueCommands: $queueCommands, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)'; } @@ -606,7 +608,7 @@ abstract mixin class _$GetDevicesItemResponseModelCopyWith<$Res> implements $Get factory _$GetDevicesItemResponseModelCopyWith(_GetDevicesItemResponseModel value, $Res Function(_GetDevicesItemResponseModel) _then) = __$GetDevicesItemResponseModelCopyWithImpl; @override @useResult $Res call({ - String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, int createdAt, int? updatedAt + String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, int? lastConnection, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? comment, String? phone, String? simId, String? simStatus, Map? paymentOptions, bool queueCommands, Map settings, String connectionServer, String protocol, String type, Map? capabilities, String? backgroundImageId, int createdAt, int? updatedAt }); @@ -623,7 +625,7 @@ class __$GetDevicesItemResponseModelCopyWithImpl<$Res> /// Create a copy of GetDevicesItemResponseModel /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = null,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? simStatus = freezed,Object? paymentOptions = freezed,Object? queueCommands = null,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = null,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? simStatus = freezed,Object? paymentOptions = freezed,Object? queueCommands = null,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { return _then(_GetDevicesItemResponseModel( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,identificator: null == identificator ? _self.identificator : identificator // ignore: cast_nullable_to_non_nullable @@ -651,7 +653,8 @@ as Map,connectionServer: null == connectionServer ? _self.conne 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?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as Map?,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable +as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as int,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as int?, )); diff --git a/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.g.dart b/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.g.dart index f9e0ce17..c13d4d30 100644 --- a/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.g.dart +++ b/modules/legacy/packages/legacy_shared/lib/src/data/models/get_devices_response_model.g.dart @@ -49,6 +49,7 @@ _GetDevicesItemResponseModel _$GetDevicesItemResponseModelFromJson( protocol: json['protocol'] as String, type: json['type'] as String, capabilities: json['capabilities'] as Map?, + backgroundImageId: json['backgroundImageId'] as String?, createdAt: (json['createdAt'] as num).toInt(), updatedAt: (json['updatedAt'] as num?)?.toInt(), ); @@ -82,6 +83,7 @@ Map _$GetDevicesItemResponseModelToJson( 'protocol': instance.protocol, 'type': instance.type, 'capabilities': instance.capabilities, + 'backgroundImageId': instance.backgroundImageId, 'createdAt': instance.createdAt, 'updatedAt': instance.updatedAt, }; diff --git a/packages/sf_shared/lib/src/data/models/device_settings_model.dart b/packages/sf_shared/lib/src/data/models/device_settings_model.dart index 484716d9..743bc3f2 100644 --- a/packages/sf_shared/lib/src/data/models/device_settings_model.dart +++ b/packages/sf_shared/lib/src/data/models/device_settings_model.dart @@ -18,7 +18,6 @@ abstract class DeviceSettingsModel with _$DeviceSettingsModel { @Default(true) bool keyboard, @Default(true) bool gps, @Default(false) bool nightMode, - String? backgroundImageId, }) = _DeviceSettingsModel; factory DeviceSettingsModel.fromJson(Map json) => @@ -54,7 +53,6 @@ extension DeviceSettingsModelMapper on DeviceSettingsModel { keyboard: keyboard, gps: gps, nightMode: nightMode, - backgroundImageId: backgroundImageId, ); } diff --git a/packages/sf_shared/lib/src/data/models/device_settings_model.freezed.dart b/packages/sf_shared/lib/src/data/models/device_settings_model.freezed.dart index 4a049527..df26fc27 100644 --- a/packages/sf_shared/lib/src/data/models/device_settings_model.freezed.dart +++ b/packages/sf_shared/lib/src/data/models/device_settings_model.freezed.dart @@ -15,7 +15,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$DeviceSettingsModel { - int get frequency; int get frequencyHeartRate; int get timezone; bool get pedometer; String get language; List get alerts; DeviceVolumeModel get volume; String? get soundMode; bool get keyboard; bool get gps; bool get nightMode; String? get backgroundImageId; + int get frequency; int get frequencyHeartRate; int get timezone; bool get pedometer; String get language; List 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) @@ -28,16 +28,16 @@ $DeviceSettingsModelCopyWith get copyWith => _$DeviceSettin @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)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)); + 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,backgroundImageId); +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, backgroundImageId: $backgroundImageId)'; + return 'DeviceSettingsModel(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)'; } @@ -48,7 +48,7 @@ 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 alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId + int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode }); @@ -65,7 +65,7 @@ class _$DeviceSettingsModelCopyWithImpl<$Res> /// 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,Object? backgroundImageId = freezed,}) { +@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 @@ -78,8 +78,7 @@ as DeviceVolumeModel,soundMode: freezed == soundMode ? _self.soundMode : soundMo 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,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable -as String?, +as bool, )); } /// Create a copy of DeviceSettingsModel @@ -173,10 +172,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List 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,_that.backgroundImageId);case _: +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(); } @@ -194,10 +193,10 @@ return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pe /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List 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,_that.backgroundImageId);case _: +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'); } @@ -214,10 +213,10 @@ return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pe /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List 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,_that.backgroundImageId);case _: +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; } @@ -229,7 +228,7 @@ return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pe @JsonSerializable() class _DeviceSettingsModel implements DeviceSettingsModel { - const _DeviceSettingsModel({this.frequency = 60, this.frequencyHeartRate = 120, this.timezone = 0, this.pedometer = false, this.language = 'es', final List alerts = const [], this.volume = const DeviceVolumeModel(), this.soundMode, this.keyboard = true, this.gps = true, this.nightMode = false, this.backgroundImageId}): _alerts = alerts; + const _DeviceSettingsModel({this.frequency = 60, this.frequencyHeartRate = 120, this.timezone = 0, this.pedometer = false, this.language = 'es', final List alerts = const [], this.volume = const DeviceVolumeModel(), this.soundMode, this.keyboard = true, this.gps = true, this.nightMode = false}): _alerts = alerts; factory _DeviceSettingsModel.fromJson(Map json) => _$DeviceSettingsModelFromJson(json); @override@JsonKey() final int frequency; @@ -249,7 +248,6 @@ class _DeviceSettingsModel implements DeviceSettingsModel { @override@JsonKey() final bool keyboard; @override@JsonKey() final bool gps; @override@JsonKey() final bool nightMode; -@override final String? backgroundImageId; /// Create a copy of DeviceSettingsModel /// with the given fields replaced by the non-null parameter values. @@ -264,16 +262,16 @@ Map 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)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)); + 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,backgroundImageId); +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, backgroundImageId: $backgroundImageId)'; + return 'DeviceSettingsModel(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)'; } @@ -284,7 +282,7 @@ abstract mixin class _$DeviceSettingsModelCopyWith<$Res> implements $DeviceSetti factory _$DeviceSettingsModelCopyWith(_DeviceSettingsModel value, $Res Function(_DeviceSettingsModel) _then) = __$DeviceSettingsModelCopyWithImpl; @override @useResult $Res call({ - int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId + int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeModel volume, String? soundMode, bool keyboard, bool gps, bool nightMode }); @@ -301,7 +299,7 @@ class __$DeviceSettingsModelCopyWithImpl<$Res> /// 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,Object? backgroundImageId = freezed,}) { +@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 @@ -314,8 +312,7 @@ as DeviceVolumeModel,soundMode: freezed == soundMode ? _self.soundMode : soundMo 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,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable -as String?, +as bool, )); } diff --git a/packages/sf_shared/lib/src/data/models/device_settings_model.g.dart b/packages/sf_shared/lib/src/data/models/device_settings_model.g.dart index a1b8ec08..46c7c1e3 100644 --- a/packages/sf_shared/lib/src/data/models/device_settings_model.g.dart +++ b/packages/sf_shared/lib/src/data/models/device_settings_model.g.dart @@ -25,7 +25,6 @@ _DeviceSettingsModel _$DeviceSettingsModelFromJson(Map json) => keyboard: json['keyboard'] as bool? ?? true, gps: json['gps'] as bool? ?? true, nightMode: json['nightMode'] as bool? ?? false, - backgroundImageId: json['backgroundImageId'] as String?, ); Map _$DeviceSettingsModelToJson( @@ -42,7 +41,6 @@ Map _$DeviceSettingsModelToJson( 'keyboard': instance.keyboard, 'gps': instance.gps, 'nightMode': instance.nightMode, - 'backgroundImageId': instance.backgroundImageId, }; _DeviceVolumeModel _$DeviceVolumeModelFromJson(Map json) => diff --git a/packages/sf_shared/lib/src/domain/entities/device_entity.dart b/packages/sf_shared/lib/src/domain/entities/device_entity.dart index bd19369c..4a91aaa8 100644 --- a/packages/sf_shared/lib/src/domain/entities/device_entity.dart +++ b/packages/sf_shared/lib/src/domain/entities/device_entity.dart @@ -32,6 +32,7 @@ abstract class DeviceEntity with _$DeviceEntity { @Default('') String protocol, @Default('') String type, DeviceCapabilitiesEntity? capabilities, + String? backgroundImageId, @Default('') String createdAt, String? updatedAt, }) = _DeviceEntity; diff --git a/packages/sf_shared/lib/src/domain/entities/device_entity.freezed.dart b/packages/sf_shared/lib/src/domain/entities/device_entity.freezed.dart index c988a2f7..1792bfa8 100644 --- a/packages/sf_shared/lib/src/domain/entities/device_entity.freezed.dart +++ b/packages/sf_shared/lib/src/domain/entities/device_entity.freezed.dart @@ -14,7 +14,7 @@ T _$identity(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 get flags; List? 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? get paymentOptions; DeviceSettingsEntity get settings; String get connectionServer; String get protocol; String get type; DeviceCapabilitiesEntity? 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 get flags; List? 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? get paymentOptions; DeviceSettingsEntity get settings; String get connectionServer; String get protocol; String get type; DeviceCapabilitiesEntity? get capabilities; String? get backgroundImageId; 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,16 +25,16 @@ $DeviceEntityCopyWith get copyWith => _$DeviceEntityCopyWithImpl 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]); +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,backgroundImageId,createdAt,updatedAt]); @override String toString() { - return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, createdAt: $createdAt, updatedAt: $updatedAt)'; + return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)'; } @@ -45,7 +45,7 @@ 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 flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt + String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt }); @@ -62,7 +62,7 @@ class _$DeviceEntityCopyWithImpl<$Res> /// Create a copy of DeviceEntity /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,identificator: null == identificator ? _self.identificator : identificator // ignore: cast_nullable_to_non_nullable @@ -88,7 +88,8 @@ as DeviceSettingsEntity,connectionServer: null == connectionServer ? _self.conne 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 DeviceCapabilitiesEntity?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as DeviceCapabilitiesEntity?,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable +as String?,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?, )); @@ -196,10 +197,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, 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 _: +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.backgroundImageId,_that.createdAt,_that.updatedAt);case _: return orElse(); } @@ -217,10 +218,10 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, 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 _: +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.backgroundImageId,_that.createdAt,_that.updatedAt);case _: throw StateError('Unexpected subclass'); } @@ -237,10 +238,10 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, 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 _: +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.backgroundImageId,_that.createdAt,_that.updatedAt);case _: return null; } @@ -252,7 +253,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 flags = const {}, final List? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, this.carrierName, this.comment, this.phone, this.simId, final Map? paymentOptions, this.settings = const DeviceSettingsEntity(), this.connectionServer = '', this.protocol = '', this.type = '', this.capabilities, this.createdAt = '', this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions; + const _DeviceEntity({required this.id, required this.identificator, this.battery, this.userId, this.companyId, this.delegationId, this.groupId, final Map flags = const {}, final List? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, this.carrierName, this.comment, this.phone, this.simId, final Map? paymentOptions, this.settings = const DeviceSettingsEntity(), this.connectionServer = '', this.protocol = '', this.type = '', this.capabilities, this.backgroundImageId, this.createdAt = '', this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions; @override final String id; @@ -301,6 +302,7 @@ class _DeviceEntity implements DeviceEntity { @override@JsonKey() final String protocol; @override@JsonKey() final String type; @override final DeviceCapabilitiesEntity? capabilities; +@override final String? backgroundImageId; @override@JsonKey() final String createdAt; @override final String? updatedAt; @@ -314,16 +316,16 @@ _$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)&&(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)); + 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.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)&&(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),settings,connectionServer,protocol,type,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,backgroundImageId,createdAt,updatedAt]); @override String toString() { - return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, createdAt: $createdAt, updatedAt: $updatedAt)'; + return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)'; } @@ -334,7 +336,7 @@ 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 flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String createdAt, String? updatedAt + String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map flags, List? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt }); @@ -351,7 +353,7 @@ class __$DeviceEntityCopyWithImpl<$Res> /// Create a copy of DeviceEntity /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) { return _then(_DeviceEntity( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,identificator: null == identificator ? _self.identificator : identificator // ignore: cast_nullable_to_non_nullable @@ -377,7 +379,8 @@ as DeviceSettingsEntity,connectionServer: null == connectionServer ? _self.conne 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 DeviceCapabilitiesEntity?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as DeviceCapabilitiesEntity?,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable +as String?,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?, )); diff --git a/packages/sf_shared/lib/src/domain/entities/device_settings_entity.dart b/packages/sf_shared/lib/src/domain/entities/device_settings_entity.dart index 24315e58..c7c356f6 100644 --- a/packages/sf_shared/lib/src/domain/entities/device_settings_entity.dart +++ b/packages/sf_shared/lib/src/domain/entities/device_settings_entity.dart @@ -16,7 +16,6 @@ abstract class DeviceSettingsEntity with _$DeviceSettingsEntity { @Default(true) bool keyboard, @Default(true) bool gps, @Default(false) bool nightMode, - String? backgroundImageId, }) = _DeviceSettingsEntity; } diff --git a/packages/sf_shared/lib/src/domain/entities/device_settings_entity.freezed.dart b/packages/sf_shared/lib/src/domain/entities/device_settings_entity.freezed.dart index 1fdbb335..604801ea 100644 --- a/packages/sf_shared/lib/src/domain/entities/device_settings_entity.freezed.dart +++ b/packages/sf_shared/lib/src/domain/entities/device_settings_entity.freezed.dart @@ -14,7 +14,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$DeviceSettingsEntity { - int get frequency; int get frequencyHeartRate; int get timezone; bool get pedometer; String get language; List get alerts; DeviceVolumeEntity get volume; String? get soundMode; bool get keyboard; bool get gps; bool get nightMode; String? get backgroundImageId; + int get frequency; int get frequencyHeartRate; int get timezone; bool get pedometer; String get language; List 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) @@ -25,16 +25,16 @@ $DeviceSettingsEntityCopyWith get copyWith => _$DeviceSett @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)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)); + 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,backgroundImageId); +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, backgroundImageId: $backgroundImageId)'; + return 'DeviceSettingsEntity(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)'; } @@ -45,7 +45,7 @@ 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 alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId + int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode }); @@ -62,7 +62,7 @@ class _$DeviceSettingsEntityCopyWithImpl<$Res> /// 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,Object? backgroundImageId = freezed,}) { +@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 @@ -75,8 +75,7 @@ as DeviceVolumeEntity,soundMode: freezed == soundMode ? _self.soundMode : soundM 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,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable -as String?, +as bool, )); } /// Create a copy of DeviceSettingsEntity @@ -170,10 +169,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List 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,_that.backgroundImageId);case _: +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(); } @@ -191,10 +190,10 @@ return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pe /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List 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,_that.backgroundImageId);case _: +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'); } @@ -211,10 +210,10 @@ return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pe /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List 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,_that.backgroundImageId);case _: +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; } @@ -226,7 +225,7 @@ return $default(_that.frequency,_that.frequencyHeartRate,_that.timezone,_that.pe class _DeviceSettingsEntity implements DeviceSettingsEntity { - const _DeviceSettingsEntity({this.frequency = 60, this.frequencyHeartRate = 120, this.timezone = 0, this.pedometer = false, this.language = 'es', final List alerts = const [], this.volume = const DeviceVolumeEntity(), this.soundMode, this.keyboard = true, this.gps = true, this.nightMode = false, this.backgroundImageId}): _alerts = alerts; + const _DeviceSettingsEntity({this.frequency = 60, this.frequencyHeartRate = 120, this.timezone = 0, this.pedometer = false, this.language = 'es', final List alerts = const [], this.volume = const DeviceVolumeEntity(), this.soundMode, this.keyboard = true, this.gps = true, this.nightMode = false}): _alerts = alerts; @override@JsonKey() final int frequency; @@ -246,7 +245,6 @@ class _DeviceSettingsEntity implements DeviceSettingsEntity { @override@JsonKey() final bool keyboard; @override@JsonKey() final bool gps; @override@JsonKey() final bool nightMode; -@override final String? backgroundImageId; /// Create a copy of DeviceSettingsEntity /// with the given fields replaced by the non-null parameter values. @@ -258,16 +256,16 @@ _$DeviceSettingsEntityCopyWith<_DeviceSettingsEntity> get copyWith => __$DeviceS @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)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)); + 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,backgroundImageId); +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, backgroundImageId: $backgroundImageId)'; + return 'DeviceSettingsEntity(frequency: $frequency, frequencyHeartRate: $frequencyHeartRate, timezone: $timezone, pedometer: $pedometer, language: $language, alerts: $alerts, volume: $volume, soundMode: $soundMode, keyboard: $keyboard, gps: $gps, nightMode: $nightMode)'; } @@ -278,7 +276,7 @@ abstract mixin class _$DeviceSettingsEntityCopyWith<$Res> implements $DeviceSett factory _$DeviceSettingsEntityCopyWith(_DeviceSettingsEntity value, $Res Function(_DeviceSettingsEntity) _then) = __$DeviceSettingsEntityCopyWithImpl; @override @useResult $Res call({ - int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode, String? backgroundImageId + int frequency, int frequencyHeartRate, int timezone, bool pedometer, String language, List alerts, DeviceVolumeEntity volume, String? soundMode, bool keyboard, bool gps, bool nightMode }); @@ -295,7 +293,7 @@ class __$DeviceSettingsEntityCopyWithImpl<$Res> /// 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,Object? backgroundImageId = freezed,}) { +@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 @@ -308,8 +306,7 @@ as DeviceVolumeEntity,soundMode: freezed == soundMode ? _self.soundMode : soundM 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,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable -as String?, +as bool, )); }