From e2cc44e06b4770e140f2b56c74f16fa0a83520bf Mon Sep 17 00:00:00 2001 From: Nikita Sirovskiy Date: Fri, 13 Jan 2023 13:13:37 +0300 Subject: [PATCH] nit(#80): Remove all the generated files --- .../authenticator_exception.freezed.dart | 417 ----------------- lib/data/model/auth/auth_tokens.freezed.dart | 237 ---------- lib/data/model/auth/auth_tokens.g.dart | 25 - .../error_response.freezed.dart | 430 ------------------ .../response_objects/error_response.g.dart | 44 -- .../tokens_response.freezed.dart | 219 --------- .../response_objects/tokens_response.g.dart | 23 - lib/domain/entities/user.freezed.dart | 157 ------- lib/domain/entities/user.g.dart | 17 - .../application_config.freezed.dart | 167 ------- lib/presentation/application_config.g.dart | 26 -- .../profile/profile_state.freezed.dart | 149 ------ 12 files changed, 1911 deletions(-) delete mode 100644 lib/data/api/exceptions/authenticator_exception.freezed.dart delete mode 100644 lib/data/model/auth/auth_tokens.freezed.dart delete mode 100644 lib/data/model/auth/auth_tokens.g.dart delete mode 100644 lib/data/services/response_objects/error_response.freezed.dart delete mode 100644 lib/data/services/response_objects/error_response.g.dart delete mode 100644 lib/data/services/response_objects/tokens_response.freezed.dart delete mode 100644 lib/data/services/response_objects/tokens_response.g.dart delete mode 100644 lib/domain/entities/user.freezed.dart delete mode 100644 lib/domain/entities/user.g.dart delete mode 100644 lib/presentation/application_config.freezed.dart delete mode 100644 lib/presentation/application_config.g.dart delete mode 100644 lib/presentation/feature/profile/profile_state.freezed.dart diff --git a/lib/data/api/exceptions/authenticator_exception.freezed.dart b/lib/data/api/exceptions/authenticator_exception.freezed.dart deleted file mode 100644 index edcf5a4..0000000 --- a/lib/data/api/exceptions/authenticator_exception.freezed.dart +++ /dev/null @@ -1,417 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'authenticator_exception.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -mixin _$AuthenticatorException { - @optionalTypeArgs - TResult when({ - required TResult Function() unauthorized, - required TResult Function() noRefreshToken, - required TResult Function() reauthenticationFailed, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(_Unauthorized value) unauthorized, - required TResult Function(_NoRefreshToken value) noRefreshToken, - required TResult Function(_ReauthenticationFailed value) - reauthenticationFailed, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AuthenticatorExceptionCopyWith<$Res> { - factory $AuthenticatorExceptionCopyWith(AuthenticatorException value, - $Res Function(AuthenticatorException) then) = - _$AuthenticatorExceptionCopyWithImpl<$Res>; -} - -/// @nodoc -class _$AuthenticatorExceptionCopyWithImpl<$Res> - implements $AuthenticatorExceptionCopyWith<$Res> { - _$AuthenticatorExceptionCopyWithImpl(this._value, this._then); - - final AuthenticatorException _value; - // ignore: unused_field - final $Res Function(AuthenticatorException) _then; -} - -/// @nodoc -abstract class _$UnauthorizedCopyWith<$Res> { - factory _$UnauthorizedCopyWith( - _Unauthorized value, $Res Function(_Unauthorized) then) = - __$UnauthorizedCopyWithImpl<$Res>; -} - -/// @nodoc -class __$UnauthorizedCopyWithImpl<$Res> - extends _$AuthenticatorExceptionCopyWithImpl<$Res> - implements _$UnauthorizedCopyWith<$Res> { - __$UnauthorizedCopyWithImpl( - _Unauthorized _value, $Res Function(_Unauthorized) _then) - : super(_value, (v) => _then(v as _Unauthorized)); - - @override - _Unauthorized get _value => super._value as _Unauthorized; -} - -/// @nodoc - -class _$_Unauthorized implements _Unauthorized { - const _$_Unauthorized(); - - @override - String toString() { - return 'AuthenticatorException.unauthorized()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _Unauthorized); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() unauthorized, - required TResult Function() noRefreshToken, - required TResult Function() reauthenticationFailed, - }) { - return unauthorized(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - }) { - return unauthorized?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - required TResult orElse(), - }) { - if (unauthorized != null) { - return unauthorized(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Unauthorized value) unauthorized, - required TResult Function(_NoRefreshToken value) noRefreshToken, - required TResult Function(_ReauthenticationFailed value) - reauthenticationFailed, - }) { - return unauthorized(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - }) { - return unauthorized?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - required TResult orElse(), - }) { - if (unauthorized != null) { - return unauthorized(this); - } - return orElse(); - } -} - -abstract class _Unauthorized implements AuthenticatorException { - const factory _Unauthorized() = _$_Unauthorized; -} - -/// @nodoc -abstract class _$NoRefreshTokenCopyWith<$Res> { - factory _$NoRefreshTokenCopyWith( - _NoRefreshToken value, $Res Function(_NoRefreshToken) then) = - __$NoRefreshTokenCopyWithImpl<$Res>; -} - -/// @nodoc -class __$NoRefreshTokenCopyWithImpl<$Res> - extends _$AuthenticatorExceptionCopyWithImpl<$Res> - implements _$NoRefreshTokenCopyWith<$Res> { - __$NoRefreshTokenCopyWithImpl( - _NoRefreshToken _value, $Res Function(_NoRefreshToken) _then) - : super(_value, (v) => _then(v as _NoRefreshToken)); - - @override - _NoRefreshToken get _value => super._value as _NoRefreshToken; -} - -/// @nodoc - -class _$_NoRefreshToken implements _NoRefreshToken { - const _$_NoRefreshToken(); - - @override - String toString() { - return 'AuthenticatorException.noRefreshToken()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _NoRefreshToken); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() unauthorized, - required TResult Function() noRefreshToken, - required TResult Function() reauthenticationFailed, - }) { - return noRefreshToken(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - }) { - return noRefreshToken?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - required TResult orElse(), - }) { - if (noRefreshToken != null) { - return noRefreshToken(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Unauthorized value) unauthorized, - required TResult Function(_NoRefreshToken value) noRefreshToken, - required TResult Function(_ReauthenticationFailed value) - reauthenticationFailed, - }) { - return noRefreshToken(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - }) { - return noRefreshToken?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - required TResult orElse(), - }) { - if (noRefreshToken != null) { - return noRefreshToken(this); - } - return orElse(); - } -} - -abstract class _NoRefreshToken implements AuthenticatorException { - const factory _NoRefreshToken() = _$_NoRefreshToken; -} - -/// @nodoc -abstract class _$ReauthenticationFailedCopyWith<$Res> { - factory _$ReauthenticationFailedCopyWith(_ReauthenticationFailed value, - $Res Function(_ReauthenticationFailed) then) = - __$ReauthenticationFailedCopyWithImpl<$Res>; -} - -/// @nodoc -class __$ReauthenticationFailedCopyWithImpl<$Res> - extends _$AuthenticatorExceptionCopyWithImpl<$Res> - implements _$ReauthenticationFailedCopyWith<$Res> { - __$ReauthenticationFailedCopyWithImpl(_ReauthenticationFailed _value, - $Res Function(_ReauthenticationFailed) _then) - : super(_value, (v) => _then(v as _ReauthenticationFailed)); - - @override - _ReauthenticationFailed get _value => super._value as _ReauthenticationFailed; -} - -/// @nodoc - -class _$_ReauthenticationFailed implements _ReauthenticationFailed { - const _$_ReauthenticationFailed(); - - @override - String toString() { - return 'AuthenticatorException.reauthenticationFailed()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _ReauthenticationFailed); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() unauthorized, - required TResult Function() noRefreshToken, - required TResult Function() reauthenticationFailed, - }) { - return reauthenticationFailed(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - }) { - return reauthenticationFailed?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? unauthorized, - TResult Function()? noRefreshToken, - TResult Function()? reauthenticationFailed, - required TResult orElse(), - }) { - if (reauthenticationFailed != null) { - return reauthenticationFailed(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Unauthorized value) unauthorized, - required TResult Function(_NoRefreshToken value) noRefreshToken, - required TResult Function(_ReauthenticationFailed value) - reauthenticationFailed, - }) { - return reauthenticationFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - }) { - return reauthenticationFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Unauthorized value)? unauthorized, - TResult Function(_NoRefreshToken value)? noRefreshToken, - TResult Function(_ReauthenticationFailed value)? reauthenticationFailed, - required TResult orElse(), - }) { - if (reauthenticationFailed != null) { - return reauthenticationFailed(this); - } - return orElse(); - } -} - -abstract class _ReauthenticationFailed implements AuthenticatorException { - const factory _ReauthenticationFailed() = _$_ReauthenticationFailed; -} diff --git a/lib/data/model/auth/auth_tokens.freezed.dart b/lib/data/model/auth/auth_tokens.freezed.dart deleted file mode 100644 index 9d60d24..0000000 --- a/lib/data/model/auth/auth_tokens.freezed.dart +++ /dev/null @@ -1,237 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'auth_tokens.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -AuthTokens _$AuthTokensFromJson(Map json) { - return _AuthTokens.fromJson(json); -} - -/// @nodoc -mixin _$AuthTokens { - String get accessToken => throw _privateConstructorUsedError; - String get refreshToken => throw _privateConstructorUsedError; - String get tokenType => throw _privateConstructorUsedError; - double get expiresIn => throw _privateConstructorUsedError; - DateTime get expiresAt => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $AuthTokensCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AuthTokensCopyWith<$Res> { - factory $AuthTokensCopyWith( - AuthTokens value, $Res Function(AuthTokens) then) = - _$AuthTokensCopyWithImpl<$Res>; - $Res call( - {String accessToken, - String refreshToken, - String tokenType, - double expiresIn, - DateTime expiresAt}); -} - -/// @nodoc -class _$AuthTokensCopyWithImpl<$Res> implements $AuthTokensCopyWith<$Res> { - _$AuthTokensCopyWithImpl(this._value, this._then); - - final AuthTokens _value; - // ignore: unused_field - final $Res Function(AuthTokens) _then; - - @override - $Res call({ - Object? accessToken = freezed, - Object? refreshToken = freezed, - Object? tokenType = freezed, - Object? expiresIn = freezed, - Object? expiresAt = freezed, - }) { - return _then(_value.copyWith( - accessToken: accessToken == freezed - ? _value.accessToken - : accessToken // ignore: cast_nullable_to_non_nullable - as String, - refreshToken: refreshToken == freezed - ? _value.refreshToken - : refreshToken // ignore: cast_nullable_to_non_nullable - as String, - tokenType: tokenType == freezed - ? _value.tokenType - : tokenType // ignore: cast_nullable_to_non_nullable - as String, - expiresIn: expiresIn == freezed - ? _value.expiresIn - : expiresIn // ignore: cast_nullable_to_non_nullable - as double, - expiresAt: expiresAt == freezed - ? _value.expiresAt - : expiresAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); - } -} - -/// @nodoc -abstract class _$AuthTokensCopyWith<$Res> implements $AuthTokensCopyWith<$Res> { - factory _$AuthTokensCopyWith( - _AuthTokens value, $Res Function(_AuthTokens) then) = - __$AuthTokensCopyWithImpl<$Res>; - @override - $Res call( - {String accessToken, - String refreshToken, - String tokenType, - double expiresIn, - DateTime expiresAt}); -} - -/// @nodoc -class __$AuthTokensCopyWithImpl<$Res> extends _$AuthTokensCopyWithImpl<$Res> - implements _$AuthTokensCopyWith<$Res> { - __$AuthTokensCopyWithImpl( - _AuthTokens _value, $Res Function(_AuthTokens) _then) - : super(_value, (v) => _then(v as _AuthTokens)); - - @override - _AuthTokens get _value => super._value as _AuthTokens; - - @override - $Res call({ - Object? accessToken = freezed, - Object? refreshToken = freezed, - Object? tokenType = freezed, - Object? expiresIn = freezed, - Object? expiresAt = freezed, - }) { - return _then(_AuthTokens( - accessToken: accessToken == freezed - ? _value.accessToken - : accessToken // ignore: cast_nullable_to_non_nullable - as String, - refreshToken: refreshToken == freezed - ? _value.refreshToken - : refreshToken // ignore: cast_nullable_to_non_nullable - as String, - tokenType: tokenType == freezed - ? _value.tokenType - : tokenType // ignore: cast_nullable_to_non_nullable - as String, - expiresIn: expiresIn == freezed - ? _value.expiresIn - : expiresIn // ignore: cast_nullable_to_non_nullable - as double, - expiresAt: expiresAt == freezed - ? _value.expiresAt - : expiresAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_AuthTokens extends _AuthTokens { - const _$_AuthTokens( - {required this.accessToken, - required this.refreshToken, - required this.tokenType, - required this.expiresIn, - required this.expiresAt}) - : super._(); - - factory _$_AuthTokens.fromJson(Map json) => - _$$_AuthTokensFromJson(json); - - @override - final String accessToken; - @override - final String refreshToken; - @override - final String tokenType; - @override - final double expiresIn; - @override - final DateTime expiresAt; - - @override - String toString() { - return 'AuthTokens(accessToken: $accessToken, refreshToken: $refreshToken, tokenType: $tokenType, expiresIn: $expiresIn, expiresAt: $expiresAt)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _AuthTokens && - const DeepCollectionEquality() - .equals(other.accessToken, accessToken) && - const DeepCollectionEquality() - .equals(other.refreshToken, refreshToken) && - const DeepCollectionEquality().equals(other.tokenType, tokenType) && - const DeepCollectionEquality().equals(other.expiresIn, expiresIn) && - const DeepCollectionEquality().equals(other.expiresAt, expiresAt)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(accessToken), - const DeepCollectionEquality().hash(refreshToken), - const DeepCollectionEquality().hash(tokenType), - const DeepCollectionEquality().hash(expiresIn), - const DeepCollectionEquality().hash(expiresAt)); - - @JsonKey(ignore: true) - @override - _$AuthTokensCopyWith<_AuthTokens> get copyWith => - __$AuthTokensCopyWithImpl<_AuthTokens>(this, _$identity); - - @override - Map toJson() { - return _$$_AuthTokensToJson(this); - } -} - -abstract class _AuthTokens extends AuthTokens { - const factory _AuthTokens( - {required final String accessToken, - required final String refreshToken, - required final String tokenType, - required final double expiresIn, - required final DateTime expiresAt}) = _$_AuthTokens; - const _AuthTokens._() : super._(); - - factory _AuthTokens.fromJson(Map json) = - _$_AuthTokens.fromJson; - - @override - String get accessToken => throw _privateConstructorUsedError; - @override - String get refreshToken => throw _privateConstructorUsedError; - @override - String get tokenType => throw _privateConstructorUsedError; - @override - double get expiresIn => throw _privateConstructorUsedError; - @override - DateTime get expiresAt => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$AuthTokensCopyWith<_AuthTokens> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/lib/data/model/auth/auth_tokens.g.dart b/lib/data/model/auth/auth_tokens.g.dart deleted file mode 100644 index 71f8d9d..0000000 --- a/lib/data/model/auth/auth_tokens.g.dart +++ /dev/null @@ -1,25 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'auth_tokens.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_AuthTokens _$$_AuthTokensFromJson(Map json) => - _$_AuthTokens( - accessToken: json['accessToken'] as String, - refreshToken: json['refreshToken'] as String, - tokenType: json['tokenType'] as String, - expiresIn: (json['expiresIn'] as num).toDouble(), - expiresAt: DateTime.parse(json['expiresAt'] as String), - ); - -Map _$$_AuthTokensToJson(_$_AuthTokens instance) => - { - 'accessToken': instance.accessToken, - 'refreshToken': instance.refreshToken, - 'tokenType': instance.tokenType, - 'expiresIn': instance.expiresIn, - 'expiresAt': instance.expiresAt.toIso8601String(), - }; diff --git a/lib/data/services/response_objects/error_response.freezed.dart b/lib/data/services/response_objects/error_response.freezed.dart deleted file mode 100644 index 36125cb..0000000 --- a/lib/data/services/response_objects/error_response.freezed.dart +++ /dev/null @@ -1,430 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'error_response.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -APIError _$APIErrorFromJson(Map json) { - return _APIError.fromJson(json); -} - -/// @nodoc -mixin _$APIError { - String? get requestId => throw _privateConstructorUsedError; - String? get timestamp => throw _privateConstructorUsedError; - int get statusCode => throw _privateConstructorUsedError; - String get message => throw _privateConstructorUsedError; - String get localizedMessage => throw _privateConstructorUsedError; - @JsonKey(unknownEnumValue: ErrorName.unknown) - ErrorName get errorName => throw _privateConstructorUsedError; - String? get path => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $APIErrorCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $APIErrorCopyWith<$Res> { - factory $APIErrorCopyWith(APIError value, $Res Function(APIError) then) = - _$APIErrorCopyWithImpl<$Res>; - $Res call( - {String? requestId, - String? timestamp, - int statusCode, - String message, - String localizedMessage, - @JsonKey(unknownEnumValue: ErrorName.unknown) ErrorName errorName, - String? path}); -} - -/// @nodoc -class _$APIErrorCopyWithImpl<$Res> implements $APIErrorCopyWith<$Res> { - _$APIErrorCopyWithImpl(this._value, this._then); - - final APIError _value; - // ignore: unused_field - final $Res Function(APIError) _then; - - @override - $Res call({ - Object? requestId = freezed, - Object? timestamp = freezed, - Object? statusCode = freezed, - Object? message = freezed, - Object? localizedMessage = freezed, - Object? errorName = freezed, - Object? path = freezed, - }) { - return _then(_value.copyWith( - requestId: requestId == freezed - ? _value.requestId - : requestId // ignore: cast_nullable_to_non_nullable - as String?, - timestamp: timestamp == freezed - ? _value.timestamp - : timestamp // ignore: cast_nullable_to_non_nullable - as String?, - statusCode: statusCode == freezed - ? _value.statusCode - : statusCode // ignore: cast_nullable_to_non_nullable - as int, - message: message == freezed - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String, - localizedMessage: localizedMessage == freezed - ? _value.localizedMessage - : localizedMessage // ignore: cast_nullable_to_non_nullable - as String, - errorName: errorName == freezed - ? _value.errorName - : errorName // ignore: cast_nullable_to_non_nullable - as ErrorName, - path: path == freezed - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -abstract class _$APIErrorCopyWith<$Res> implements $APIErrorCopyWith<$Res> { - factory _$APIErrorCopyWith(_APIError value, $Res Function(_APIError) then) = - __$APIErrorCopyWithImpl<$Res>; - @override - $Res call( - {String? requestId, - String? timestamp, - int statusCode, - String message, - String localizedMessage, - @JsonKey(unknownEnumValue: ErrorName.unknown) ErrorName errorName, - String? path}); -} - -/// @nodoc -class __$APIErrorCopyWithImpl<$Res> extends _$APIErrorCopyWithImpl<$Res> - implements _$APIErrorCopyWith<$Res> { - __$APIErrorCopyWithImpl(_APIError _value, $Res Function(_APIError) _then) - : super(_value, (v) => _then(v as _APIError)); - - @override - _APIError get _value => super._value as _APIError; - - @override - $Res call({ - Object? requestId = freezed, - Object? timestamp = freezed, - Object? statusCode = freezed, - Object? message = freezed, - Object? localizedMessage = freezed, - Object? errorName = freezed, - Object? path = freezed, - }) { - return _then(_APIError( - requestId: requestId == freezed - ? _value.requestId - : requestId // ignore: cast_nullable_to_non_nullable - as String?, - timestamp: timestamp == freezed - ? _value.timestamp - : timestamp // ignore: cast_nullable_to_non_nullable - as String?, - statusCode: statusCode == freezed - ? _value.statusCode - : statusCode // ignore: cast_nullable_to_non_nullable - as int, - message: message == freezed - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String, - localizedMessage: localizedMessage == freezed - ? _value.localizedMessage - : localizedMessage // ignore: cast_nullable_to_non_nullable - as String, - errorName: errorName == freezed - ? _value.errorName - : errorName // ignore: cast_nullable_to_non_nullable - as ErrorName, - path: path == freezed - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_APIError implements _APIError { - const _$_APIError( - {required this.requestId, - required this.timestamp, - required this.statusCode, - required this.message, - required this.localizedMessage, - @JsonKey(unknownEnumValue: ErrorName.unknown) required this.errorName, - required this.path}); - - factory _$_APIError.fromJson(Map json) => - _$$_APIErrorFromJson(json); - - @override - final String? requestId; - @override - final String? timestamp; - @override - final int statusCode; - @override - final String message; - @override - final String localizedMessage; - @override - @JsonKey(unknownEnumValue: ErrorName.unknown) - final ErrorName errorName; - @override - final String? path; - - @override - String toString() { - return 'APIError(requestId: $requestId, timestamp: $timestamp, statusCode: $statusCode, message: $message, localizedMessage: $localizedMessage, errorName: $errorName, path: $path)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _APIError && - const DeepCollectionEquality().equals(other.requestId, requestId) && - const DeepCollectionEquality().equals(other.timestamp, timestamp) && - const DeepCollectionEquality() - .equals(other.statusCode, statusCode) && - const DeepCollectionEquality().equals(other.message, message) && - const DeepCollectionEquality() - .equals(other.localizedMessage, localizedMessage) && - const DeepCollectionEquality().equals(other.errorName, errorName) && - const DeepCollectionEquality().equals(other.path, path)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(requestId), - const DeepCollectionEquality().hash(timestamp), - const DeepCollectionEquality().hash(statusCode), - const DeepCollectionEquality().hash(message), - const DeepCollectionEquality().hash(localizedMessage), - const DeepCollectionEquality().hash(errorName), - const DeepCollectionEquality().hash(path)); - - @JsonKey(ignore: true) - @override - _$APIErrorCopyWith<_APIError> get copyWith => - __$APIErrorCopyWithImpl<_APIError>(this, _$identity); - - @override - Map toJson() { - return _$$_APIErrorToJson(this); - } -} - -abstract class _APIError implements APIError { - const factory _APIError( - {required final String? requestId, - required final String? timestamp, - required final int statusCode, - required final String message, - required final String localizedMessage, - @JsonKey(unknownEnumValue: ErrorName.unknown) - required final ErrorName errorName, - required final String? path}) = _$_APIError; - - factory _APIError.fromJson(Map json) = _$_APIError.fromJson; - - @override - String? get requestId => throw _privateConstructorUsedError; - @override - String? get timestamp => throw _privateConstructorUsedError; - @override - int get statusCode => throw _privateConstructorUsedError; - @override - String get message => throw _privateConstructorUsedError; - @override - String get localizedMessage => throw _privateConstructorUsedError; - @override - @JsonKey(unknownEnumValue: ErrorName.unknown) - ErrorName get errorName => throw _privateConstructorUsedError; - @override - String? get path => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$APIErrorCopyWith<_APIError> get copyWith => - throw _privateConstructorUsedError; -} - -ErrorResponse _$ErrorResponseFromJson(Map json) { - return _ErrorResponse.fromJson(json); -} - -/// @nodoc -mixin _$ErrorResponse { -//TODO: name this according to the map key from the error response -//if no map key exists then just create this factory with the APIError values -//and remove APIError, - APIError get error => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ErrorResponseCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ErrorResponseCopyWith<$Res> { - factory $ErrorResponseCopyWith( - ErrorResponse value, $Res Function(ErrorResponse) then) = - _$ErrorResponseCopyWithImpl<$Res>; - $Res call({APIError error}); - - $APIErrorCopyWith<$Res> get error; -} - -/// @nodoc -class _$ErrorResponseCopyWithImpl<$Res> - implements $ErrorResponseCopyWith<$Res> { - _$ErrorResponseCopyWithImpl(this._value, this._then); - - final ErrorResponse _value; - // ignore: unused_field - final $Res Function(ErrorResponse) _then; - - @override - $Res call({ - Object? error = freezed, - }) { - return _then(_value.copyWith( - error: error == freezed - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as APIError, - )); - } - - @override - $APIErrorCopyWith<$Res> get error { - return $APIErrorCopyWith<$Res>(_value.error, (value) { - return _then(_value.copyWith(error: value)); - }); - } -} - -/// @nodoc -abstract class _$ErrorResponseCopyWith<$Res> - implements $ErrorResponseCopyWith<$Res> { - factory _$ErrorResponseCopyWith( - _ErrorResponse value, $Res Function(_ErrorResponse) then) = - __$ErrorResponseCopyWithImpl<$Res>; - @override - $Res call({APIError error}); - - @override - $APIErrorCopyWith<$Res> get error; -} - -/// @nodoc -class __$ErrorResponseCopyWithImpl<$Res> - extends _$ErrorResponseCopyWithImpl<$Res> - implements _$ErrorResponseCopyWith<$Res> { - __$ErrorResponseCopyWithImpl( - _ErrorResponse _value, $Res Function(_ErrorResponse) _then) - : super(_value, (v) => _then(v as _ErrorResponse)); - - @override - _ErrorResponse get _value => super._value as _ErrorResponse; - - @override - $Res call({ - Object? error = freezed, - }) { - return _then(_ErrorResponse( - error: error == freezed - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as APIError, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_ErrorResponse implements _ErrorResponse { - const _$_ErrorResponse({required this.error}); - - factory _$_ErrorResponse.fromJson(Map json) => - _$$_ErrorResponseFromJson(json); - -//TODO: name this according to the map key from the error response -//if no map key exists then just create this factory with the APIError values -//and remove APIError, - @override - final APIError error; - - @override - String toString() { - return 'ErrorResponse(error: $error)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ErrorResponse && - const DeepCollectionEquality().equals(other.error, error)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(error)); - - @JsonKey(ignore: true) - @override - _$ErrorResponseCopyWith<_ErrorResponse> get copyWith => - __$ErrorResponseCopyWithImpl<_ErrorResponse>(this, _$identity); - - @override - Map toJson() { - return _$$_ErrorResponseToJson(this); - } -} - -abstract class _ErrorResponse implements ErrorResponse { - const factory _ErrorResponse({required final APIError error}) = - _$_ErrorResponse; - - factory _ErrorResponse.fromJson(Map json) = - _$_ErrorResponse.fromJson; - - @override //TODO: name this according to the map key from the error response -//if no map key exists then just create this factory with the APIError values -//and remove APIError, - APIError get error => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$ErrorResponseCopyWith<_ErrorResponse> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/lib/data/services/response_objects/error_response.g.dart b/lib/data/services/response_objects/error_response.g.dart deleted file mode 100644 index 5e790ca..0000000 --- a/lib/data/services/response_objects/error_response.g.dart +++ /dev/null @@ -1,44 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'error_response.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_APIError _$$_APIErrorFromJson(Map json) => _$_APIError( - requestId: json['requestId'] as String?, - timestamp: json['timestamp'] as String?, - statusCode: json['statusCode'] as int, - message: json['message'] as String, - localizedMessage: json['localizedMessage'] as String, - errorName: $enumDecode(_$ErrorNameEnumMap, json['errorName'], - unknownValue: ErrorName.unknown), - path: json['path'] as String?, - ); - -Map _$$_APIErrorToJson(_$_APIError instance) => - { - 'requestId': instance.requestId, - 'timestamp': instance.timestamp, - 'statusCode': instance.statusCode, - 'message': instance.message, - 'localizedMessage': instance.localizedMessage, - 'errorName': _$ErrorNameEnumMap[instance.errorName], - 'path': instance.path, - }; - -const _$ErrorNameEnumMap = { - ErrorName.errorExample: 'errorExample', - ErrorName.unknown: 'unknown', -}; - -_$_ErrorResponse _$$_ErrorResponseFromJson(Map json) => - _$_ErrorResponse( - error: APIError.fromJson(json['error'] as Map), - ); - -Map _$$_ErrorResponseToJson(_$_ErrorResponse instance) => - { - 'error': instance.error, - }; diff --git a/lib/data/services/response_objects/tokens_response.freezed.dart b/lib/data/services/response_objects/tokens_response.freezed.dart deleted file mode 100644 index 48b876b..0000000 --- a/lib/data/services/response_objects/tokens_response.freezed.dart +++ /dev/null @@ -1,219 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'tokens_response.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -TokensResponse _$TokensResponseFromJson(Map json) { - return _TokensResponse.fromJson(json); -} - -/// @nodoc -mixin _$TokensResponse { - String get accessToken => throw _privateConstructorUsedError; - String get refreshToken => throw _privateConstructorUsedError; - String get tokenType => throw _privateConstructorUsedError; - double get expiresIn => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $TokensResponseCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TokensResponseCopyWith<$Res> { - factory $TokensResponseCopyWith( - TokensResponse value, $Res Function(TokensResponse) then) = - _$TokensResponseCopyWithImpl<$Res>; - $Res call( - {String accessToken, - String refreshToken, - String tokenType, - double expiresIn}); -} - -/// @nodoc -class _$TokensResponseCopyWithImpl<$Res> - implements $TokensResponseCopyWith<$Res> { - _$TokensResponseCopyWithImpl(this._value, this._then); - - final TokensResponse _value; - // ignore: unused_field - final $Res Function(TokensResponse) _then; - - @override - $Res call({ - Object? accessToken = freezed, - Object? refreshToken = freezed, - Object? tokenType = freezed, - Object? expiresIn = freezed, - }) { - return _then(_value.copyWith( - accessToken: accessToken == freezed - ? _value.accessToken - : accessToken // ignore: cast_nullable_to_non_nullable - as String, - refreshToken: refreshToken == freezed - ? _value.refreshToken - : refreshToken // ignore: cast_nullable_to_non_nullable - as String, - tokenType: tokenType == freezed - ? _value.tokenType - : tokenType // ignore: cast_nullable_to_non_nullable - as String, - expiresIn: expiresIn == freezed - ? _value.expiresIn - : expiresIn // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - -/// @nodoc -abstract class _$TokensResponseCopyWith<$Res> - implements $TokensResponseCopyWith<$Res> { - factory _$TokensResponseCopyWith( - _TokensResponse value, $Res Function(_TokensResponse) then) = - __$TokensResponseCopyWithImpl<$Res>; - @override - $Res call( - {String accessToken, - String refreshToken, - String tokenType, - double expiresIn}); -} - -/// @nodoc -class __$TokensResponseCopyWithImpl<$Res> - extends _$TokensResponseCopyWithImpl<$Res> - implements _$TokensResponseCopyWith<$Res> { - __$TokensResponseCopyWithImpl( - _TokensResponse _value, $Res Function(_TokensResponse) _then) - : super(_value, (v) => _then(v as _TokensResponse)); - - @override - _TokensResponse get _value => super._value as _TokensResponse; - - @override - $Res call({ - Object? accessToken = freezed, - Object? refreshToken = freezed, - Object? tokenType = freezed, - Object? expiresIn = freezed, - }) { - return _then(_TokensResponse( - accessToken: accessToken == freezed - ? _value.accessToken - : accessToken // ignore: cast_nullable_to_non_nullable - as String, - refreshToken: refreshToken == freezed - ? _value.refreshToken - : refreshToken // ignore: cast_nullable_to_non_nullable - as String, - tokenType: tokenType == freezed - ? _value.tokenType - : tokenType // ignore: cast_nullable_to_non_nullable - as String, - expiresIn: expiresIn == freezed - ? _value.expiresIn - : expiresIn // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_TokensResponse extends _TokensResponse { - const _$_TokensResponse( - {required this.accessToken, - required this.refreshToken, - required this.tokenType, - required this.expiresIn}) - : super._(); - - factory _$_TokensResponse.fromJson(Map json) => - _$$_TokensResponseFromJson(json); - - @override - final String accessToken; - @override - final String refreshToken; - @override - final String tokenType; - @override - final double expiresIn; - - @override - String toString() { - return 'TokensResponse(accessToken: $accessToken, refreshToken: $refreshToken, tokenType: $tokenType, expiresIn: $expiresIn)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TokensResponse && - const DeepCollectionEquality() - .equals(other.accessToken, accessToken) && - const DeepCollectionEquality() - .equals(other.refreshToken, refreshToken) && - const DeepCollectionEquality().equals(other.tokenType, tokenType) && - const DeepCollectionEquality().equals(other.expiresIn, expiresIn)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(accessToken), - const DeepCollectionEquality().hash(refreshToken), - const DeepCollectionEquality().hash(tokenType), - const DeepCollectionEquality().hash(expiresIn)); - - @JsonKey(ignore: true) - @override - _$TokensResponseCopyWith<_TokensResponse> get copyWith => - __$TokensResponseCopyWithImpl<_TokensResponse>(this, _$identity); - - @override - Map toJson() { - return _$$_TokensResponseToJson(this); - } -} - -abstract class _TokensResponse extends TokensResponse { - const factory _TokensResponse( - {required final String accessToken, - required final String refreshToken, - required final String tokenType, - required final double expiresIn}) = _$_TokensResponse; - const _TokensResponse._() : super._(); - - factory _TokensResponse.fromJson(Map json) = - _$_TokensResponse.fromJson; - - @override - String get accessToken => throw _privateConstructorUsedError; - @override - String get refreshToken => throw _privateConstructorUsedError; - @override - String get tokenType => throw _privateConstructorUsedError; - @override - double get expiresIn => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$TokensResponseCopyWith<_TokensResponse> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/lib/data/services/response_objects/tokens_response.g.dart b/lib/data/services/response_objects/tokens_response.g.dart deleted file mode 100644 index d934f7d..0000000 --- a/lib/data/services/response_objects/tokens_response.g.dart +++ /dev/null @@ -1,23 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'tokens_response.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_TokensResponse _$$_TokensResponseFromJson(Map json) => - _$_TokensResponse( - accessToken: json['accessToken'] as String, - refreshToken: json['refreshToken'] as String, - tokenType: json['tokenType'] as String, - expiresIn: (json['expiresIn'] as num).toDouble(), - ); - -Map _$$_TokensResponseToJson(_$_TokensResponse instance) => - { - 'accessToken': instance.accessToken, - 'refreshToken': instance.refreshToken, - 'tokenType': instance.tokenType, - 'expiresIn': instance.expiresIn, - }; diff --git a/lib/domain/entities/user.freezed.dart b/lib/domain/entities/user.freezed.dart deleted file mode 100644 index 4a18c8f..0000000 --- a/lib/domain/entities/user.freezed.dart +++ /dev/null @@ -1,157 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'user.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -User _$UserFromJson(Map json) { - return _User.fromJson(json); -} - -/// @nodoc -mixin _$User { - int get id => throw _privateConstructorUsedError; - String get username => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $UserCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $UserCopyWith<$Res> { - factory $UserCopyWith(User value, $Res Function(User) then) = - _$UserCopyWithImpl<$Res>; - $Res call({int id, String username}); -} - -/// @nodoc -class _$UserCopyWithImpl<$Res> implements $UserCopyWith<$Res> { - _$UserCopyWithImpl(this._value, this._then); - - final User _value; - // ignore: unused_field - final $Res Function(User) _then; - - @override - $Res call({ - Object? id = freezed, - Object? username = freezed, - }) { - return _then(_value.copyWith( - id: id == freezed - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - username: username == freezed - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -abstract class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> { - factory _$UserCopyWith(_User value, $Res Function(_User) then) = - __$UserCopyWithImpl<$Res>; - @override - $Res call({int id, String username}); -} - -/// @nodoc -class __$UserCopyWithImpl<$Res> extends _$UserCopyWithImpl<$Res> - implements _$UserCopyWith<$Res> { - __$UserCopyWithImpl(_User _value, $Res Function(_User) _then) - : super(_value, (v) => _then(v as _User)); - - @override - _User get _value => super._value as _User; - - @override - $Res call({ - Object? id = freezed, - Object? username = freezed, - }) { - return _then(_User( - id: id == freezed - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - username: username == freezed - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_User extends _User { - const _$_User({required this.id, required this.username}) : super._(); - - factory _$_User.fromJson(Map json) => _$$_UserFromJson(json); - - @override - final int id; - @override - final String username; - - @override - String toString() { - return 'User(id: $id, username: $username)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _User && - const DeepCollectionEquality().equals(other.id, id) && - const DeepCollectionEquality().equals(other.username, username)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(id), - const DeepCollectionEquality().hash(username)); - - @JsonKey(ignore: true) - @override - _$UserCopyWith<_User> get copyWith => - __$UserCopyWithImpl<_User>(this, _$identity); - - @override - Map toJson() { - return _$$_UserToJson(this); - } -} - -abstract class _User extends User { - const factory _User({required final int id, required final String username}) = - _$_User; - const _User._() : super._(); - - factory _User.fromJson(Map json) = _$_User.fromJson; - - @override - int get id => throw _privateConstructorUsedError; - @override - String get username => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$UserCopyWith<_User> get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/domain/entities/user.g.dart b/lib/domain/entities/user.g.dart deleted file mode 100644 index 5a61d8b..0000000 --- a/lib/domain/entities/user.g.dart +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'user.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_User _$$_UserFromJson(Map json) => _$_User( - id: json['id'] as int, - username: json['username'] as String, - ); - -Map _$$_UserToJson(_$_User instance) => { - 'id': instance.id, - 'username': instance.username, - }; diff --git a/lib/presentation/application_config.freezed.dart b/lib/presentation/application_config.freezed.dart deleted file mode 100644 index 9f6765a..0000000 --- a/lib/presentation/application_config.freezed.dart +++ /dev/null @@ -1,167 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'application_config.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -ApplicationConfig _$ApplicationConfigFromJson(Map json) { - return _ApplicationConfig.fromJson(json); -} - -/// @nodoc -mixin _$ApplicationConfig { - String get apiUrl => throw _privateConstructorUsedError; - AppFlavor get flavor => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ApplicationConfigCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ApplicationConfigCopyWith<$Res> { - factory $ApplicationConfigCopyWith( - ApplicationConfig value, $Res Function(ApplicationConfig) then) = - _$ApplicationConfigCopyWithImpl<$Res>; - $Res call({String apiUrl, AppFlavor flavor}); -} - -/// @nodoc -class _$ApplicationConfigCopyWithImpl<$Res> - implements $ApplicationConfigCopyWith<$Res> { - _$ApplicationConfigCopyWithImpl(this._value, this._then); - - final ApplicationConfig _value; - // ignore: unused_field - final $Res Function(ApplicationConfig) _then; - - @override - $Res call({ - Object? apiUrl = freezed, - Object? flavor = freezed, - }) { - return _then(_value.copyWith( - apiUrl: apiUrl == freezed - ? _value.apiUrl - : apiUrl // ignore: cast_nullable_to_non_nullable - as String, - flavor: flavor == freezed - ? _value.flavor - : flavor // ignore: cast_nullable_to_non_nullable - as AppFlavor, - )); - } -} - -/// @nodoc -abstract class _$ApplicationConfigCopyWith<$Res> - implements $ApplicationConfigCopyWith<$Res> { - factory _$ApplicationConfigCopyWith( - _ApplicationConfig value, $Res Function(_ApplicationConfig) then) = - __$ApplicationConfigCopyWithImpl<$Res>; - @override - $Res call({String apiUrl, AppFlavor flavor}); -} - -/// @nodoc -class __$ApplicationConfigCopyWithImpl<$Res> - extends _$ApplicationConfigCopyWithImpl<$Res> - implements _$ApplicationConfigCopyWith<$Res> { - __$ApplicationConfigCopyWithImpl( - _ApplicationConfig _value, $Res Function(_ApplicationConfig) _then) - : super(_value, (v) => _then(v as _ApplicationConfig)); - - @override - _ApplicationConfig get _value => super._value as _ApplicationConfig; - - @override - $Res call({ - Object? apiUrl = freezed, - Object? flavor = freezed, - }) { - return _then(_ApplicationConfig( - apiUrl: apiUrl == freezed - ? _value.apiUrl - : apiUrl // ignore: cast_nullable_to_non_nullable - as String, - flavor: flavor == freezed - ? _value.flavor - : flavor // ignore: cast_nullable_to_non_nullable - as AppFlavor, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_ApplicationConfig implements _ApplicationConfig { - const _$_ApplicationConfig({required this.apiUrl, required this.flavor}); - - factory _$_ApplicationConfig.fromJson(Map json) => - _$$_ApplicationConfigFromJson(json); - - @override - final String apiUrl; - @override - final AppFlavor flavor; - - @override - String toString() { - return 'ApplicationConfig(apiUrl: $apiUrl, flavor: $flavor)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ApplicationConfig && - const DeepCollectionEquality().equals(other.apiUrl, apiUrl) && - const DeepCollectionEquality().equals(other.flavor, flavor)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(apiUrl), - const DeepCollectionEquality().hash(flavor)); - - @JsonKey(ignore: true) - @override - _$ApplicationConfigCopyWith<_ApplicationConfig> get copyWith => - __$ApplicationConfigCopyWithImpl<_ApplicationConfig>(this, _$identity); - - @override - Map toJson() { - return _$$_ApplicationConfigToJson(this); - } -} - -abstract class _ApplicationConfig implements ApplicationConfig { - const factory _ApplicationConfig( - {required final String apiUrl, - required final AppFlavor flavor}) = _$_ApplicationConfig; - - factory _ApplicationConfig.fromJson(Map json) = - _$_ApplicationConfig.fromJson; - - @override - String get apiUrl => throw _privateConstructorUsedError; - @override - AppFlavor get flavor => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$ApplicationConfigCopyWith<_ApplicationConfig> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/lib/presentation/application_config.g.dart b/lib/presentation/application_config.g.dart deleted file mode 100644 index 022dbec..0000000 --- a/lib/presentation/application_config.g.dart +++ /dev/null @@ -1,26 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'application_config.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_ApplicationConfig _$$_ApplicationConfigFromJson(Map json) => - _$_ApplicationConfig( - apiUrl: json['apiUrl'] as String, - flavor: $enumDecode(_$AppFlavorEnumMap, json['flavor']), - ); - -Map _$$_ApplicationConfigToJson( - _$_ApplicationConfig instance) => - { - 'apiUrl': instance.apiUrl, - 'flavor': _$AppFlavorEnumMap[instance.flavor], - }; - -const _$AppFlavorEnumMap = { - AppFlavor.development: 'development', - AppFlavor.staging: 'staging', - AppFlavor.production: 'production', -}; diff --git a/lib/presentation/feature/profile/profile_state.freezed.dart b/lib/presentation/feature/profile/profile_state.freezed.dart deleted file mode 100644 index f82d2c6..0000000 --- a/lib/presentation/feature/profile/profile_state.freezed.dart +++ /dev/null @@ -1,149 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'profile_state.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -mixin _$ProfileState { - bool get isLoading => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $ProfileStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ProfileStateCopyWith<$Res> { - factory $ProfileStateCopyWith( - ProfileState value, $Res Function(ProfileState) then) = - _$ProfileStateCopyWithImpl<$Res>; - $Res call({bool isLoading, String name}); -} - -/// @nodoc -class _$ProfileStateCopyWithImpl<$Res> implements $ProfileStateCopyWith<$Res> { - _$ProfileStateCopyWithImpl(this._value, this._then); - - final ProfileState _value; - // ignore: unused_field - final $Res Function(ProfileState) _then; - - @override - $Res call({ - Object? isLoading = freezed, - Object? name = freezed, - }) { - return _then(_value.copyWith( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - name: name == freezed - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -abstract class _$ProfileStateCopyWith<$Res> - implements $ProfileStateCopyWith<$Res> { - factory _$ProfileStateCopyWith( - _ProfileState value, $Res Function(_ProfileState) then) = - __$ProfileStateCopyWithImpl<$Res>; - @override - $Res call({bool isLoading, String name}); -} - -/// @nodoc -class __$ProfileStateCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res> - implements _$ProfileStateCopyWith<$Res> { - __$ProfileStateCopyWithImpl( - _ProfileState _value, $Res Function(_ProfileState) _then) - : super(_value, (v) => _then(v as _ProfileState)); - - @override - _ProfileState get _value => super._value as _ProfileState; - - @override - $Res call({ - Object? isLoading = freezed, - Object? name = freezed, - }) { - return _then(_ProfileState( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - name: name == freezed - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$_ProfileState extends _ProfileState { - _$_ProfileState({required this.isLoading, required this.name}) : super._(); - - @override - final bool isLoading; - @override - final String name; - - @override - String toString() { - return 'ProfileState(isLoading: $isLoading, name: $name)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ProfileState && - const DeepCollectionEquality().equals(other.isLoading, isLoading) && - const DeepCollectionEquality().equals(other.name, name)); - } - - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(isLoading), - const DeepCollectionEquality().hash(name)); - - @JsonKey(ignore: true) - @override - _$ProfileStateCopyWith<_ProfileState> get copyWith => - __$ProfileStateCopyWithImpl<_ProfileState>(this, _$identity); -} - -abstract class _ProfileState extends ProfileState { - factory _ProfileState( - {required final bool isLoading, - required final String name}) = _$_ProfileState; - _ProfileState._() : super._(); - - @override - bool get isLoading => throw _privateConstructorUsedError; - @override - String get name => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$ProfileStateCopyWith<_ProfileState> get copyWith => - throw _privateConstructorUsedError; -}