185 lines
5.1 KiB
Dart
185 lines
5.1 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// 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 'language.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(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 informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
|
|
|
|
Language _$LanguageFromJson(Map<String, dynamic> json) {
|
|
return _Language.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$LanguageTearOff {
|
|
const _$LanguageTearOff();
|
|
|
|
_Language call(String code, String name) {
|
|
return _Language(
|
|
code,
|
|
name,
|
|
);
|
|
}
|
|
|
|
Language fromJson(Map<String, Object?> json) {
|
|
return Language.fromJson(json);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
const $Language = _$LanguageTearOff();
|
|
|
|
/// @nodoc
|
|
mixin _$Language {
|
|
/// ISO 639-1 code of this language.
|
|
String get code => throw _privateConstructorUsedError;
|
|
|
|
/// Full English name of this language. This could be an empty string.
|
|
String get name => throw _privateConstructorUsedError;
|
|
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
@JsonKey(ignore: true)
|
|
$LanguageCopyWith<Language> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $LanguageCopyWith<$Res> {
|
|
factory $LanguageCopyWith(Language value, $Res Function(Language) then) =
|
|
_$LanguageCopyWithImpl<$Res>;
|
|
$Res call({String code, String name});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$LanguageCopyWithImpl<$Res> implements $LanguageCopyWith<$Res> {
|
|
_$LanguageCopyWithImpl(this._value, this._then);
|
|
|
|
final Language _value;
|
|
// ignore: unused_field
|
|
final $Res Function(Language) _then;
|
|
|
|
@override
|
|
$Res call({
|
|
Object? code = freezed,
|
|
Object? name = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
code: code == freezed
|
|
? _value.code
|
|
: code // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: name == freezed
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$LanguageCopyWith<$Res> implements $LanguageCopyWith<$Res> {
|
|
factory _$LanguageCopyWith(_Language value, $Res Function(_Language) then) =
|
|
__$LanguageCopyWithImpl<$Res>;
|
|
@override
|
|
$Res call({String code, String name});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$LanguageCopyWithImpl<$Res> extends _$LanguageCopyWithImpl<$Res>
|
|
implements _$LanguageCopyWith<$Res> {
|
|
__$LanguageCopyWithImpl(_Language _value, $Res Function(_Language) _then)
|
|
: super(_value, (v) => _then(v as _Language));
|
|
|
|
@override
|
|
_Language get _value => super._value as _Language;
|
|
|
|
@override
|
|
$Res call({
|
|
Object? code = freezed,
|
|
Object? name = freezed,
|
|
}) {
|
|
return _then(_Language(
|
|
code == freezed
|
|
? _value.code
|
|
: code // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name == freezed
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$_Language extends _Language {
|
|
const _$_Language(this.code, this.name) : super._();
|
|
|
|
factory _$_Language.fromJson(Map<String, dynamic> json) =>
|
|
_$$_LanguageFromJson(json);
|
|
|
|
@override
|
|
|
|
/// ISO 639-1 code of this language.
|
|
final String code;
|
|
@override
|
|
|
|
/// Full English name of this language. This could be an empty string.
|
|
final String name;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Language(code: $code, name: $name)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(dynamic other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _Language &&
|
|
(identical(other.code, code) || other.code == code) &&
|
|
(identical(other.name, name) || other.name == name));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, code, name);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
_$LanguageCopyWith<_Language> get copyWith =>
|
|
__$LanguageCopyWithImpl<_Language>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$_LanguageToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _Language extends Language {
|
|
const factory _Language(String code, String name) = _$_Language;
|
|
const _Language._() : super._();
|
|
|
|
factory _Language.fromJson(Map<String, dynamic> json) = _$_Language.fromJson;
|
|
|
|
@override
|
|
|
|
/// ISO 639-1 code of this language.
|
|
String get code;
|
|
@override
|
|
|
|
/// Full English name of this language. This could be an empty string.
|
|
String get name;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$LanguageCopyWith<_Language> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|