wip: added basic methods

This commit is contained in:
vidya-hub
2023-12-19 20:55:44 +05:30
parent 5d5d7928db
commit e1ae22bdcd
10 changed files with 429 additions and 46 deletions

View File

@@ -68,22 +68,22 @@ class _$NameValueModelCopyWithImpl<$Res, $Val extends NameValueModel>
}
/// @nodoc
abstract class _$$_NameValueModelCopyWith<$Res>
abstract class _$$NameValueModelImplCopyWith<$Res>
implements $NameValueModelCopyWith<$Res> {
factory _$$_NameValueModelCopyWith(
_$_NameValueModel value, $Res Function(_$_NameValueModel) then) =
__$$_NameValueModelCopyWithImpl<$Res>;
factory _$$NameValueModelImplCopyWith(_$NameValueModelImpl value,
$Res Function(_$NameValueModelImpl) then) =
__$$NameValueModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String name, dynamic value});
}
/// @nodoc
class __$$_NameValueModelCopyWithImpl<$Res>
extends _$NameValueModelCopyWithImpl<$Res, _$_NameValueModel>
implements _$$_NameValueModelCopyWith<$Res> {
__$$_NameValueModelCopyWithImpl(
_$_NameValueModel _value, $Res Function(_$_NameValueModel) _then)
class __$$NameValueModelImplCopyWithImpl<$Res>
extends _$NameValueModelCopyWithImpl<$Res, _$NameValueModelImpl>
implements _$$NameValueModelImplCopyWith<$Res> {
__$$NameValueModelImplCopyWithImpl(
_$NameValueModelImpl _value, $Res Function(_$NameValueModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -92,7 +92,7 @@ class __$$_NameValueModelCopyWithImpl<$Res>
Object? name = null,
Object? value = freezed,
}) {
return _then(_$_NameValueModel(
return _then(_$NameValueModelImpl(
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
@@ -107,13 +107,13 @@ class __$$_NameValueModelCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$_NameValueModel
class _$NameValueModelImpl
with DiagnosticableTreeMixin
implements _NameValueModel {
const _$_NameValueModel({required this.name, required this.value});
const _$NameValueModelImpl({required this.name, required this.value});
factory _$_NameValueModel.fromJson(Map<String, dynamic> json) =>
_$$_NameValueModelFromJson(json);
factory _$NameValueModelImpl.fromJson(Map<String, dynamic> json) =>
_$$NameValueModelImplFromJson(json);
@override
final String name;
@@ -138,7 +138,7 @@ class _$_NameValueModel
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_NameValueModel &&
other is _$NameValueModelImpl &&
(identical(other.name, name) || other.name == name) &&
const DeepCollectionEquality().equals(other.value, value));
}
@@ -151,12 +151,13 @@ class _$_NameValueModel
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_NameValueModelCopyWith<_$_NameValueModel> get copyWith =>
__$$_NameValueModelCopyWithImpl<_$_NameValueModel>(this, _$identity);
_$$NameValueModelImplCopyWith<_$NameValueModelImpl> get copyWith =>
__$$NameValueModelImplCopyWithImpl<_$NameValueModelImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_NameValueModelToJson(
return _$$NameValueModelImplToJson(
this,
);
}
@@ -165,10 +166,10 @@ class _$_NameValueModel
abstract class _NameValueModel implements NameValueModel {
const factory _NameValueModel(
{required final String name,
required final dynamic value}) = _$_NameValueModel;
required final dynamic value}) = _$NameValueModelImpl;
factory _NameValueModel.fromJson(Map<String, dynamic> json) =
_$_NameValueModel.fromJson;
_$NameValueModelImpl.fromJson;
@override
String get name;
@@ -176,6 +177,6 @@ abstract class _NameValueModel implements NameValueModel {
dynamic get value;
@override
@JsonKey(ignore: true)
_$$_NameValueModelCopyWith<_$_NameValueModel> get copyWith =>
_$$NameValueModelImplCopyWith<_$NameValueModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}