merged branches

This commit is contained in:
amirrezaghabeli
2025-08-12 09:11:26 +03:30
parent ba3becc709
commit a7e208a5de
58 changed files with 4584 additions and 2336 deletions
@@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// 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, unnecessary_question_mark
@@ -9,165 +9,269 @@ part of 'home_request_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
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 information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
HomeRequestModel _$HomeRequestModelFromJson(Map<String, dynamic> json) {
return _HomeRequestModel.fromJson(json);
}
/// @nodoc
mixin _$HomeRequestModel {
String get id => throw _privateConstructorUsedError;
String get id;
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$HomeRequestModelCopyWith<HomeRequestModel> get copyWith => _$HomeRequestModelCopyWithImpl<HomeRequestModel>(this as HomeRequestModel, _$identity);
/// Serializes this HomeRequestModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is HomeRequestModel&&(identical(other.id, id) || other.id == id));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id);
@override
String toString() {
return 'HomeRequestModel(id: $id)';
}
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$HomeRequestModelCopyWith<HomeRequestModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomeRequestModelCopyWith<$Res> {
factory $HomeRequestModelCopyWith(
HomeRequestModel value,
$Res Function(HomeRequestModel) then,
) = _$HomeRequestModelCopyWithImpl<$Res, HomeRequestModel>;
@useResult
$Res call({String id});
}
abstract mixin class $HomeRequestModelCopyWith<$Res> {
factory $HomeRequestModelCopyWith(HomeRequestModel value, $Res Function(HomeRequestModel) _then) = _$HomeRequestModelCopyWithImpl;
@useResult
$Res call({
String id
});
}
/// @nodoc
class _$HomeRequestModelCopyWithImpl<$Res, $Val extends HomeRequestModel>
class _$HomeRequestModelCopyWithImpl<$Res>
implements $HomeRequestModelCopyWith<$Res> {
_$HomeRequestModelCopyWithImpl(this._value, this._then);
_$HomeRequestModelCopyWithImpl(this._self, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
final HomeRequestModel _self;
final $Res Function(HomeRequestModel) _then;
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? id = null}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,
));
}
/// @nodoc
abstract class _$$HomeRequestModelImplCopyWith<$Res>
implements $HomeRequestModelCopyWith<$Res> {
factory _$$HomeRequestModelImplCopyWith(
_$HomeRequestModelImpl value,
$Res Function(_$HomeRequestModelImpl) then,
) = __$$HomeRequestModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id});
}
/// @nodoc
class __$$HomeRequestModelImplCopyWithImpl<$Res>
extends _$HomeRequestModelCopyWithImpl<$Res, _$HomeRequestModelImpl>
implements _$$HomeRequestModelImplCopyWith<$Res> {
__$$HomeRequestModelImplCopyWithImpl(
_$HomeRequestModelImpl _value,
$Res Function(_$HomeRequestModelImpl) _then,
) : super(_value, _then);
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? id = null}) {
return _then(
_$HomeRequestModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
/// Adds pattern-matching-related methods to [HomeRequestModel].
extension HomeRequestModelPatterns on HomeRequestModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _HomeRequestModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _HomeRequestModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _HomeRequestModel value) $default,){
final _that = this;
switch (_that) {
case _HomeRequestModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _HomeRequestModel value)? $default,){
final _that = this;
switch (_that) {
case _HomeRequestModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _HomeRequestModel() when $default != null:
return $default(_that.id);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id) $default,) {final _that = this;
switch (_that) {
case _HomeRequestModel():
return $default(_that.id);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id)? $default,) {final _that = this;
switch (_that) {
case _HomeRequestModel() when $default != null:
return $default(_that.id);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$HomeRequestModelImpl implements _HomeRequestModel {
const _$HomeRequestModelImpl({required this.id});
factory _$HomeRequestModelImpl.fromJson(Map<String, dynamic> json) =>
_$$HomeRequestModelImplFromJson(json);
class _HomeRequestModel implements HomeRequestModel {
const _HomeRequestModel({required this.id});
factory _HomeRequestModel.fromJson(Map<String, dynamic> json) => _$HomeRequestModelFromJson(json);
@override
final String id;
@override final String id;
@override
String toString() {
return 'HomeRequestModel(id: $id)';
}
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomeRequestModelCopyWith<_HomeRequestModel> get copyWith => __$HomeRequestModelCopyWithImpl<_HomeRequestModel>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$HomeRequestModelImpl &&
(identical(other.id, id) || other.id == id));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id);
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$HomeRequestModelImplCopyWith<_$HomeRequestModelImpl> get copyWith =>
__$$HomeRequestModelImplCopyWithImpl<_$HomeRequestModelImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$HomeRequestModelImplToJson(this);
}
@override
Map<String, dynamic> toJson() {
return _$HomeRequestModelToJson(this, );
}
abstract class _HomeRequestModel implements HomeRequestModel {
const factory _HomeRequestModel({required final String id}) =
_$HomeRequestModelImpl;
factory _HomeRequestModel.fromJson(Map<String, dynamic> json) =
_$HomeRequestModelImpl.fromJson;
@override
String get id;
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$HomeRequestModelImplCopyWith<_$HomeRequestModelImpl> get copyWith =>
throw _privateConstructorUsedError;
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HomeRequestModel&&(identical(other.id, id) || other.id == id));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id);
@override
String toString() {
return 'HomeRequestModel(id: $id)';
}
}
/// @nodoc
abstract mixin class _$HomeRequestModelCopyWith<$Res> implements $HomeRequestModelCopyWith<$Res> {
factory _$HomeRequestModelCopyWith(_HomeRequestModel value, $Res Function(_HomeRequestModel) _then) = __$HomeRequestModelCopyWithImpl;
@override @useResult
$Res call({
String id
});
}
/// @nodoc
class __$HomeRequestModelCopyWithImpl<$Res>
implements _$HomeRequestModelCopyWith<$Res> {
__$HomeRequestModelCopyWithImpl(this._self, this._then);
final _HomeRequestModel _self;
final $Res Function(_HomeRequestModel) _then;
/// Create a copy of HomeRequestModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,}) {
return _then(_HomeRequestModel(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
// dart format on
@@ -6,10 +6,8 @@ part of 'home_request_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$HomeRequestModelImpl _$$HomeRequestModelImplFromJson(
Map<String, dynamic> json,
) => _$HomeRequestModelImpl(id: json['id'] as String);
_HomeRequestModel _$HomeRequestModelFromJson(Map<String, dynamic> json) =>
_HomeRequestModel(id: json['id'] as String);
Map<String, dynamic> _$$HomeRequestModelImplToJson(
_$HomeRequestModelImpl instance,
) => <String, dynamic>{'id': instance.id};
Map<String, dynamic> _$HomeRequestModelToJson(_HomeRequestModel instance) =>
<String, dynamic>{'id': instance.id};
@@ -10,7 +10,7 @@ part 'home_response_model.g.dart';
abstract class HomeResponseModel with _$HomeResponseModel {
const factory HomeResponseModel({
required String? partnership,
@JsonKey(name: 'self_apply') required String? selfApply,
required String? selfApply,
required String? contracting,
@JsonKey(name: 'tender_submitted') required String? tenderSubmitted,
@JsonKey(name: 'approved_tenders') required String? approvedTenders,
@@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// 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, unnecessary_question_mark
@@ -9,377 +9,298 @@ part of 'home_response_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
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 information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
HomeResponseModel _$HomeResponseModelFromJson(Map<String, dynamic> json) {
return _HomeResponseModel.fromJson(json);
}
/// @nodoc
mixin _$HomeResponseModel {
String? get partnership => throw _privateConstructorUsedError;
@JsonKey(name: 'self_apply')
String? get selfApply => throw _privateConstructorUsedError;
String? get contracting => throw _privateConstructorUsedError;
@JsonKey(name: 'tender_submitted')
String? get tenderSubmitted => throw _privateConstructorUsedError;
@JsonKey(name: 'approved_tenders')
String? get approvedTenders => throw _privateConstructorUsedError;
@JsonKey(name: 'tender_value')
String? get tenderValue => throw _privateConstructorUsedError;
@JsonKey(name: 'thunder_status')
String? get thunderStatus => throw _privateConstructorUsedError;
@JsonKey(name: 'your_tenders')
List<TenderModel>? get yourTenders => throw _privateConstructorUsedError;
String? get partnership; String? get selfApply; String? get contracting;@JsonKey(name: 'tender_submitted') String? get tenderSubmitted;@JsonKey(name: 'approved_tenders') String? get approvedTenders;@JsonKey(name: 'tender_value') String? get tenderValue;@JsonKey(name: 'thunder_status') String? get thunderStatus;@JsonKey(name: 'your_tenders') List<TenderModel>? get yourTenders;
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$HomeResponseModelCopyWith<HomeResponseModel> get copyWith => _$HomeResponseModelCopyWithImpl<HomeResponseModel>(this as HomeResponseModel, _$identity);
/// Serializes this HomeResponseModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is HomeResponseModel&&(identical(other.partnership, partnership) || other.partnership == partnership)&&(identical(other.selfApply, selfApply) || other.selfApply == selfApply)&&(identical(other.contracting, contracting) || other.contracting == contracting)&&(identical(other.tenderSubmitted, tenderSubmitted) || other.tenderSubmitted == tenderSubmitted)&&(identical(other.approvedTenders, approvedTenders) || other.approvedTenders == approvedTenders)&&(identical(other.tenderValue, tenderValue) || other.tenderValue == tenderValue)&&(identical(other.thunderStatus, thunderStatus) || other.thunderStatus == thunderStatus)&&const DeepCollectionEquality().equals(other.yourTenders, yourTenders));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,partnership,selfApply,contracting,tenderSubmitted,approvedTenders,tenderValue,thunderStatus,const DeepCollectionEquality().hash(yourTenders));
@override
String toString() {
return 'HomeResponseModel(partnership: $partnership, selfApply: $selfApply, contracting: $contracting, tenderSubmitted: $tenderSubmitted, approvedTenders: $approvedTenders, tenderValue: $tenderValue, thunderStatus: $thunderStatus, yourTenders: $yourTenders)';
}
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$HomeResponseModelCopyWith<HomeResponseModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomeResponseModelCopyWith<$Res> {
factory $HomeResponseModelCopyWith(
HomeResponseModel value,
$Res Function(HomeResponseModel) then,
) = _$HomeResponseModelCopyWithImpl<$Res, HomeResponseModel>;
@useResult
$Res call({
String? partnership,
@JsonKey(name: 'self_apply') String? selfApply,
String? contracting,
@JsonKey(name: 'tender_submitted') String? tenderSubmitted,
@JsonKey(name: 'approved_tenders') String? approvedTenders,
@JsonKey(name: 'tender_value') String? tenderValue,
@JsonKey(name: 'thunder_status') String? thunderStatus,
@JsonKey(name: 'your_tenders') List<TenderModel>? yourTenders,
});
}
abstract mixin class $HomeResponseModelCopyWith<$Res> {
factory $HomeResponseModelCopyWith(HomeResponseModel value, $Res Function(HomeResponseModel) _then) = _$HomeResponseModelCopyWithImpl;
@useResult
$Res call({
String? partnership, String? selfApply, String? contracting,@JsonKey(name: 'tender_submitted') String? tenderSubmitted,@JsonKey(name: 'approved_tenders') String? approvedTenders,@JsonKey(name: 'tender_value') String? tenderValue,@JsonKey(name: 'thunder_status') String? thunderStatus,@JsonKey(name: 'your_tenders') List<TenderModel>? yourTenders
});
}
/// @nodoc
class _$HomeResponseModelCopyWithImpl<$Res, $Val extends HomeResponseModel>
class _$HomeResponseModelCopyWithImpl<$Res>
implements $HomeResponseModelCopyWith<$Res> {
_$HomeResponseModelCopyWithImpl(this._value, this._then);
_$HomeResponseModelCopyWithImpl(this._self, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
final HomeResponseModel _self;
final $Res Function(HomeResponseModel) _then;
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? partnership = freezed,
Object? selfApply = freezed,
Object? contracting = freezed,
Object? tenderSubmitted = freezed,
Object? approvedTenders = freezed,
Object? tenderValue = freezed,
Object? thunderStatus = freezed,
Object? yourTenders = freezed,
}) {
return _then(
_value.copyWith(
partnership:
freezed == partnership
? _value.partnership
: partnership // ignore: cast_nullable_to_non_nullable
as String?,
selfApply:
freezed == selfApply
? _value.selfApply
: selfApply // ignore: cast_nullable_to_non_nullable
as String?,
contracting:
freezed == contracting
? _value.contracting
: contracting // ignore: cast_nullable_to_non_nullable
as String?,
tenderSubmitted:
freezed == tenderSubmitted
? _value.tenderSubmitted
: tenderSubmitted // ignore: cast_nullable_to_non_nullable
as String?,
approvedTenders:
freezed == approvedTenders
? _value.approvedTenders
: approvedTenders // ignore: cast_nullable_to_non_nullable
as String?,
tenderValue:
freezed == tenderValue
? _value.tenderValue
: tenderValue // ignore: cast_nullable_to_non_nullable
as String?,
thunderStatus:
freezed == thunderStatus
? _value.thunderStatus
: thunderStatus // ignore: cast_nullable_to_non_nullable
as String?,
yourTenders:
freezed == yourTenders
? _value.yourTenders
: yourTenders // ignore: cast_nullable_to_non_nullable
as List<TenderModel>?,
)
as $Val,
);
}
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? partnership = freezed,Object? selfApply = freezed,Object? contracting = freezed,Object? tenderSubmitted = freezed,Object? approvedTenders = freezed,Object? tenderValue = freezed,Object? thunderStatus = freezed,Object? yourTenders = freezed,}) {
return _then(_self.copyWith(
partnership: freezed == partnership ? _self.partnership : partnership // ignore: cast_nullable_to_non_nullable
as String?,selfApply: freezed == selfApply ? _self.selfApply : selfApply // ignore: cast_nullable_to_non_nullable
as String?,contracting: freezed == contracting ? _self.contracting : contracting // ignore: cast_nullable_to_non_nullable
as String?,tenderSubmitted: freezed == tenderSubmitted ? _self.tenderSubmitted : tenderSubmitted // ignore: cast_nullable_to_non_nullable
as String?,approvedTenders: freezed == approvedTenders ? _self.approvedTenders : approvedTenders // ignore: cast_nullable_to_non_nullable
as String?,tenderValue: freezed == tenderValue ? _self.tenderValue : tenderValue // ignore: cast_nullable_to_non_nullable
as String?,thunderStatus: freezed == thunderStatus ? _self.thunderStatus : thunderStatus // ignore: cast_nullable_to_non_nullable
as String?,yourTenders: freezed == yourTenders ? _self.yourTenders : yourTenders // ignore: cast_nullable_to_non_nullable
as List<TenderModel>?,
));
}
/// @nodoc
abstract class _$$HomeResponseModelImplCopyWith<$Res>
implements $HomeResponseModelCopyWith<$Res> {
factory _$$HomeResponseModelImplCopyWith(
_$HomeResponseModelImpl value,
$Res Function(_$HomeResponseModelImpl) then,
) = __$$HomeResponseModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String? partnership,
@JsonKey(name: 'self_apply') String? selfApply,
String? contracting,
@JsonKey(name: 'tender_submitted') String? tenderSubmitted,
@JsonKey(name: 'approved_tenders') String? approvedTenders,
@JsonKey(name: 'tender_value') String? tenderValue,
@JsonKey(name: 'thunder_status') String? thunderStatus,
@JsonKey(name: 'your_tenders') List<TenderModel>? yourTenders,
});
}
/// @nodoc
class __$$HomeResponseModelImplCopyWithImpl<$Res>
extends _$HomeResponseModelCopyWithImpl<$Res, _$HomeResponseModelImpl>
implements _$$HomeResponseModelImplCopyWith<$Res> {
__$$HomeResponseModelImplCopyWithImpl(
_$HomeResponseModelImpl _value,
$Res Function(_$HomeResponseModelImpl) _then,
) : super(_value, _then);
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? partnership = freezed,
Object? selfApply = freezed,
Object? contracting = freezed,
Object? tenderSubmitted = freezed,
Object? approvedTenders = freezed,
Object? tenderValue = freezed,
Object? thunderStatus = freezed,
Object? yourTenders = freezed,
}) {
return _then(
_$HomeResponseModelImpl(
partnership:
freezed == partnership
? _value.partnership
: partnership // ignore: cast_nullable_to_non_nullable
as String?,
selfApply:
freezed == selfApply
? _value.selfApply
: selfApply // ignore: cast_nullable_to_non_nullable
as String?,
contracting:
freezed == contracting
? _value.contracting
: contracting // ignore: cast_nullable_to_non_nullable
as String?,
tenderSubmitted:
freezed == tenderSubmitted
? _value.tenderSubmitted
: tenderSubmitted // ignore: cast_nullable_to_non_nullable
as String?,
approvedTenders:
freezed == approvedTenders
? _value.approvedTenders
: approvedTenders // ignore: cast_nullable_to_non_nullable
as String?,
tenderValue:
freezed == tenderValue
? _value.tenderValue
: tenderValue // ignore: cast_nullable_to_non_nullable
as String?,
thunderStatus:
freezed == thunderStatus
? _value.thunderStatus
: thunderStatus // ignore: cast_nullable_to_non_nullable
as String?,
yourTenders:
freezed == yourTenders
? _value._yourTenders
: yourTenders // ignore: cast_nullable_to_non_nullable
as List<TenderModel>?,
),
);
}
/// Adds pattern-matching-related methods to [HomeResponseModel].
extension HomeResponseModelPatterns on HomeResponseModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _HomeResponseModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _HomeResponseModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _HomeResponseModel value) $default,){
final _that = this;
switch (_that) {
case _HomeResponseModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _HomeResponseModel value)? $default,){
final _that = this;
switch (_that) {
case _HomeResponseModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? partnership, String? selfApply, String? contracting, @JsonKey(name: 'tender_submitted') String? tenderSubmitted, @JsonKey(name: 'approved_tenders') String? approvedTenders, @JsonKey(name: 'tender_value') String? tenderValue, @JsonKey(name: 'thunder_status') String? thunderStatus, @JsonKey(name: 'your_tenders') List<TenderModel>? yourTenders)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _HomeResponseModel() when $default != null:
return $default(_that.partnership,_that.selfApply,_that.contracting,_that.tenderSubmitted,_that.approvedTenders,_that.tenderValue,_that.thunderStatus,_that.yourTenders);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? partnership, String? selfApply, String? contracting, @JsonKey(name: 'tender_submitted') String? tenderSubmitted, @JsonKey(name: 'approved_tenders') String? approvedTenders, @JsonKey(name: 'tender_value') String? tenderValue, @JsonKey(name: 'thunder_status') String? thunderStatus, @JsonKey(name: 'your_tenders') List<TenderModel>? yourTenders) $default,) {final _that = this;
switch (_that) {
case _HomeResponseModel():
return $default(_that.partnership,_that.selfApply,_that.contracting,_that.tenderSubmitted,_that.approvedTenders,_that.tenderValue,_that.thunderStatus,_that.yourTenders);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? partnership, String? selfApply, String? contracting, @JsonKey(name: 'tender_submitted') String? tenderSubmitted, @JsonKey(name: 'approved_tenders') String? approvedTenders, @JsonKey(name: 'tender_value') String? tenderValue, @JsonKey(name: 'thunder_status') String? thunderStatus, @JsonKey(name: 'your_tenders') List<TenderModel>? yourTenders)? $default,) {final _that = this;
switch (_that) {
case _HomeResponseModel() when $default != null:
return $default(_that.partnership,_that.selfApply,_that.contracting,_that.tenderSubmitted,_that.approvedTenders,_that.tenderValue,_that.thunderStatus,_that.yourTenders);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$HomeResponseModelImpl implements _HomeResponseModel {
const _$HomeResponseModelImpl({
required this.partnership,
@JsonKey(name: 'self_apply') required this.selfApply,
required this.contracting,
@JsonKey(name: 'tender_submitted') required this.tenderSubmitted,
@JsonKey(name: 'approved_tenders') required this.approvedTenders,
@JsonKey(name: 'tender_value') required this.tenderValue,
@JsonKey(name: 'thunder_status') required this.thunderStatus,
@JsonKey(name: 'your_tenders')
required final List<TenderModel>? yourTenders,
}) : _yourTenders = yourTenders;
factory _$HomeResponseModelImpl.fromJson(Map<String, dynamic> json) =>
_$$HomeResponseModelImplFromJson(json);
class _HomeResponseModel implements HomeResponseModel {
const _HomeResponseModel({required this.partnership, required this.selfApply, required this.contracting, @JsonKey(name: 'tender_submitted') required this.tenderSubmitted, @JsonKey(name: 'approved_tenders') required this.approvedTenders, @JsonKey(name: 'tender_value') required this.tenderValue, @JsonKey(name: 'thunder_status') required this.thunderStatus, @JsonKey(name: 'your_tenders') required final List<TenderModel>? yourTenders}): _yourTenders = yourTenders;
factory _HomeResponseModel.fromJson(Map<String, dynamic> json) => _$HomeResponseModelFromJson(json);
@override
final String? partnership;
@override
@JsonKey(name: 'self_apply')
final String? selfApply;
@override
final String? contracting;
@override
@JsonKey(name: 'tender_submitted')
final String? tenderSubmitted;
@override
@JsonKey(name: 'approved_tenders')
final String? approvedTenders;
@override
@JsonKey(name: 'tender_value')
final String? tenderValue;
@override
@JsonKey(name: 'thunder_status')
final String? thunderStatus;
final List<TenderModel>? _yourTenders;
@override
@JsonKey(name: 'your_tenders')
List<TenderModel>? get yourTenders {
final value = _yourTenders;
if (value == null) return null;
if (_yourTenders is EqualUnmodifiableListView) return _yourTenders;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
String toString() {
return 'HomeResponseModel(partnership: $partnership, selfApply: $selfApply, contracting: $contracting, tenderSubmitted: $tenderSubmitted, approvedTenders: $approvedTenders, tenderValue: $tenderValue, thunderStatus: $thunderStatus, yourTenders: $yourTenders)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$HomeResponseModelImpl &&
(identical(other.partnership, partnership) ||
other.partnership == partnership) &&
(identical(other.selfApply, selfApply) ||
other.selfApply == selfApply) &&
(identical(other.contracting, contracting) ||
other.contracting == contracting) &&
(identical(other.tenderSubmitted, tenderSubmitted) ||
other.tenderSubmitted == tenderSubmitted) &&
(identical(other.approvedTenders, approvedTenders) ||
other.approvedTenders == approvedTenders) &&
(identical(other.tenderValue, tenderValue) ||
other.tenderValue == tenderValue) &&
(identical(other.thunderStatus, thunderStatus) ||
other.thunderStatus == thunderStatus) &&
const DeepCollectionEquality().equals(
other._yourTenders,
_yourTenders,
));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
partnership,
selfApply,
contracting,
tenderSubmitted,
approvedTenders,
tenderValue,
thunderStatus,
const DeepCollectionEquality().hash(_yourTenders),
);
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$HomeResponseModelImplCopyWith<_$HomeResponseModelImpl> get copyWith =>
__$$HomeResponseModelImplCopyWithImpl<_$HomeResponseModelImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$HomeResponseModelImplToJson(this);
}
@override final String? partnership;
@override final String? selfApply;
@override final String? contracting;
@override@JsonKey(name: 'tender_submitted') final String? tenderSubmitted;
@override@JsonKey(name: 'approved_tenders') final String? approvedTenders;
@override@JsonKey(name: 'tender_value') final String? tenderValue;
@override@JsonKey(name: 'thunder_status') final String? thunderStatus;
final List<TenderModel>? _yourTenders;
@override@JsonKey(name: 'your_tenders') List<TenderModel>? get yourTenders {
final value = _yourTenders;
if (value == null) return null;
if (_yourTenders is EqualUnmodifiableListView) return _yourTenders;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
abstract class _HomeResponseModel implements HomeResponseModel {
const factory _HomeResponseModel({
required final String? partnership,
@JsonKey(name: 'self_apply') required final String? selfApply,
required final String? contracting,
@JsonKey(name: 'tender_submitted') required final String? tenderSubmitted,
@JsonKey(name: 'approved_tenders') required final String? approvedTenders,
@JsonKey(name: 'tender_value') required final String? tenderValue,
@JsonKey(name: 'thunder_status') required final String? thunderStatus,
@JsonKey(name: 'your_tenders')
required final List<TenderModel>? yourTenders,
}) = _$HomeResponseModelImpl;
factory _HomeResponseModel.fromJson(Map<String, dynamic> json) =
_$HomeResponseModelImpl.fromJson;
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomeResponseModelCopyWith<_HomeResponseModel> get copyWith => __$HomeResponseModelCopyWithImpl<_HomeResponseModel>(this, _$identity);
@override
String? get partnership;
@override
@JsonKey(name: 'self_apply')
String? get selfApply;
@override
String? get contracting;
@override
@JsonKey(name: 'tender_submitted')
String? get tenderSubmitted;
@override
@JsonKey(name: 'approved_tenders')
String? get approvedTenders;
@override
@JsonKey(name: 'tender_value')
String? get tenderValue;
@override
@JsonKey(name: 'thunder_status')
String? get thunderStatus;
@override
@JsonKey(name: 'your_tenders')
List<TenderModel>? get yourTenders;
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$HomeResponseModelImplCopyWith<_$HomeResponseModelImpl> get copyWith =>
throw _privateConstructorUsedError;
@override
Map<String, dynamic> toJson() {
return _$HomeResponseModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HomeResponseModel&&(identical(other.partnership, partnership) || other.partnership == partnership)&&(identical(other.selfApply, selfApply) || other.selfApply == selfApply)&&(identical(other.contracting, contracting) || other.contracting == contracting)&&(identical(other.tenderSubmitted, tenderSubmitted) || other.tenderSubmitted == tenderSubmitted)&&(identical(other.approvedTenders, approvedTenders) || other.approvedTenders == approvedTenders)&&(identical(other.tenderValue, tenderValue) || other.tenderValue == tenderValue)&&(identical(other.thunderStatus, thunderStatus) || other.thunderStatus == thunderStatus)&&const DeepCollectionEquality().equals(other._yourTenders, _yourTenders));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,partnership,selfApply,contracting,tenderSubmitted,approvedTenders,tenderValue,thunderStatus,const DeepCollectionEquality().hash(_yourTenders));
@override
String toString() {
return 'HomeResponseModel(partnership: $partnership, selfApply: $selfApply, contracting: $contracting, tenderSubmitted: $tenderSubmitted, approvedTenders: $approvedTenders, tenderValue: $tenderValue, thunderStatus: $thunderStatus, yourTenders: $yourTenders)';
}
}
/// @nodoc
abstract mixin class _$HomeResponseModelCopyWith<$Res> implements $HomeResponseModelCopyWith<$Res> {
factory _$HomeResponseModelCopyWith(_HomeResponseModel value, $Res Function(_HomeResponseModel) _then) = __$HomeResponseModelCopyWithImpl;
@override @useResult
$Res call({
String? partnership, String? selfApply, String? contracting,@JsonKey(name: 'tender_submitted') String? tenderSubmitted,@JsonKey(name: 'approved_tenders') String? approvedTenders,@JsonKey(name: 'tender_value') String? tenderValue,@JsonKey(name: 'thunder_status') String? thunderStatus,@JsonKey(name: 'your_tenders') List<TenderModel>? yourTenders
});
}
/// @nodoc
class __$HomeResponseModelCopyWithImpl<$Res>
implements _$HomeResponseModelCopyWith<$Res> {
__$HomeResponseModelCopyWithImpl(this._self, this._then);
final _HomeResponseModel _self;
final $Res Function(_HomeResponseModel) _then;
/// Create a copy of HomeResponseModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? partnership = freezed,Object? selfApply = freezed,Object? contracting = freezed,Object? tenderSubmitted = freezed,Object? approvedTenders = freezed,Object? tenderValue = freezed,Object? thunderStatus = freezed,Object? yourTenders = freezed,}) {
return _then(_HomeResponseModel(
partnership: freezed == partnership ? _self.partnership : partnership // ignore: cast_nullable_to_non_nullable
as String?,selfApply: freezed == selfApply ? _self.selfApply : selfApply // ignore: cast_nullable_to_non_nullable
as String?,contracting: freezed == contracting ? _self.contracting : contracting // ignore: cast_nullable_to_non_nullable
as String?,tenderSubmitted: freezed == tenderSubmitted ? _self.tenderSubmitted : tenderSubmitted // ignore: cast_nullable_to_non_nullable
as String?,approvedTenders: freezed == approvedTenders ? _self.approvedTenders : approvedTenders // ignore: cast_nullable_to_non_nullable
as String?,tenderValue: freezed == tenderValue ? _self.tenderValue : tenderValue // ignore: cast_nullable_to_non_nullable
as String?,thunderStatus: freezed == thunderStatus ? _self.thunderStatus : thunderStatus // ignore: cast_nullable_to_non_nullable
as String?,yourTenders: freezed == yourTenders ? _self._yourTenders : yourTenders // ignore: cast_nullable_to_non_nullable
as List<TenderModel>?,
));
}
}
// dart format on
@@ -6,31 +6,29 @@ part of 'home_response_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$HomeResponseModelImpl _$$HomeResponseModelImplFromJson(
Map<String, dynamic> json,
) => _$HomeResponseModelImpl(
partnership: json['partnership'] as String?,
selfApply: json['self_apply'] as String?,
contracting: json['contracting'] as String?,
tenderSubmitted: json['tender_submitted'] as String?,
approvedTenders: json['approved_tenders'] as String?,
tenderValue: json['tender_value'] as String?,
thunderStatus: json['thunder_status'] as String?,
yourTenders:
(json['your_tenders'] as List<dynamic>?)
?.map((e) => TenderModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
_HomeResponseModel _$HomeResponseModelFromJson(Map<String, dynamic> json) =>
_HomeResponseModel(
partnership: json['partnership'] as String?,
selfApply: json['selfApply'] as String?,
contracting: json['contracting'] as String?,
tenderSubmitted: json['tender_submitted'] as String?,
approvedTenders: json['approved_tenders'] as String?,
tenderValue: json['tender_value'] as String?,
thunderStatus: json['thunder_status'] as String?,
yourTenders:
(json['your_tenders'] as List<dynamic>?)
?.map((e) => TenderModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$HomeResponseModelImplToJson(
_$HomeResponseModelImpl instance,
) => <String, dynamic>{
'partnership': instance.partnership,
'self_apply': instance.selfApply,
'contracting': instance.contracting,
'tender_submitted': instance.tenderSubmitted,
'approved_tenders': instance.approvedTenders,
'tender_value': instance.tenderValue,
'thunder_status': instance.thunderStatus,
'your_tenders': instance.yourTenders,
};
Map<String, dynamic> _$HomeResponseModelToJson(_HomeResponseModel instance) =>
<String, dynamic>{
'partnership': instance.partnership,
'selfApply': instance.selfApply,
'contracting': instance.contracting,
'tender_submitted': instance.tenderSubmitted,
'approved_tenders': instance.approvedTenders,
'tender_value': instance.tenderValue,
'thunder_status': instance.thunderStatus,
'your_tenders': instance.yourTenders,
};
@@ -15,6 +15,12 @@ abstract class TenderModel with _$TenderModel {
required String? description,
required String? location,
required String? type,
required String? deadline,
required bool? liked,
required bool? disliked,
required bool? rejected,
required bool? submitted,
@JsonKey(name: 'profile_match') required double? profileMatch,
}) = _TenderModel;
factory TenderModel.fromJson(Map<String, Object?> json) =>
@@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// 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, unnecessary_question_mark
@@ -9,324 +9,305 @@ part of 'tender_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
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 information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
TenderModel _$TenderModelFromJson(Map<String, dynamic> json) {
return _TenderModel.fromJson(json);
}
/// @nodoc
mixin _$TenderModel {
@JsonKey(name: 'created_time')
String? get createdTime => throw _privateConstructorUsedError;
@JsonKey(name: 'tender_id')
String? get tenderId => throw _privateConstructorUsedError;
String? get status => throw _privateConstructorUsedError;
String? get title => throw _privateConstructorUsedError;
String? get description => throw _privateConstructorUsedError;
String? get location => throw _privateConstructorUsedError;
String? get type => throw _privateConstructorUsedError;
@JsonKey(name: 'created_time') String? get createdTime;@JsonKey(name: 'tender_id') String? get tenderId; String? get status; String? get title; String? get description; String? get location; String? get type; String? get deadline; bool? get liked; bool? get disliked; bool? get rejected; bool? get submitted;@JsonKey(name: 'profile_match') double? get profileMatch;
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TenderModelCopyWith<TenderModel> get copyWith => _$TenderModelCopyWithImpl<TenderModel>(this as TenderModel, _$identity);
/// Serializes this TenderModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderModel&&(identical(other.createdTime, createdTime) || other.createdTime == createdTime)&&(identical(other.tenderId, tenderId) || other.tenderId == tenderId)&&(identical(other.status, status) || other.status == status)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.location, location) || other.location == location)&&(identical(other.type, type) || other.type == type)&&(identical(other.deadline, deadline) || other.deadline == deadline)&&(identical(other.liked, liked) || other.liked == liked)&&(identical(other.disliked, disliked) || other.disliked == disliked)&&(identical(other.rejected, rejected) || other.rejected == rejected)&&(identical(other.submitted, submitted) || other.submitted == submitted)&&(identical(other.profileMatch, profileMatch) || other.profileMatch == profileMatch));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,createdTime,tenderId,status,title,description,location,type,deadline,liked,disliked,rejected,submitted,profileMatch);
@override
String toString() {
return 'TenderModel(createdTime: $createdTime, tenderId: $tenderId, status: $status, title: $title, description: $description, location: $location, type: $type, deadline: $deadline, liked: $liked, disliked: $disliked, rejected: $rejected, submitted: $submitted, profileMatch: $profileMatch)';
}
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$TenderModelCopyWith<TenderModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TenderModelCopyWith<$Res> {
factory $TenderModelCopyWith(
TenderModel value,
$Res Function(TenderModel) then,
) = _$TenderModelCopyWithImpl<$Res, TenderModel>;
@useResult
$Res call({
@JsonKey(name: 'created_time') String? createdTime,
@JsonKey(name: 'tender_id') String? tenderId,
String? status,
String? title,
String? description,
String? location,
String? type,
});
}
abstract mixin class $TenderModelCopyWith<$Res> {
factory $TenderModelCopyWith(TenderModel value, $Res Function(TenderModel) _then) = _$TenderModelCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'created_time') String? createdTime,@JsonKey(name: 'tender_id') String? tenderId, String? status, String? title, String? description, String? location, String? type, String? deadline, bool? liked, bool? disliked, bool? rejected, bool? submitted,@JsonKey(name: 'profile_match') double? profileMatch
});
}
/// @nodoc
class _$TenderModelCopyWithImpl<$Res, $Val extends TenderModel>
class _$TenderModelCopyWithImpl<$Res>
implements $TenderModelCopyWith<$Res> {
_$TenderModelCopyWithImpl(this._value, this._then);
_$TenderModelCopyWithImpl(this._self, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
final TenderModel _self;
final $Res Function(TenderModel) _then;
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? createdTime = freezed,
Object? tenderId = freezed,
Object? status = freezed,
Object? title = freezed,
Object? description = freezed,
Object? location = freezed,
Object? type = freezed,
}) {
return _then(
_value.copyWith(
createdTime:
freezed == createdTime
? _value.createdTime
: createdTime // ignore: cast_nullable_to_non_nullable
as String?,
tenderId:
freezed == tenderId
? _value.tenderId
: tenderId // ignore: cast_nullable_to_non_nullable
as String?,
status:
freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
title:
freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
description:
freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
location:
freezed == location
? _value.location
: location // ignore: cast_nullable_to_non_nullable
as String?,
type:
freezed == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? createdTime = freezed,Object? tenderId = freezed,Object? status = freezed,Object? title = freezed,Object? description = freezed,Object? location = freezed,Object? type = freezed,Object? deadline = freezed,Object? liked = freezed,Object? disliked = freezed,Object? rejected = freezed,Object? submitted = freezed,Object? profileMatch = freezed,}) {
return _then(_self.copyWith(
createdTime: freezed == createdTime ? _self.createdTime : createdTime // ignore: cast_nullable_to_non_nullable
as String?,tenderId: freezed == tenderId ? _self.tenderId : tenderId // ignore: cast_nullable_to_non_nullable
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,title: freezed == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
as String?,location: freezed == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,deadline: freezed == deadline ? _self.deadline : deadline // ignore: cast_nullable_to_non_nullable
as String?,liked: freezed == liked ? _self.liked : liked // ignore: cast_nullable_to_non_nullable
as bool?,disliked: freezed == disliked ? _self.disliked : disliked // ignore: cast_nullable_to_non_nullable
as bool?,rejected: freezed == rejected ? _self.rejected : rejected // ignore: cast_nullable_to_non_nullable
as bool?,submitted: freezed == submitted ? _self.submitted : submitted // ignore: cast_nullable_to_non_nullable
as bool?,profileMatch: freezed == profileMatch ? _self.profileMatch : profileMatch // ignore: cast_nullable_to_non_nullable
as double?,
));
}
/// @nodoc
abstract class _$$TenderModelImplCopyWith<$Res>
implements $TenderModelCopyWith<$Res> {
factory _$$TenderModelImplCopyWith(
_$TenderModelImpl value,
$Res Function(_$TenderModelImpl) then,
) = __$$TenderModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: 'created_time') String? createdTime,
@JsonKey(name: 'tender_id') String? tenderId,
String? status,
String? title,
String? description,
String? location,
String? type,
});
}
/// @nodoc
class __$$TenderModelImplCopyWithImpl<$Res>
extends _$TenderModelCopyWithImpl<$Res, _$TenderModelImpl>
implements _$$TenderModelImplCopyWith<$Res> {
__$$TenderModelImplCopyWithImpl(
_$TenderModelImpl _value,
$Res Function(_$TenderModelImpl) _then,
) : super(_value, _then);
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? createdTime = freezed,
Object? tenderId = freezed,
Object? status = freezed,
Object? title = freezed,
Object? description = freezed,
Object? location = freezed,
Object? type = freezed,
}) {
return _then(
_$TenderModelImpl(
createdTime:
freezed == createdTime
? _value.createdTime
: createdTime // ignore: cast_nullable_to_non_nullable
as String?,
tenderId:
freezed == tenderId
? _value.tenderId
: tenderId // ignore: cast_nullable_to_non_nullable
as String?,
status:
freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
title:
freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
description:
freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
location:
freezed == location
? _value.location
: location // ignore: cast_nullable_to_non_nullable
as String?,
type:
freezed == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
/// Adds pattern-matching-related methods to [TenderModel].
extension TenderModelPatterns on TenderModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TenderModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _TenderModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TenderModel value) $default,){
final _that = this;
switch (_that) {
case _TenderModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TenderModel value)? $default,){
final _that = this;
switch (_that) {
case _TenderModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'created_time') String? createdTime, @JsonKey(name: 'tender_id') String? tenderId, String? status, String? title, String? description, String? location, String? type, String? deadline, bool? liked, bool? disliked, bool? rejected, bool? submitted, @JsonKey(name: 'profile_match') double? profileMatch)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _TenderModel() when $default != null:
return $default(_that.createdTime,_that.tenderId,_that.status,_that.title,_that.description,_that.location,_that.type,_that.deadline,_that.liked,_that.disliked,_that.rejected,_that.submitted,_that.profileMatch);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'created_time') String? createdTime, @JsonKey(name: 'tender_id') String? tenderId, String? status, String? title, String? description, String? location, String? type, String? deadline, bool? liked, bool? disliked, bool? rejected, bool? submitted, @JsonKey(name: 'profile_match') double? profileMatch) $default,) {final _that = this;
switch (_that) {
case _TenderModel():
return $default(_that.createdTime,_that.tenderId,_that.status,_that.title,_that.description,_that.location,_that.type,_that.deadline,_that.liked,_that.disliked,_that.rejected,_that.submitted,_that.profileMatch);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'created_time') String? createdTime, @JsonKey(name: 'tender_id') String? tenderId, String? status, String? title, String? description, String? location, String? type, String? deadline, bool? liked, bool? disliked, bool? rejected, bool? submitted, @JsonKey(name: 'profile_match') double? profileMatch)? $default,) {final _that = this;
switch (_that) {
case _TenderModel() when $default != null:
return $default(_that.createdTime,_that.tenderId,_that.status,_that.title,_that.description,_that.location,_that.type,_that.deadline,_that.liked,_that.disliked,_that.rejected,_that.submitted,_that.profileMatch);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$TenderModelImpl implements _TenderModel {
const _$TenderModelImpl({
@JsonKey(name: 'created_time') required this.createdTime,
@JsonKey(name: 'tender_id') required this.tenderId,
required this.status,
required this.title,
required this.description,
required this.location,
required this.type,
});
factory _$TenderModelImpl.fromJson(Map<String, dynamic> json) =>
_$$TenderModelImplFromJson(json);
class _TenderModel implements TenderModel {
const _TenderModel({@JsonKey(name: 'created_time') required this.createdTime, @JsonKey(name: 'tender_id') required this.tenderId, required this.status, required this.title, required this.description, required this.location, required this.type, required this.deadline, required this.liked, required this.disliked, required this.rejected, required this.submitted, @JsonKey(name: 'profile_match') required this.profileMatch});
factory _TenderModel.fromJson(Map<String, dynamic> json) => _$TenderModelFromJson(json);
@override
@JsonKey(name: 'created_time')
final String? createdTime;
@override
@JsonKey(name: 'tender_id')
final String? tenderId;
@override
final String? status;
@override
final String? title;
@override
final String? description;
@override
final String? location;
@override
final String? type;
@override@JsonKey(name: 'created_time') final String? createdTime;
@override@JsonKey(name: 'tender_id') final String? tenderId;
@override final String? status;
@override final String? title;
@override final String? description;
@override final String? location;
@override final String? type;
@override final String? deadline;
@override final bool? liked;
@override final bool? disliked;
@override final bool? rejected;
@override final bool? submitted;
@override@JsonKey(name: 'profile_match') final double? profileMatch;
@override
String toString() {
return 'TenderModel(createdTime: $createdTime, tenderId: $tenderId, status: $status, title: $title, description: $description, location: $location, type: $type)';
}
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$TenderModelCopyWith<_TenderModel> get copyWith => __$TenderModelCopyWithImpl<_TenderModel>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$TenderModelImpl &&
(identical(other.createdTime, createdTime) ||
other.createdTime == createdTime) &&
(identical(other.tenderId, tenderId) ||
other.tenderId == tenderId) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.location, location) ||
other.location == location) &&
(identical(other.type, type) || other.type == type));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
createdTime,
tenderId,
status,
title,
description,
location,
type,
);
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$TenderModelImplCopyWith<_$TenderModelImpl> get copyWith =>
__$$TenderModelImplCopyWithImpl<_$TenderModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$TenderModelImplToJson(this);
}
@override
Map<String, dynamic> toJson() {
return _$TenderModelToJson(this, );
}
abstract class _TenderModel implements TenderModel {
const factory _TenderModel({
@JsonKey(name: 'created_time') required final String? createdTime,
@JsonKey(name: 'tender_id') required final String? tenderId,
required final String? status,
required final String? title,
required final String? description,
required final String? location,
required final String? type,
}) = _$TenderModelImpl;
factory _TenderModel.fromJson(Map<String, dynamic> json) =
_$TenderModelImpl.fromJson;
@override
@JsonKey(name: 'created_time')
String? get createdTime;
@override
@JsonKey(name: 'tender_id')
String? get tenderId;
@override
String? get status;
@override
String? get title;
@override
String? get description;
@override
String? get location;
@override
String? get type;
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$TenderModelImplCopyWith<_$TenderModelImpl> get copyWith =>
throw _privateConstructorUsedError;
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderModel&&(identical(other.createdTime, createdTime) || other.createdTime == createdTime)&&(identical(other.tenderId, tenderId) || other.tenderId == tenderId)&&(identical(other.status, status) || other.status == status)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.location, location) || other.location == location)&&(identical(other.type, type) || other.type == type)&&(identical(other.deadline, deadline) || other.deadline == deadline)&&(identical(other.liked, liked) || other.liked == liked)&&(identical(other.disliked, disliked) || other.disliked == disliked)&&(identical(other.rejected, rejected) || other.rejected == rejected)&&(identical(other.submitted, submitted) || other.submitted == submitted)&&(identical(other.profileMatch, profileMatch) || other.profileMatch == profileMatch));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,createdTime,tenderId,status,title,description,location,type,deadline,liked,disliked,rejected,submitted,profileMatch);
@override
String toString() {
return 'TenderModel(createdTime: $createdTime, tenderId: $tenderId, status: $status, title: $title, description: $description, location: $location, type: $type, deadline: $deadline, liked: $liked, disliked: $disliked, rejected: $rejected, submitted: $submitted, profileMatch: $profileMatch)';
}
}
/// @nodoc
abstract mixin class _$TenderModelCopyWith<$Res> implements $TenderModelCopyWith<$Res> {
factory _$TenderModelCopyWith(_TenderModel value, $Res Function(_TenderModel) _then) = __$TenderModelCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'created_time') String? createdTime,@JsonKey(name: 'tender_id') String? tenderId, String? status, String? title, String? description, String? location, String? type, String? deadline, bool? liked, bool? disliked, bool? rejected, bool? submitted,@JsonKey(name: 'profile_match') double? profileMatch
});
}
/// @nodoc
class __$TenderModelCopyWithImpl<$Res>
implements _$TenderModelCopyWith<$Res> {
__$TenderModelCopyWithImpl(this._self, this._then);
final _TenderModel _self;
final $Res Function(_TenderModel) _then;
/// Create a copy of TenderModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? createdTime = freezed,Object? tenderId = freezed,Object? status = freezed,Object? title = freezed,Object? description = freezed,Object? location = freezed,Object? type = freezed,Object? deadline = freezed,Object? liked = freezed,Object? disliked = freezed,Object? rejected = freezed,Object? submitted = freezed,Object? profileMatch = freezed,}) {
return _then(_TenderModel(
createdTime: freezed == createdTime ? _self.createdTime : createdTime // ignore: cast_nullable_to_non_nullable
as String?,tenderId: freezed == tenderId ? _self.tenderId : tenderId // ignore: cast_nullable_to_non_nullable
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,title: freezed == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
as String?,location: freezed == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,deadline: freezed == deadline ? _self.deadline : deadline // ignore: cast_nullable_to_non_nullable
as String?,liked: freezed == liked ? _self.liked : liked // ignore: cast_nullable_to_non_nullable
as bool?,disliked: freezed == disliked ? _self.disliked : disliked // ignore: cast_nullable_to_non_nullable
as bool?,rejected: freezed == rejected ? _self.rejected : rejected // ignore: cast_nullable_to_non_nullable
as bool?,submitted: freezed == submitted ? _self.submitted : submitted // ignore: cast_nullable_to_non_nullable
as bool?,profileMatch: freezed == profileMatch ? _self.profileMatch : profileMatch // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
// dart format on
@@ -6,18 +6,23 @@ part of 'tender_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$TenderModelImpl _$$TenderModelImplFromJson(Map<String, dynamic> json) =>
_$TenderModelImpl(
createdTime: json['created_time'] as String?,
tenderId: json['tender_id'] as String?,
status: json['status'] as String?,
title: json['title'] as String?,
description: json['description'] as String?,
location: json['location'] as String?,
type: json['type'] as String?,
);
_TenderModel _$TenderModelFromJson(Map<String, dynamic> json) => _TenderModel(
createdTime: json['created_time'] as String?,
tenderId: json['tender_id'] as String?,
status: json['status'] as String?,
title: json['title'] as String?,
description: json['description'] as String?,
location: json['location'] as String?,
type: json['type'] as String?,
deadline: json['deadline'] as String?,
liked: json['liked'] as bool?,
disliked: json['disliked'] as bool?,
rejected: json['rejected'] as bool?,
submitted: json['submitted'] as bool?,
profileMatch: (json['profile_match'] as num?)?.toDouble(),
);
Map<String, dynamic> _$$TenderModelImplToJson(_$TenderModelImpl instance) =>
Map<String, dynamic> _$TenderModelToJson(_TenderModel instance) =>
<String, dynamic>{
'created_time': instance.createdTime,
'tender_id': instance.tenderId,
@@ -26,4 +31,10 @@ Map<String, dynamic> _$$TenderModelImplToJson(_$TenderModelImpl instance) =>
'description': instance.description,
'location': instance.location,
'type': instance.type,
'deadline': instance.deadline,
'liked': instance.liked,
'disliked': instance.disliked,
'rejected': instance.rejected,
'submitted': instance.submitted,
'profile_match': instance.profileMatch,
};