chore: reverted name value model files

This commit is contained in:
vidya-hub
2023-12-20 22:28:03 +05:30
parent a9bbe208d4
commit 906cf83847
3 changed files with 25 additions and 28 deletions

View File

@@ -1,8 +1,7 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'name_value_model.freezed.dart'; part 'name_value_model.freezed.dart';
part 'name_value_model.g.dart'; part 'name_value_model.g.dart';
@freezed @freezed

View File

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

View File

@@ -6,14 +6,13 @@ part of 'name_value_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$NameValueModelImpl _$$NameValueModelImplFromJson(Map<String, dynamic> json) => _$_NameValueModel _$$_NameValueModelFromJson(Map<String, dynamic> json) =>
_$NameValueModelImpl( _$_NameValueModel(
name: json['name'] as String, name: json['name'] as String,
value: json['value'], value: json['value'],
); );
Map<String, dynamic> _$$NameValueModelImplToJson( Map<String, dynamic> _$$_NameValueModelToJson(_$_NameValueModel instance) =>
_$NameValueModelImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'name': instance.name, 'name': instance.name,
'value': instance.value, 'value': instance.value,