Added logic to YourTenders
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'your_tender_model.freezed.dart';
|
||||
part 'your_tender_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class YourTenderModel with _$YourTenderModel {
|
||||
const factory YourTenderModel({
|
||||
required String date,
|
||||
required String title,
|
||||
required String description,
|
||||
required String location,
|
||||
required String countryFlag,
|
||||
required String status,
|
||||
required String projectStatus,
|
||||
}) = _YourTenderModel;
|
||||
|
||||
factory YourTenderModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$YourTenderModelFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,329 @@
|
||||
// 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, unnecessary_question_mark
|
||||
|
||||
part of 'your_tender_model.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 information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
YourTenderModel _$YourTenderModelFromJson(Map<String, dynamic> json) {
|
||||
return _YourTenderModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$YourTenderModel {
|
||||
String get date => throw _privateConstructorUsedError;
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
String get location => throw _privateConstructorUsedError;
|
||||
String get countryFlag => throw _privateConstructorUsedError;
|
||||
String get status => throw _privateConstructorUsedError;
|
||||
String get projectStatus => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this YourTenderModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$YourTenderModelCopyWith<YourTenderModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $YourTenderModelCopyWith<$Res> {
|
||||
factory $YourTenderModelCopyWith(
|
||||
YourTenderModel value,
|
||||
$Res Function(YourTenderModel) then,
|
||||
) = _$YourTenderModelCopyWithImpl<$Res, YourTenderModel>;
|
||||
@useResult
|
||||
$Res call({
|
||||
String date,
|
||||
String title,
|
||||
String description,
|
||||
String location,
|
||||
String countryFlag,
|
||||
String status,
|
||||
String projectStatus,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$YourTenderModelCopyWithImpl<$Res, $Val extends YourTenderModel>
|
||||
implements $YourTenderModelCopyWith<$Res> {
|
||||
_$YourTenderModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? date = null,
|
||||
Object? title = null,
|
||||
Object? description = null,
|
||||
Object? location = null,
|
||||
Object? countryFlag = null,
|
||||
Object? status = null,
|
||||
Object? projectStatus = null,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
date:
|
||||
null == date
|
||||
? _value.date
|
||||
: date // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title:
|
||||
null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
location:
|
||||
null == location
|
||||
? _value.location
|
||||
: location // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
countryFlag:
|
||||
null == countryFlag
|
||||
? _value.countryFlag
|
||||
: countryFlag // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
status:
|
||||
null == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
projectStatus:
|
||||
null == projectStatus
|
||||
? _value.projectStatus
|
||||
: projectStatus // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$YourTenderModelImplCopyWith<$Res>
|
||||
implements $YourTenderModelCopyWith<$Res> {
|
||||
factory _$$YourTenderModelImplCopyWith(
|
||||
_$YourTenderModelImpl value,
|
||||
$Res Function(_$YourTenderModelImpl) then,
|
||||
) = __$$YourTenderModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
String date,
|
||||
String title,
|
||||
String description,
|
||||
String location,
|
||||
String countryFlag,
|
||||
String status,
|
||||
String projectStatus,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$YourTenderModelImplCopyWithImpl<$Res>
|
||||
extends _$YourTenderModelCopyWithImpl<$Res, _$YourTenderModelImpl>
|
||||
implements _$$YourTenderModelImplCopyWith<$Res> {
|
||||
__$$YourTenderModelImplCopyWithImpl(
|
||||
_$YourTenderModelImpl _value,
|
||||
$Res Function(_$YourTenderModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? date = null,
|
||||
Object? title = null,
|
||||
Object? description = null,
|
||||
Object? location = null,
|
||||
Object? countryFlag = null,
|
||||
Object? status = null,
|
||||
Object? projectStatus = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$YourTenderModelImpl(
|
||||
date:
|
||||
null == date
|
||||
? _value.date
|
||||
: date // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title:
|
||||
null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
location:
|
||||
null == location
|
||||
? _value.location
|
||||
: location // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
countryFlag:
|
||||
null == countryFlag
|
||||
? _value.countryFlag
|
||||
: countryFlag // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
status:
|
||||
null == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
projectStatus:
|
||||
null == projectStatus
|
||||
? _value.projectStatus
|
||||
: projectStatus // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$YourTenderModelImpl implements _YourTenderModel {
|
||||
const _$YourTenderModelImpl({
|
||||
required this.date,
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.location,
|
||||
required this.countryFlag,
|
||||
required this.status,
|
||||
required this.projectStatus,
|
||||
});
|
||||
|
||||
factory _$YourTenderModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$YourTenderModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String date;
|
||||
@override
|
||||
final String title;
|
||||
@override
|
||||
final String description;
|
||||
@override
|
||||
final String location;
|
||||
@override
|
||||
final String countryFlag;
|
||||
@override
|
||||
final String status;
|
||||
@override
|
||||
final String projectStatus;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTenderModel(date: $date, title: $title, description: $description, location: $location, countryFlag: $countryFlag, status: $status, projectStatus: $projectStatus)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$YourTenderModelImpl &&
|
||||
(identical(other.date, date) || other.date == date) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.location, location) ||
|
||||
other.location == location) &&
|
||||
(identical(other.countryFlag, countryFlag) ||
|
||||
other.countryFlag == countryFlag) &&
|
||||
(identical(other.status, status) || other.status == status) &&
|
||||
(identical(other.projectStatus, projectStatus) ||
|
||||
other.projectStatus == projectStatus));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
date,
|
||||
title,
|
||||
description,
|
||||
location,
|
||||
countryFlag,
|
||||
status,
|
||||
projectStatus,
|
||||
);
|
||||
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$YourTenderModelImplCopyWith<_$YourTenderModelImpl> get copyWith =>
|
||||
__$$YourTenderModelImplCopyWithImpl<_$YourTenderModelImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$YourTenderModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _YourTenderModel implements YourTenderModel {
|
||||
const factory _YourTenderModel({
|
||||
required final String date,
|
||||
required final String title,
|
||||
required final String description,
|
||||
required final String location,
|
||||
required final String countryFlag,
|
||||
required final String status,
|
||||
required final String projectStatus,
|
||||
}) = _$YourTenderModelImpl;
|
||||
|
||||
factory _YourTenderModel.fromJson(Map<String, dynamic> json) =
|
||||
_$YourTenderModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get date;
|
||||
@override
|
||||
String get title;
|
||||
@override
|
||||
String get description;
|
||||
@override
|
||||
String get location;
|
||||
@override
|
||||
String get countryFlag;
|
||||
@override
|
||||
String get status;
|
||||
@override
|
||||
String get projectStatus;
|
||||
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$YourTenderModelImplCopyWith<_$YourTenderModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'your_tender_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$YourTenderModelImpl _$$YourTenderModelImplFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$YourTenderModelImpl(
|
||||
date: json['date'] as String,
|
||||
title: json['title'] as String,
|
||||
description: json['description'] as String,
|
||||
location: json['location'] as String,
|
||||
countryFlag: json['countryFlag'] as String,
|
||||
status: json['status'] as String,
|
||||
projectStatus: json['projectStatus'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$YourTenderModelImplToJson(
|
||||
_$YourTenderModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date,
|
||||
'title': instance.title,
|
||||
'description': instance.description,
|
||||
'location': instance.location,
|
||||
'countryFlag': instance.countryFlag,
|
||||
'status': instance.status,
|
||||
'projectStatus': instance.projectStatus,
|
||||
};
|
||||
Reference in New Issue
Block a user