merged branches
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:provider/single_child_widget.dart';
|
||||
import 'package:tm_app/core/theme/theme_provider.dart';
|
||||
import 'package:tm_app/data/repositories/home_repository.dart';
|
||||
import 'package:tm_app/data/repositories/tender_detail_repository.dart';
|
||||
import 'package:tm_app/data/repositories/tenders_repository.dart';
|
||||
import 'package:tm_app/data/repositories/your_tenders_repository.dart';
|
||||
import 'package:tm_app/data/services/home_service.dart';
|
||||
import 'package:tm_app/data/services/tender_detail_service.dart';
|
||||
@@ -14,6 +15,7 @@ import 'package:tm_app/view_models/your_tenders_view_model.dart';
|
||||
import '../../data/repositories/auth_repository.dart';
|
||||
import '../../data/services/auth_service.dart';
|
||||
import '../../data/services/network_manager.dart';
|
||||
import '../../data/services/tenders_service.dart';
|
||||
import '../../view_models/auth_view_model.dart';
|
||||
import '../../view_models/home_view_model.dart';
|
||||
|
||||
@@ -35,7 +37,11 @@ List<SingleChildWidget> get apiClients {
|
||||
Provider(
|
||||
create: (context) => TenderDetailService(networkManager: context.read()),
|
||||
),
|
||||
|
||||
Provider(create: (context) => YourTendersService()),
|
||||
Provider(
|
||||
create: (context) => TendersService(networkManager: context.read()),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -49,7 +55,12 @@ List<SingleChildWidget> get repositories {
|
||||
TenderDetailRepository(tenderDetailService: context.read()),
|
||||
),
|
||||
Provider(
|
||||
create: (context) => YourTendersRepository(yourTendersService: context.read()),
|
||||
create:
|
||||
(context) =>
|
||||
YourTendersRepository(yourTendersService: context.read()),
|
||||
),
|
||||
Provider(
|
||||
create: (context) => TendersRepository(tendersService: context.read()),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -67,9 +78,17 @@ List<SingleChildWidget> get viewModels {
|
||||
(context) =>
|
||||
TenderDetailViewModel(tenderDetailRepository: context.read()),
|
||||
),
|
||||
ChangeNotifierProvider(create: (context) => TendersViewModel()),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => YourTendersViewModel(yourTendersRepository: context.read()),
|
||||
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => TendersViewModel(tendersRepository: context.read()),
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create:
|
||||
(context) =>
|
||||
YourTendersViewModel(yourTendersRepository: context.read()),
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => TendersViewModel(tendersRepository: context.read()),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tm_app/core/constants/assets.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
@@ -41,29 +42,29 @@ class DesktopShellPage extends StatelessWidget {
|
||||
Spacer(),
|
||||
_bottomNavigationItem(
|
||||
context: context,
|
||||
text: 'Home',
|
||||
text: AppStrings.home,
|
||||
isActive: navigationShell.currentIndex == 0,
|
||||
onTap: () => onTap(0),
|
||||
iconPath: 'assets/icons/home.svg',
|
||||
iconPath: AssetsManager.home,
|
||||
activeIconPath: AssetsManager.homeActive,
|
||||
),
|
||||
SizedBox(width: 24),
|
||||
_bottomNavigationItem(
|
||||
context: context,
|
||||
text: 'Tenders',
|
||||
text: AppStrings.tendersTitle,
|
||||
isActive: navigationShell.currentIndex == 1,
|
||||
onTap: () => onTap(1),
|
||||
iconPath: 'assets/icons/task_square.svg',
|
||||
activeIconPath: 'assets/icons/task-square_active.svg',
|
||||
iconPath: AssetsManager.tenders,
|
||||
activeIconPath: AssetsManager.tendersActive,
|
||||
),
|
||||
SizedBox(width: 24),
|
||||
_bottomNavigationItem(
|
||||
context: context,
|
||||
text: 'Profile',
|
||||
text: AppStrings.profile,
|
||||
isActive: navigationShell.currentIndex == 2,
|
||||
onTap: () => onTap(2),
|
||||
iconPath: 'assets/icons/profile-circle.svg',
|
||||
activeIconPath: 'assets/icons/profile-circle_active.svg',
|
||||
iconPath: AssetsManager.profile,
|
||||
activeIconPath: AssetsManager.profileActive,
|
||||
),
|
||||
Spacer(),
|
||||
SizedBox(width: 59),
|
||||
@@ -96,10 +97,7 @@ class DesktopShellPage extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color:
|
||||
isActive
|
||||
? const Color(0xFF0164FF)
|
||||
: const Color(0xFF777777),
|
||||
color: isActive ? AppColors.primaryColor : AppColors.grey60,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tm_app/core/constants/assets.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
@@ -30,27 +31,27 @@ class MobileShellPage extends StatelessWidget {
|
||||
children: [
|
||||
_bottomNavigationItem(
|
||||
context: context,
|
||||
text: 'Home',
|
||||
text: AppStrings.home,
|
||||
isActive: navigationShell.currentIndex == 0,
|
||||
onTap: () => onTap(0),
|
||||
iconPath: 'assets/icons/home.svg',
|
||||
iconPath: AssetsManager.home,
|
||||
activeIconPath: AssetsManager.homeActive,
|
||||
),
|
||||
_bottomNavigationItem(
|
||||
context: context,
|
||||
text: 'Tenders',
|
||||
text: AppStrings.tendersTitle,
|
||||
isActive: navigationShell.currentIndex == 1,
|
||||
onTap: () => onTap(1),
|
||||
iconPath: 'assets/icons/task_square.svg',
|
||||
activeIconPath: 'assets/icons/task-square_active.svg',
|
||||
iconPath: AssetsManager.tenders,
|
||||
activeIconPath: AssetsManager.tendersActive,
|
||||
),
|
||||
_bottomNavigationItem(
|
||||
context: context,
|
||||
text: 'Profile',
|
||||
text: AppStrings.profile,
|
||||
isActive: navigationShell.currentIndex == 2,
|
||||
onTap: () => onTap(2),
|
||||
iconPath: 'assets/icons/profile-circle.svg',
|
||||
activeIconPath: 'assets/icons/profile-circle_active.svg',
|
||||
iconPath: AssetsManager.profile,
|
||||
activeIconPath: AssetsManager.profileActive,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -83,10 +84,8 @@ class MobileShellPage extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color:
|
||||
isActive
|
||||
? const Color(0xFF0164FF)
|
||||
: const Color(0xFF777777),
|
||||
|
||||
color: isActive ? AppColors.primaryColor : AppColors.grey60,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tm_app/core/constants/assets.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
@@ -60,7 +61,7 @@ class TabletShellPage extends StatelessWidget {
|
||||
SizedBox(height: 48.0.h()),
|
||||
_drawerItem(
|
||||
context: context,
|
||||
text: 'Home',
|
||||
text: AppStrings.home,
|
||||
isActive: navigationShell.currentIndex == 0,
|
||||
onTap: () => onTap(0),
|
||||
iconPath: AssetsManager.home,
|
||||
@@ -68,7 +69,7 @@ class TabletShellPage extends StatelessWidget {
|
||||
),
|
||||
_drawerItem(
|
||||
context: context,
|
||||
text: 'Tenders',
|
||||
text: AppStrings.tendersTitle,
|
||||
isActive: navigationShell.currentIndex == 1,
|
||||
onTap: () => onTap(1),
|
||||
iconPath: AssetsManager.tenders,
|
||||
@@ -76,7 +77,7 @@ class TabletShellPage extends StatelessWidget {
|
||||
),
|
||||
_drawerItem(
|
||||
context: context,
|
||||
text: 'Profile',
|
||||
text: AppStrings.profile,
|
||||
isActive: navigationShell.currentIndex == 2,
|
||||
onTap: () => onTap(2),
|
||||
iconPath: AssetsManager.profile,
|
||||
@@ -112,10 +113,7 @@ class TabletShellPage extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color:
|
||||
isActive
|
||||
? const Color(0xFF0164FF)
|
||||
: const Color(0xFF777777),
|
||||
color: isActive ? AppColors.primaryColor : AppColors.grey60,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
+10
-10
@@ -37,23 +37,23 @@ class AppLogger {
|
||||
Logger get logger => _logger;
|
||||
|
||||
// Convenient logging methods
|
||||
void debug(dynamic message, {dynamic error, StackTrace? stackTrace}) {
|
||||
void debug(message, {error, StackTrace? stackTrace}) {
|
||||
_logger.d(message, error: error, stackTrace: stackTrace);
|
||||
}
|
||||
|
||||
void info(dynamic message, {dynamic error, StackTrace? stackTrace}) {
|
||||
void info(message, {error, StackTrace? stackTrace}) {
|
||||
_logger.i(message, error: error, stackTrace: stackTrace);
|
||||
}
|
||||
|
||||
void warning(dynamic message, {dynamic error, StackTrace? stackTrace}) {
|
||||
void warning(message, {error, StackTrace? stackTrace}) {
|
||||
_logger.w(message, error: error, stackTrace: stackTrace);
|
||||
}
|
||||
|
||||
void error(dynamic message, {dynamic error, StackTrace? stackTrace}) {
|
||||
void error(message, {error, StackTrace? stackTrace}) {
|
||||
_logger.e(message, error: error, stackTrace: stackTrace);
|
||||
}
|
||||
|
||||
void fatal(dynamic message, {dynamic error, StackTrace? stackTrace}) {
|
||||
void fatal(message, {error, StackTrace? stackTrace}) {
|
||||
_logger.f(message, error: error, stackTrace: stackTrace);
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ class AppLogger {
|
||||
required String method,
|
||||
required String url,
|
||||
int? statusCode,
|
||||
dynamic requestBody,
|
||||
dynamic responseBody,
|
||||
dynamic error,
|
||||
requestBody,
|
||||
responseBody,
|
||||
error,
|
||||
}) {
|
||||
final buffer = StringBuffer();
|
||||
buffer.writeln('🌐 Network Request:');
|
||||
@@ -114,7 +114,7 @@ class AppLogger {
|
||||
}
|
||||
|
||||
// Custom log with tag
|
||||
void logWithTag(String tag, dynamic message, {Level? level}) {
|
||||
void logWithTag(String tag, message, {Level? level}) {
|
||||
final taggedMessage = '[$tag] $message';
|
||||
|
||||
switch (level ?? Level.info) {
|
||||
@@ -195,7 +195,7 @@ extension LoggerExtension on Object {
|
||||
appLogger.warning(message ?? toString());
|
||||
}
|
||||
|
||||
void logError([String? message, dynamic error, StackTrace? stackTrace]) {
|
||||
void logError([String? message, error, StackTrace? stackTrace]) {
|
||||
appLogger.error(
|
||||
message ?? toString(),
|
||||
error: error,
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import 'package:tm_app/core/utils/result.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_dislike_response/tender_dislike_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_like_response/tender_like_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_reject_response/tender_reject_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_submit_response/tender_submit_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tenders_request/tenders_request.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tenders_response/tenders_response.dart';
|
||||
import 'package:tm_app/data/services/tenders_service.dart';
|
||||
|
||||
class TendersRepository {
|
||||
TendersRepository({required TendersService tendersService})
|
||||
: _tendersService = tendersService;
|
||||
final TendersService _tendersService;
|
||||
|
||||
Future<Result<TendersResponse>> getTenders({
|
||||
TendersRequest? tendersRequestModel,
|
||||
}) async {
|
||||
return _tendersService.getTenders(tendersRequestModel: tendersRequestModel);
|
||||
}
|
||||
|
||||
Future<Result<TenderLikeResponse>> likeTender() async {
|
||||
return _tendersService.likeTender();
|
||||
}
|
||||
|
||||
Future<Result<TenderDislikeResponse>> dislikeTender() async {
|
||||
return _tendersService.dislikeTender();
|
||||
}
|
||||
|
||||
Future<Result<TenderSubmitResponse>> submitTender() async {
|
||||
return _tendersService.submitTender();
|
||||
}
|
||||
|
||||
Future<Result<TenderRejectResponse>> rejectTender() async {
|
||||
return _tendersService.rejectTender();
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ const String homeMockData = '''
|
||||
"title": "Lorem ipsum dolor sit amet consectetur. Sed mi tortor eu purus senectus.",
|
||||
"description": "Lorem ipsum dolor sit amet consectetur. Sed mi tortor eu purus senectus.Lorem ipsum dolor sit amet consectetur",
|
||||
"location": "Sweden",
|
||||
"type": "Self Control"
|
||||
"type": "Self Apply"
|
||||
},
|
||||
{
|
||||
"created_time": "2025-01-01",
|
||||
@@ -34,7 +34,7 @@ const String homeMockData = '''
|
||||
"title": "Lorem ipsum dolor sit amet consectetur. Sed mi tortor eu purus senectus.",
|
||||
"description": "Lorem ipsum dolor sit amet consectetur. Sed mi tortor eu purus senectus.Lorem ipsum dolor sit amet consectetur",
|
||||
"location": "Sweden",
|
||||
"type": "Self Control"
|
||||
"type": "Self Apply"
|
||||
},
|
||||
{
|
||||
"created_time": "2025-01-01",
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
final String tendersMockData = '''
|
||||
{
|
||||
"tenders": [
|
||||
{
|
||||
"tender_id": "KLF 2025/120",
|
||||
"title": "Tender 1",
|
||||
"description": "Description 1",
|
||||
"created_time": "2021-01-01",
|
||||
"deadline": "2025-06-15",
|
||||
"location": "Sweden",
|
||||
"type": "Self Apply",
|
||||
"profile_match": 0.75,
|
||||
"liked": false,
|
||||
"disliked": false,
|
||||
"rejected": false,
|
||||
"submitted": false
|
||||
},
|
||||
{
|
||||
"tender_id": "KLF 2025/121",
|
||||
"title": "Tender 2",
|
||||
"description": "Description 2",
|
||||
"created_time": "2021-02-01",
|
||||
"deadline": "2025-07-20",
|
||||
"location": "Norway",
|
||||
"type": "Invitation",
|
||||
"profile_match": 0.85,
|
||||
"liked": false,
|
||||
"disliked": false,
|
||||
"rejected": false,
|
||||
"submitted": false
|
||||
},
|
||||
{
|
||||
"tender_id": "KLF 2025/122",
|
||||
"title": "Tender 3",
|
||||
"description": "Description 3",
|
||||
"created_time": "2021-03-01",
|
||||
"deadline": "2025-08-10",
|
||||
"location": "Finland",
|
||||
"type": "Self Apply",
|
||||
"profile_match": 0.65,
|
||||
"liked": false,
|
||||
"disliked": false,
|
||||
"rejected": false,
|
||||
"submitted": false
|
||||
},
|
||||
{
|
||||
"tender_id": "KLF 2025/123",
|
||||
"title": "Tender 4",
|
||||
"description": "Description 4",
|
||||
"created_time": "2021-04-01",
|
||||
"deadline": "2025-09-05",
|
||||
"location": "Denmark",
|
||||
"type": "Invitation",
|
||||
"profile_match": 0.90,
|
||||
"liked": false,
|
||||
"disliked": false,
|
||||
"rejected": false,
|
||||
"submitted": false
|
||||
},
|
||||
{
|
||||
"tender_id": "KLF 2025/124",
|
||||
"title": "Tender 5",
|
||||
"description": "Description 5",
|
||||
"created_time": "2021-05-01",
|
||||
"deadline": "2025-10-12",
|
||||
"location": "Iceland",
|
||||
"type": "Self Apply",
|
||||
"profile_match": 0.70,
|
||||
"liked": false,
|
||||
"disliked": false,
|
||||
"rejected": false,
|
||||
"submitted": false
|
||||
}
|
||||
]
|
||||
}
|
||||
''';
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -6,10 +6,9 @@ part 'tender_detail_request.freezed.dart';
|
||||
part 'tender_detail_request.g.dart';
|
||||
|
||||
@freezed
|
||||
class TenderDetailRequest with _$TenderDetailRequest {
|
||||
const factory TenderDetailRequest({
|
||||
@JsonKey(name: 'id') required String id,
|
||||
}) = _TenderDetailRequest;
|
||||
abstract class TenderDetailRequest with _$TenderDetailRequest {
|
||||
const factory TenderDetailRequest({@JsonKey(name: 'id') required String id}) =
|
||||
_TenderDetailRequest;
|
||||
|
||||
factory TenderDetailRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$TenderDetailRequestFromJson(json);
|
||||
|
||||
+236
-136
@@ -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,169 +9,269 @@ part of 'tender_detail_request.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',
|
||||
);
|
||||
|
||||
TenderDetailRequest _$TenderDetailRequestFromJson(Map<String, dynamic> json) {
|
||||
return _TenderDetailRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TenderDetailRequest {
|
||||
@JsonKey(name: 'id')
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'id') String get id;
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TenderDetailRequestCopyWith<TenderDetailRequest> get copyWith => _$TenderDetailRequestCopyWithImpl<TenderDetailRequest>(this as TenderDetailRequest, _$identity);
|
||||
|
||||
/// Serializes this TenderDetailRequest 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 TenderDetailRequest&&(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDetailRequest(id: $id)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$TenderDetailRequestCopyWith<TenderDetailRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $TenderDetailRequestCopyWith<$Res> {
|
||||
factory $TenderDetailRequestCopyWith(
|
||||
TenderDetailRequest value,
|
||||
$Res Function(TenderDetailRequest) then,
|
||||
) = _$TenderDetailRequestCopyWithImpl<$Res, TenderDetailRequest>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'id') String id});
|
||||
}
|
||||
abstract mixin class $TenderDetailRequestCopyWith<$Res> {
|
||||
factory $TenderDetailRequestCopyWith(TenderDetailRequest value, $Res Function(TenderDetailRequest) _then) = _$TenderDetailRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'id') String id
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TenderDetailRequestCopyWithImpl<$Res, $Val extends TenderDetailRequest>
|
||||
class _$TenderDetailRequestCopyWithImpl<$Res>
|
||||
implements $TenderDetailRequestCopyWith<$Res> {
|
||||
_$TenderDetailRequestCopyWithImpl(this._value, this._then);
|
||||
_$TenderDetailRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final TenderDetailRequest _self;
|
||||
final $Res Function(TenderDetailRequest) _then;
|
||||
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// 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 TenderDetailRequest
|
||||
/// 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 _$$TenderDetailRequestImplCopyWith<$Res>
|
||||
implements $TenderDetailRequestCopyWith<$Res> {
|
||||
factory _$$TenderDetailRequestImplCopyWith(
|
||||
_$TenderDetailRequestImpl value,
|
||||
$Res Function(_$TenderDetailRequestImpl) then,
|
||||
) = __$$TenderDetailRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'id') String id});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$TenderDetailRequestImplCopyWithImpl<$Res>
|
||||
extends _$TenderDetailRequestCopyWithImpl<$Res, _$TenderDetailRequestImpl>
|
||||
implements _$$TenderDetailRequestImplCopyWith<$Res> {
|
||||
__$$TenderDetailRequestImplCopyWithImpl(
|
||||
_$TenderDetailRequestImpl _value,
|
||||
$Res Function(_$TenderDetailRequestImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? id = null}) {
|
||||
return _then(
|
||||
_$TenderDetailRequestImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
/// Adds pattern-matching-related methods to [TenderDetailRequest].
|
||||
extension TenderDetailRequestPatterns on TenderDetailRequest {
|
||||
/// 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( _TenderDetailRequest value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailRequest() 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( _TenderDetailRequest value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailRequest():
|
||||
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( _TenderDetailRequest value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailRequest() 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: 'id') String id)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailRequest() 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(@JsonKey(name: 'id') String id) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailRequest():
|
||||
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(@JsonKey(name: 'id') String id)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailRequest() when $default != null:
|
||||
return $default(_that.id);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$TenderDetailRequestImpl implements _TenderDetailRequest {
|
||||
const _$TenderDetailRequestImpl({@JsonKey(name: 'id') required this.id});
|
||||
|
||||
factory _$TenderDetailRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$TenderDetailRequestImplFromJson(json);
|
||||
class _TenderDetailRequest implements TenderDetailRequest {
|
||||
const _TenderDetailRequest({@JsonKey(name: 'id') required this.id});
|
||||
factory _TenderDetailRequest.fromJson(Map<String, dynamic> json) => _$TenderDetailRequestFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'id')
|
||||
final String id;
|
||||
@override@JsonKey(name: 'id') final String id;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDetailRequest(id: $id)';
|
||||
}
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TenderDetailRequestCopyWith<_TenderDetailRequest> get copyWith => __$TenderDetailRequestCopyWithImpl<_TenderDetailRequest>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$TenderDetailRequestImpl &&
|
||||
(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id);
|
||||
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$TenderDetailRequestImplCopyWith<_$TenderDetailRequestImpl> get copyWith =>
|
||||
__$$TenderDetailRequestImplCopyWithImpl<_$TenderDetailRequestImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$TenderDetailRequestImplToJson(this);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TenderDetailRequestToJson(this, );
|
||||
}
|
||||
|
||||
abstract class _TenderDetailRequest implements TenderDetailRequest {
|
||||
const factory _TenderDetailRequest({
|
||||
@JsonKey(name: 'id') required final String id,
|
||||
}) = _$TenderDetailRequestImpl;
|
||||
|
||||
factory _TenderDetailRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$TenderDetailRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'id')
|
||||
String get id;
|
||||
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$TenderDetailRequestImplCopyWith<_$TenderDetailRequestImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderDetailRequest&&(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDetailRequest(id: $id)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TenderDetailRequestCopyWith<$Res> implements $TenderDetailRequestCopyWith<$Res> {
|
||||
factory _$TenderDetailRequestCopyWith(_TenderDetailRequest value, $Res Function(_TenderDetailRequest) _then) = __$TenderDetailRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'id') String id
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TenderDetailRequestCopyWithImpl<$Res>
|
||||
implements _$TenderDetailRequestCopyWith<$Res> {
|
||||
__$TenderDetailRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TenderDetailRequest _self;
|
||||
final $Res Function(_TenderDetailRequest) _then;
|
||||
|
||||
/// Create a copy of TenderDetailRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,}) {
|
||||
return _then(_TenderDetailRequest(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -6,10 +6,9 @@ part of 'tender_detail_request.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$TenderDetailRequestImpl _$$TenderDetailRequestImplFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$TenderDetailRequestImpl(id: json['id'] as String);
|
||||
_TenderDetailRequest _$TenderDetailRequestFromJson(Map<String, dynamic> json) =>
|
||||
_TenderDetailRequest(id: json['id'] as String);
|
||||
|
||||
Map<String, dynamic> _$$TenderDetailRequestImplToJson(
|
||||
_$TenderDetailRequestImpl instance,
|
||||
Map<String, dynamic> _$TenderDetailRequestToJson(
|
||||
_TenderDetailRequest instance,
|
||||
) => <String, dynamic>{'id': instance.id};
|
||||
|
||||
@@ -6,7 +6,7 @@ part 'tender_detail_response_model.freezed.dart';
|
||||
part 'tender_detail_response_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class TenderDetailResponseModel with _$TenderDetailResponseModel {
|
||||
abstract class TenderDetailResponseModel with _$TenderDetailResponseModel {
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
const factory TenderDetailResponseModel({
|
||||
required String? date,
|
||||
|
||||
+287
-558
@@ -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,591 +9,320 @@ part of 'tender_detail_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',
|
||||
);
|
||||
|
||||
TenderDetailResponseModel _$TenderDetailResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _TenderDetailResponseModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TenderDetailResponseModel {
|
||||
String? get date => throw _privateConstructorUsedError;
|
||||
String? get status => throw _privateConstructorUsedError;
|
||||
String? get title => throw _privateConstructorUsedError;
|
||||
String? get id => throw _privateConstructorUsedError;
|
||||
String? get approvalDate => throw _privateConstructorUsedError;
|
||||
String? get submissionDate => throw _privateConstructorUsedError;
|
||||
String? get client => throw _privateConstructorUsedError;
|
||||
String? get deliveryLocation => throw _privateConstructorUsedError;
|
||||
String? get referenceNumber => throw _privateConstructorUsedError;
|
||||
String? get country => throw _privateConstructorUsedError;
|
||||
String? get flagAsset => throw _privateConstructorUsedError;
|
||||
String? get locationTitle => throw _privateConstructorUsedError;
|
||||
String? get locationDescription => throw _privateConstructorUsedError;
|
||||
String? get documentName => throw _privateConstructorUsedError;
|
||||
String? get documentUrl => throw _privateConstructorUsedError;
|
||||
double? get profileMatch => throw _privateConstructorUsedError;
|
||||
bool? get incompleteResume => throw _privateConstructorUsedError;
|
||||
String? get incompleteResumeReason => throw _privateConstructorUsedError;
|
||||
|
||||
String? get date; String? get status; String? get title; String? get id; String? get approvalDate; String? get submissionDate; String? get client; String? get deliveryLocation; String? get referenceNumber; String? get country; String? get flagAsset; String? get locationTitle; String? get locationDescription; String? get documentName; String? get documentUrl; double? get profileMatch; bool? get incompleteResume; String? get incompleteResumeReason;
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TenderDetailResponseModelCopyWith<TenderDetailResponseModel> get copyWith => _$TenderDetailResponseModelCopyWithImpl<TenderDetailResponseModel>(this as TenderDetailResponseModel, _$identity);
|
||||
|
||||
/// Serializes this TenderDetailResponseModel 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 TenderDetailResponseModel&&(identical(other.date, date) || other.date == date)&&(identical(other.status, status) || other.status == status)&&(identical(other.title, title) || other.title == title)&&(identical(other.id, id) || other.id == id)&&(identical(other.approvalDate, approvalDate) || other.approvalDate == approvalDate)&&(identical(other.submissionDate, submissionDate) || other.submissionDate == submissionDate)&&(identical(other.client, client) || other.client == client)&&(identical(other.deliveryLocation, deliveryLocation) || other.deliveryLocation == deliveryLocation)&&(identical(other.referenceNumber, referenceNumber) || other.referenceNumber == referenceNumber)&&(identical(other.country, country) || other.country == country)&&(identical(other.flagAsset, flagAsset) || other.flagAsset == flagAsset)&&(identical(other.locationTitle, locationTitle) || other.locationTitle == locationTitle)&&(identical(other.locationDescription, locationDescription) || other.locationDescription == locationDescription)&&(identical(other.documentName, documentName) || other.documentName == documentName)&&(identical(other.documentUrl, documentUrl) || other.documentUrl == documentUrl)&&(identical(other.profileMatch, profileMatch) || other.profileMatch == profileMatch)&&(identical(other.incompleteResume, incompleteResume) || other.incompleteResume == incompleteResume)&&(identical(other.incompleteResumeReason, incompleteResumeReason) || other.incompleteResumeReason == incompleteResumeReason));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,date,status,title,id,approvalDate,submissionDate,client,deliveryLocation,referenceNumber,country,flagAsset,locationTitle,locationDescription,documentName,documentUrl,profileMatch,incompleteResume,incompleteResumeReason);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDetailResponseModel(date: $date, status: $status, title: $title, id: $id, approvalDate: $approvalDate, submissionDate: $submissionDate, client: $client, deliveryLocation: $deliveryLocation, referenceNumber: $referenceNumber, country: $country, flagAsset: $flagAsset, locationTitle: $locationTitle, locationDescription: $locationDescription, documentName: $documentName, documentUrl: $documentUrl, profileMatch: $profileMatch, incompleteResume: $incompleteResume, incompleteResumeReason: $incompleteResumeReason)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$TenderDetailResponseModelCopyWith<TenderDetailResponseModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $TenderDetailResponseModelCopyWith<$Res> {
|
||||
factory $TenderDetailResponseModelCopyWith(
|
||||
TenderDetailResponseModel value,
|
||||
$Res Function(TenderDetailResponseModel) then,
|
||||
) = _$TenderDetailResponseModelCopyWithImpl<$Res, TenderDetailResponseModel>;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? date,
|
||||
String? status,
|
||||
String? title,
|
||||
String? id,
|
||||
String? approvalDate,
|
||||
String? submissionDate,
|
||||
String? client,
|
||||
String? deliveryLocation,
|
||||
String? referenceNumber,
|
||||
String? country,
|
||||
String? flagAsset,
|
||||
String? locationTitle,
|
||||
String? locationDescription,
|
||||
String? documentName,
|
||||
String? documentUrl,
|
||||
double? profileMatch,
|
||||
bool? incompleteResume,
|
||||
String? incompleteResumeReason,
|
||||
});
|
||||
}
|
||||
abstract mixin class $TenderDetailResponseModelCopyWith<$Res> {
|
||||
factory $TenderDetailResponseModelCopyWith(TenderDetailResponseModel value, $Res Function(TenderDetailResponseModel) _then) = _$TenderDetailResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? date, String? status, String? title, String? id, String? approvalDate, String? submissionDate, String? client, String? deliveryLocation, String? referenceNumber, String? country, String? flagAsset, String? locationTitle, String? locationDescription, String? documentName, String? documentUrl, double? profileMatch, bool? incompleteResume, String? incompleteResumeReason
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TenderDetailResponseModelCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends TenderDetailResponseModel
|
||||
>
|
||||
class _$TenderDetailResponseModelCopyWithImpl<$Res>
|
||||
implements $TenderDetailResponseModelCopyWith<$Res> {
|
||||
_$TenderDetailResponseModelCopyWithImpl(this._value, this._then);
|
||||
_$TenderDetailResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final TenderDetailResponseModel _self;
|
||||
final $Res Function(TenderDetailResponseModel) _then;
|
||||
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? date = freezed,
|
||||
Object? status = freezed,
|
||||
Object? title = freezed,
|
||||
Object? id = freezed,
|
||||
Object? approvalDate = freezed,
|
||||
Object? submissionDate = freezed,
|
||||
Object? client = freezed,
|
||||
Object? deliveryLocation = freezed,
|
||||
Object? referenceNumber = freezed,
|
||||
Object? country = freezed,
|
||||
Object? flagAsset = freezed,
|
||||
Object? locationTitle = freezed,
|
||||
Object? locationDescription = freezed,
|
||||
Object? documentName = freezed,
|
||||
Object? documentUrl = freezed,
|
||||
Object? profileMatch = freezed,
|
||||
Object? incompleteResume = freezed,
|
||||
Object? incompleteResumeReason = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
date:
|
||||
freezed == date
|
||||
? _value.date
|
||||
: date // 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?,
|
||||
id:
|
||||
freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
approvalDate:
|
||||
freezed == approvalDate
|
||||
? _value.approvalDate
|
||||
: approvalDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
submissionDate:
|
||||
freezed == submissionDate
|
||||
? _value.submissionDate
|
||||
: submissionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
client:
|
||||
freezed == client
|
||||
? _value.client
|
||||
: client // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
deliveryLocation:
|
||||
freezed == deliveryLocation
|
||||
? _value.deliveryLocation
|
||||
: deliveryLocation // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
referenceNumber:
|
||||
freezed == referenceNumber
|
||||
? _value.referenceNumber
|
||||
: referenceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
country:
|
||||
freezed == country
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
flagAsset:
|
||||
freezed == flagAsset
|
||||
? _value.flagAsset
|
||||
: flagAsset // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
locationTitle:
|
||||
freezed == locationTitle
|
||||
? _value.locationTitle
|
||||
: locationTitle // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
locationDescription:
|
||||
freezed == locationDescription
|
||||
? _value.locationDescription
|
||||
: locationDescription // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
documentName:
|
||||
freezed == documentName
|
||||
? _value.documentName
|
||||
: documentName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
documentUrl:
|
||||
freezed == documentUrl
|
||||
? _value.documentUrl
|
||||
: documentUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
profileMatch:
|
||||
freezed == profileMatch
|
||||
? _value.profileMatch
|
||||
: profileMatch // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
incompleteResume:
|
||||
freezed == incompleteResume
|
||||
? _value.incompleteResume
|
||||
: incompleteResume // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
incompleteResumeReason:
|
||||
freezed == incompleteResumeReason
|
||||
? _value.incompleteResumeReason
|
||||
: incompleteResumeReason // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? date = freezed,Object? status = freezed,Object? title = freezed,Object? id = freezed,Object? approvalDate = freezed,Object? submissionDate = freezed,Object? client = freezed,Object? deliveryLocation = freezed,Object? referenceNumber = freezed,Object? country = freezed,Object? flagAsset = freezed,Object? locationTitle = freezed,Object? locationDescription = freezed,Object? documentName = freezed,Object? documentUrl = freezed,Object? profileMatch = freezed,Object? incompleteResume = freezed,Object? incompleteResumeReason = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
date: freezed == date ? _self.date : date // 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?,id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String?,approvalDate: freezed == approvalDate ? _self.approvalDate : approvalDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,submissionDate: freezed == submissionDate ? _self.submissionDate : submissionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,client: freezed == client ? _self.client : client // ignore: cast_nullable_to_non_nullable
|
||||
as String?,deliveryLocation: freezed == deliveryLocation ? _self.deliveryLocation : deliveryLocation // ignore: cast_nullable_to_non_nullable
|
||||
as String?,referenceNumber: freezed == referenceNumber ? _self.referenceNumber : referenceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,country: freezed == country ? _self.country : country // ignore: cast_nullable_to_non_nullable
|
||||
as String?,flagAsset: freezed == flagAsset ? _self.flagAsset : flagAsset // ignore: cast_nullable_to_non_nullable
|
||||
as String?,locationTitle: freezed == locationTitle ? _self.locationTitle : locationTitle // ignore: cast_nullable_to_non_nullable
|
||||
as String?,locationDescription: freezed == locationDescription ? _self.locationDescription : locationDescription // ignore: cast_nullable_to_non_nullable
|
||||
as String?,documentName: freezed == documentName ? _self.documentName : documentName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,documentUrl: freezed == documentUrl ? _self.documentUrl : documentUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,profileMatch: freezed == profileMatch ? _self.profileMatch : profileMatch // ignore: cast_nullable_to_non_nullable
|
||||
as double?,incompleteResume: freezed == incompleteResume ? _self.incompleteResume : incompleteResume // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,incompleteResumeReason: freezed == incompleteResumeReason ? _self.incompleteResumeReason : incompleteResumeReason // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$TenderDetailResponseModelImplCopyWith<$Res>
|
||||
implements $TenderDetailResponseModelCopyWith<$Res> {
|
||||
factory _$$TenderDetailResponseModelImplCopyWith(
|
||||
_$TenderDetailResponseModelImpl value,
|
||||
$Res Function(_$TenderDetailResponseModelImpl) then,
|
||||
) = __$$TenderDetailResponseModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
String? date,
|
||||
String? status,
|
||||
String? title,
|
||||
String? id,
|
||||
String? approvalDate,
|
||||
String? submissionDate,
|
||||
String? client,
|
||||
String? deliveryLocation,
|
||||
String? referenceNumber,
|
||||
String? country,
|
||||
String? flagAsset,
|
||||
String? locationTitle,
|
||||
String? locationDescription,
|
||||
String? documentName,
|
||||
String? documentUrl,
|
||||
double? profileMatch,
|
||||
bool? incompleteResume,
|
||||
String? incompleteResumeReason,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$TenderDetailResponseModelImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$TenderDetailResponseModelCopyWithImpl<
|
||||
$Res,
|
||||
_$TenderDetailResponseModelImpl
|
||||
>
|
||||
implements _$$TenderDetailResponseModelImplCopyWith<$Res> {
|
||||
__$$TenderDetailResponseModelImplCopyWithImpl(
|
||||
_$TenderDetailResponseModelImpl _value,
|
||||
$Res Function(_$TenderDetailResponseModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? date = freezed,
|
||||
Object? status = freezed,
|
||||
Object? title = freezed,
|
||||
Object? id = freezed,
|
||||
Object? approvalDate = freezed,
|
||||
Object? submissionDate = freezed,
|
||||
Object? client = freezed,
|
||||
Object? deliveryLocation = freezed,
|
||||
Object? referenceNumber = freezed,
|
||||
Object? country = freezed,
|
||||
Object? flagAsset = freezed,
|
||||
Object? locationTitle = freezed,
|
||||
Object? locationDescription = freezed,
|
||||
Object? documentName = freezed,
|
||||
Object? documentUrl = freezed,
|
||||
Object? profileMatch = freezed,
|
||||
Object? incompleteResume = freezed,
|
||||
Object? incompleteResumeReason = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$TenderDetailResponseModelImpl(
|
||||
date:
|
||||
freezed == date
|
||||
? _value.date
|
||||
: date // 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?,
|
||||
id:
|
||||
freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
approvalDate:
|
||||
freezed == approvalDate
|
||||
? _value.approvalDate
|
||||
: approvalDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
submissionDate:
|
||||
freezed == submissionDate
|
||||
? _value.submissionDate
|
||||
: submissionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
client:
|
||||
freezed == client
|
||||
? _value.client
|
||||
: client // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
deliveryLocation:
|
||||
freezed == deliveryLocation
|
||||
? _value.deliveryLocation
|
||||
: deliveryLocation // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
referenceNumber:
|
||||
freezed == referenceNumber
|
||||
? _value.referenceNumber
|
||||
: referenceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
country:
|
||||
freezed == country
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
flagAsset:
|
||||
freezed == flagAsset
|
||||
? _value.flagAsset
|
||||
: flagAsset // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
locationTitle:
|
||||
freezed == locationTitle
|
||||
? _value.locationTitle
|
||||
: locationTitle // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
locationDescription:
|
||||
freezed == locationDescription
|
||||
? _value.locationDescription
|
||||
: locationDescription // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
documentName:
|
||||
freezed == documentName
|
||||
? _value.documentName
|
||||
: documentName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
documentUrl:
|
||||
freezed == documentUrl
|
||||
? _value.documentUrl
|
||||
: documentUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
profileMatch:
|
||||
freezed == profileMatch
|
||||
? _value.profileMatch
|
||||
: profileMatch // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
incompleteResume:
|
||||
freezed == incompleteResume
|
||||
? _value.incompleteResume
|
||||
: incompleteResume // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
incompleteResumeReason:
|
||||
freezed == incompleteResumeReason
|
||||
? _value.incompleteResumeReason
|
||||
: incompleteResumeReason // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
/// Adds pattern-matching-related methods to [TenderDetailResponseModel].
|
||||
extension TenderDetailResponseModelPatterns on TenderDetailResponseModel {
|
||||
/// 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( _TenderDetailResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailResponseModel() 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( _TenderDetailResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailResponseModel():
|
||||
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( _TenderDetailResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailResponseModel() 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? date, String? status, String? title, String? id, String? approvalDate, String? submissionDate, String? client, String? deliveryLocation, String? referenceNumber, String? country, String? flagAsset, String? locationTitle, String? locationDescription, String? documentName, String? documentUrl, double? profileMatch, bool? incompleteResume, String? incompleteResumeReason)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailResponseModel() when $default != null:
|
||||
return $default(_that.date,_that.status,_that.title,_that.id,_that.approvalDate,_that.submissionDate,_that.client,_that.deliveryLocation,_that.referenceNumber,_that.country,_that.flagAsset,_that.locationTitle,_that.locationDescription,_that.documentName,_that.documentUrl,_that.profileMatch,_that.incompleteResume,_that.incompleteResumeReason);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? date, String? status, String? title, String? id, String? approvalDate, String? submissionDate, String? client, String? deliveryLocation, String? referenceNumber, String? country, String? flagAsset, String? locationTitle, String? locationDescription, String? documentName, String? documentUrl, double? profileMatch, bool? incompleteResume, String? incompleteResumeReason) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailResponseModel():
|
||||
return $default(_that.date,_that.status,_that.title,_that.id,_that.approvalDate,_that.submissionDate,_that.client,_that.deliveryLocation,_that.referenceNumber,_that.country,_that.flagAsset,_that.locationTitle,_that.locationDescription,_that.documentName,_that.documentUrl,_that.profileMatch,_that.incompleteResume,_that.incompleteResumeReason);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? date, String? status, String? title, String? id, String? approvalDate, String? submissionDate, String? client, String? deliveryLocation, String? referenceNumber, String? country, String? flagAsset, String? locationTitle, String? locationDescription, String? documentName, String? documentUrl, double? profileMatch, bool? incompleteResume, String? incompleteResumeReason)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDetailResponseModel() when $default != null:
|
||||
return $default(_that.date,_that.status,_that.title,_that.id,_that.approvalDate,_that.submissionDate,_that.client,_that.deliveryLocation,_that.referenceNumber,_that.country,_that.flagAsset,_that.locationTitle,_that.locationDescription,_that.documentName,_that.documentUrl,_that.profileMatch,_that.incompleteResume,_that.incompleteResumeReason);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class _$TenderDetailResponseModelImpl implements _TenderDetailResponseModel {
|
||||
const _$TenderDetailResponseModelImpl({
|
||||
required this.date,
|
||||
required this.status,
|
||||
required this.title,
|
||||
required this.id,
|
||||
required this.approvalDate,
|
||||
required this.submissionDate,
|
||||
required this.client,
|
||||
required this.deliveryLocation,
|
||||
required this.referenceNumber,
|
||||
required this.country,
|
||||
required this.flagAsset,
|
||||
required this.locationTitle,
|
||||
required this.locationDescription,
|
||||
required this.documentName,
|
||||
required this.documentUrl,
|
||||
required this.profileMatch,
|
||||
required this.incompleteResume,
|
||||
required this.incompleteResumeReason,
|
||||
});
|
||||
class _TenderDetailResponseModel implements TenderDetailResponseModel {
|
||||
const _TenderDetailResponseModel({required this.date, required this.status, required this.title, required this.id, required this.approvalDate, required this.submissionDate, required this.client, required this.deliveryLocation, required this.referenceNumber, required this.country, required this.flagAsset, required this.locationTitle, required this.locationDescription, required this.documentName, required this.documentUrl, required this.profileMatch, required this.incompleteResume, required this.incompleteResumeReason});
|
||||
factory _TenderDetailResponseModel.fromJson(Map<String, dynamic> json) => _$TenderDetailResponseModelFromJson(json);
|
||||
|
||||
factory _$TenderDetailResponseModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$TenderDetailResponseModelImplFromJson(json);
|
||||
@override final String? date;
|
||||
@override final String? status;
|
||||
@override final String? title;
|
||||
@override final String? id;
|
||||
@override final String? approvalDate;
|
||||
@override final String? submissionDate;
|
||||
@override final String? client;
|
||||
@override final String? deliveryLocation;
|
||||
@override final String? referenceNumber;
|
||||
@override final String? country;
|
||||
@override final String? flagAsset;
|
||||
@override final String? locationTitle;
|
||||
@override final String? locationDescription;
|
||||
@override final String? documentName;
|
||||
@override final String? documentUrl;
|
||||
@override final double? profileMatch;
|
||||
@override final bool? incompleteResume;
|
||||
@override final String? incompleteResumeReason;
|
||||
|
||||
@override
|
||||
final String? date;
|
||||
@override
|
||||
final String? status;
|
||||
@override
|
||||
final String? title;
|
||||
@override
|
||||
final String? id;
|
||||
@override
|
||||
final String? approvalDate;
|
||||
@override
|
||||
final String? submissionDate;
|
||||
@override
|
||||
final String? client;
|
||||
@override
|
||||
final String? deliveryLocation;
|
||||
@override
|
||||
final String? referenceNumber;
|
||||
@override
|
||||
final String? country;
|
||||
@override
|
||||
final String? flagAsset;
|
||||
@override
|
||||
final String? locationTitle;
|
||||
@override
|
||||
final String? locationDescription;
|
||||
@override
|
||||
final String? documentName;
|
||||
@override
|
||||
final String? documentUrl;
|
||||
@override
|
||||
final double? profileMatch;
|
||||
@override
|
||||
final bool? incompleteResume;
|
||||
@override
|
||||
final String? incompleteResumeReason;
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TenderDetailResponseModelCopyWith<_TenderDetailResponseModel> get copyWith => __$TenderDetailResponseModelCopyWithImpl<_TenderDetailResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDetailResponseModel(date: $date, status: $status, title: $title, id: $id, approvalDate: $approvalDate, submissionDate: $submissionDate, client: $client, deliveryLocation: $deliveryLocation, referenceNumber: $referenceNumber, country: $country, flagAsset: $flagAsset, locationTitle: $locationTitle, locationDescription: $locationDescription, documentName: $documentName, documentUrl: $documentUrl, profileMatch: $profileMatch, incompleteResume: $incompleteResume, incompleteResumeReason: $incompleteResumeReason)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$TenderDetailResponseModelImpl &&
|
||||
(identical(other.date, date) || other.date == date) &&
|
||||
(identical(other.status, status) || other.status == status) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.approvalDate, approvalDate) ||
|
||||
other.approvalDate == approvalDate) &&
|
||||
(identical(other.submissionDate, submissionDate) ||
|
||||
other.submissionDate == submissionDate) &&
|
||||
(identical(other.client, client) || other.client == client) &&
|
||||
(identical(other.deliveryLocation, deliveryLocation) ||
|
||||
other.deliveryLocation == deliveryLocation) &&
|
||||
(identical(other.referenceNumber, referenceNumber) ||
|
||||
other.referenceNumber == referenceNumber) &&
|
||||
(identical(other.country, country) || other.country == country) &&
|
||||
(identical(other.flagAsset, flagAsset) ||
|
||||
other.flagAsset == flagAsset) &&
|
||||
(identical(other.locationTitle, locationTitle) ||
|
||||
other.locationTitle == locationTitle) &&
|
||||
(identical(other.locationDescription, locationDescription) ||
|
||||
other.locationDescription == locationDescription) &&
|
||||
(identical(other.documentName, documentName) ||
|
||||
other.documentName == documentName) &&
|
||||
(identical(other.documentUrl, documentUrl) ||
|
||||
other.documentUrl == documentUrl) &&
|
||||
(identical(other.profileMatch, profileMatch) ||
|
||||
other.profileMatch == profileMatch) &&
|
||||
(identical(other.incompleteResume, incompleteResume) ||
|
||||
other.incompleteResume == incompleteResume) &&
|
||||
(identical(other.incompleteResumeReason, incompleteResumeReason) ||
|
||||
other.incompleteResumeReason == incompleteResumeReason));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
date,
|
||||
status,
|
||||
title,
|
||||
id,
|
||||
approvalDate,
|
||||
submissionDate,
|
||||
client,
|
||||
deliveryLocation,
|
||||
referenceNumber,
|
||||
country,
|
||||
flagAsset,
|
||||
locationTitle,
|
||||
locationDescription,
|
||||
documentName,
|
||||
documentUrl,
|
||||
profileMatch,
|
||||
incompleteResume,
|
||||
incompleteResumeReason,
|
||||
);
|
||||
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$TenderDetailResponseModelImplCopyWith<_$TenderDetailResponseModelImpl>
|
||||
get copyWith => __$$TenderDetailResponseModelImplCopyWithImpl<
|
||||
_$TenderDetailResponseModelImpl
|
||||
>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$TenderDetailResponseModelImplToJson(this);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TenderDetailResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
abstract class _TenderDetailResponseModel implements TenderDetailResponseModel {
|
||||
const factory _TenderDetailResponseModel({
|
||||
required final String? date,
|
||||
required final String? status,
|
||||
required final String? title,
|
||||
required final String? id,
|
||||
required final String? approvalDate,
|
||||
required final String? submissionDate,
|
||||
required final String? client,
|
||||
required final String? deliveryLocation,
|
||||
required final String? referenceNumber,
|
||||
required final String? country,
|
||||
required final String? flagAsset,
|
||||
required final String? locationTitle,
|
||||
required final String? locationDescription,
|
||||
required final String? documentName,
|
||||
required final String? documentUrl,
|
||||
required final double? profileMatch,
|
||||
required final bool? incompleteResume,
|
||||
required final String? incompleteResumeReason,
|
||||
}) = _$TenderDetailResponseModelImpl;
|
||||
|
||||
factory _TenderDetailResponseModel.fromJson(Map<String, dynamic> json) =
|
||||
_$TenderDetailResponseModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String? get date;
|
||||
@override
|
||||
String? get status;
|
||||
@override
|
||||
String? get title;
|
||||
@override
|
||||
String? get id;
|
||||
@override
|
||||
String? get approvalDate;
|
||||
@override
|
||||
String? get submissionDate;
|
||||
@override
|
||||
String? get client;
|
||||
@override
|
||||
String? get deliveryLocation;
|
||||
@override
|
||||
String? get referenceNumber;
|
||||
@override
|
||||
String? get country;
|
||||
@override
|
||||
String? get flagAsset;
|
||||
@override
|
||||
String? get locationTitle;
|
||||
@override
|
||||
String? get locationDescription;
|
||||
@override
|
||||
String? get documentName;
|
||||
@override
|
||||
String? get documentUrl;
|
||||
@override
|
||||
double? get profileMatch;
|
||||
@override
|
||||
bool? get incompleteResume;
|
||||
@override
|
||||
String? get incompleteResumeReason;
|
||||
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$TenderDetailResponseModelImplCopyWith<_$TenderDetailResponseModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderDetailResponseModel&&(identical(other.date, date) || other.date == date)&&(identical(other.status, status) || other.status == status)&&(identical(other.title, title) || other.title == title)&&(identical(other.id, id) || other.id == id)&&(identical(other.approvalDate, approvalDate) || other.approvalDate == approvalDate)&&(identical(other.submissionDate, submissionDate) || other.submissionDate == submissionDate)&&(identical(other.client, client) || other.client == client)&&(identical(other.deliveryLocation, deliveryLocation) || other.deliveryLocation == deliveryLocation)&&(identical(other.referenceNumber, referenceNumber) || other.referenceNumber == referenceNumber)&&(identical(other.country, country) || other.country == country)&&(identical(other.flagAsset, flagAsset) || other.flagAsset == flagAsset)&&(identical(other.locationTitle, locationTitle) || other.locationTitle == locationTitle)&&(identical(other.locationDescription, locationDescription) || other.locationDescription == locationDescription)&&(identical(other.documentName, documentName) || other.documentName == documentName)&&(identical(other.documentUrl, documentUrl) || other.documentUrl == documentUrl)&&(identical(other.profileMatch, profileMatch) || other.profileMatch == profileMatch)&&(identical(other.incompleteResume, incompleteResume) || other.incompleteResume == incompleteResume)&&(identical(other.incompleteResumeReason, incompleteResumeReason) || other.incompleteResumeReason == incompleteResumeReason));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,date,status,title,id,approvalDate,submissionDate,client,deliveryLocation,referenceNumber,country,flagAsset,locationTitle,locationDescription,documentName,documentUrl,profileMatch,incompleteResume,incompleteResumeReason);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDetailResponseModel(date: $date, status: $status, title: $title, id: $id, approvalDate: $approvalDate, submissionDate: $submissionDate, client: $client, deliveryLocation: $deliveryLocation, referenceNumber: $referenceNumber, country: $country, flagAsset: $flagAsset, locationTitle: $locationTitle, locationDescription: $locationDescription, documentName: $documentName, documentUrl: $documentUrl, profileMatch: $profileMatch, incompleteResume: $incompleteResume, incompleteResumeReason: $incompleteResumeReason)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TenderDetailResponseModelCopyWith<$Res> implements $TenderDetailResponseModelCopyWith<$Res> {
|
||||
factory _$TenderDetailResponseModelCopyWith(_TenderDetailResponseModel value, $Res Function(_TenderDetailResponseModel) _then) = __$TenderDetailResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? date, String? status, String? title, String? id, String? approvalDate, String? submissionDate, String? client, String? deliveryLocation, String? referenceNumber, String? country, String? flagAsset, String? locationTitle, String? locationDescription, String? documentName, String? documentUrl, double? profileMatch, bool? incompleteResume, String? incompleteResumeReason
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TenderDetailResponseModelCopyWithImpl<$Res>
|
||||
implements _$TenderDetailResponseModelCopyWith<$Res> {
|
||||
__$TenderDetailResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TenderDetailResponseModel _self;
|
||||
final $Res Function(_TenderDetailResponseModel) _then;
|
||||
|
||||
/// Create a copy of TenderDetailResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? date = freezed,Object? status = freezed,Object? title = freezed,Object? id = freezed,Object? approvalDate = freezed,Object? submissionDate = freezed,Object? client = freezed,Object? deliveryLocation = freezed,Object? referenceNumber = freezed,Object? country = freezed,Object? flagAsset = freezed,Object? locationTitle = freezed,Object? locationDescription = freezed,Object? documentName = freezed,Object? documentUrl = freezed,Object? profileMatch = freezed,Object? incompleteResume = freezed,Object? incompleteResumeReason = freezed,}) {
|
||||
return _then(_TenderDetailResponseModel(
|
||||
date: freezed == date ? _self.date : date // 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?,id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String?,approvalDate: freezed == approvalDate ? _self.approvalDate : approvalDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,submissionDate: freezed == submissionDate ? _self.submissionDate : submissionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,client: freezed == client ? _self.client : client // ignore: cast_nullable_to_non_nullable
|
||||
as String?,deliveryLocation: freezed == deliveryLocation ? _self.deliveryLocation : deliveryLocation // ignore: cast_nullable_to_non_nullable
|
||||
as String?,referenceNumber: freezed == referenceNumber ? _self.referenceNumber : referenceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,country: freezed == country ? _self.country : country // ignore: cast_nullable_to_non_nullable
|
||||
as String?,flagAsset: freezed == flagAsset ? _self.flagAsset : flagAsset // ignore: cast_nullable_to_non_nullable
|
||||
as String?,locationTitle: freezed == locationTitle ? _self.locationTitle : locationTitle // ignore: cast_nullable_to_non_nullable
|
||||
as String?,locationDescription: freezed == locationDescription ? _self.locationDescription : locationDescription // ignore: cast_nullable_to_non_nullable
|
||||
as String?,documentName: freezed == documentName ? _self.documentName : documentName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,documentUrl: freezed == documentUrl ? _self.documentUrl : documentUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,profileMatch: freezed == profileMatch ? _self.profileMatch : profileMatch // ignore: cast_nullable_to_non_nullable
|
||||
as double?,incompleteResume: freezed == incompleteResume ? _self.incompleteResume : incompleteResume // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,incompleteResumeReason: freezed == incompleteResumeReason ? _self.incompleteResumeReason : incompleteResumeReason // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -6,9 +6,9 @@ part of 'tender_detail_response_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$TenderDetailResponseModelImpl _$$TenderDetailResponseModelImplFromJson(
|
||||
_TenderDetailResponseModel _$TenderDetailResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$TenderDetailResponseModelImpl(
|
||||
) => _TenderDetailResponseModel(
|
||||
date: json['date'] as String?,
|
||||
status: json['status'] as String?,
|
||||
title: json['title'] as String?,
|
||||
@@ -29,8 +29,8 @@ _$TenderDetailResponseModelImpl _$$TenderDetailResponseModelImplFromJson(
|
||||
incompleteResumeReason: json['incompleteResumeReason'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$TenderDetailResponseModelImplToJson(
|
||||
_$TenderDetailResponseModelImpl instance,
|
||||
Map<String, dynamic> _$TenderDetailResponseModelToJson(
|
||||
_TenderDetailResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date,
|
||||
'status': instance.status,
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'tender_dislike_response.freezed.dart';
|
||||
part 'tender_dislike_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class TenderDislikeResponse with _$TenderDislikeResponse {
|
||||
const factory TenderDislikeResponse({required String? message}) =
|
||||
_TenderDislikeResponse;
|
||||
|
||||
factory TenderDislikeResponse.fromJson(Map<String, Object?> json) =>
|
||||
_$TenderDislikeResponseFromJson(json);
|
||||
}
|
||||
+277
@@ -0,0 +1,277 @@
|
||||
// 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
|
||||
|
||||
part of 'tender_dislike_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TenderDislikeResponse {
|
||||
|
||||
String? get message;
|
||||
/// Create a copy of TenderDislikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TenderDislikeResponseCopyWith<TenderDislikeResponse> get copyWith => _$TenderDislikeResponseCopyWithImpl<TenderDislikeResponse>(this as TenderDislikeResponse, _$identity);
|
||||
|
||||
/// Serializes this TenderDislikeResponse to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderDislikeResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDislikeResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $TenderDislikeResponseCopyWith<$Res> {
|
||||
factory $TenderDislikeResponseCopyWith(TenderDislikeResponse value, $Res Function(TenderDislikeResponse) _then) = _$TenderDislikeResponseCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TenderDislikeResponseCopyWithImpl<$Res>
|
||||
implements $TenderDislikeResponseCopyWith<$Res> {
|
||||
_$TenderDislikeResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final TenderDislikeResponse _self;
|
||||
final $Res Function(TenderDislikeResponse) _then;
|
||||
|
||||
/// Create a copy of TenderDislikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? message = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [TenderDislikeResponse].
|
||||
extension TenderDislikeResponsePatterns on TenderDislikeResponse {
|
||||
/// 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( _TenderDislikeResponse value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDislikeResponse() 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( _TenderDislikeResponse value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDislikeResponse():
|
||||
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( _TenderDislikeResponse value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDislikeResponse() 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? message)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDislikeResponse() when $default != null:
|
||||
return $default(_that.message);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? message) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDislikeResponse():
|
||||
return $default(_that.message);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? message)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderDislikeResponse() when $default != null:
|
||||
return $default(_that.message);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _TenderDislikeResponse implements TenderDislikeResponse {
|
||||
const _TenderDislikeResponse({required this.message});
|
||||
factory _TenderDislikeResponse.fromJson(Map<String, dynamic> json) => _$TenderDislikeResponseFromJson(json);
|
||||
|
||||
@override final String? message;
|
||||
|
||||
/// Create a copy of TenderDislikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TenderDislikeResponseCopyWith<_TenderDislikeResponse> get copyWith => __$TenderDislikeResponseCopyWithImpl<_TenderDislikeResponse>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TenderDislikeResponseToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderDislikeResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderDislikeResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TenderDislikeResponseCopyWith<$Res> implements $TenderDislikeResponseCopyWith<$Res> {
|
||||
factory _$TenderDislikeResponseCopyWith(_TenderDislikeResponse value, $Res Function(_TenderDislikeResponse) _then) = __$TenderDislikeResponseCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TenderDislikeResponseCopyWithImpl<$Res>
|
||||
implements _$TenderDislikeResponseCopyWith<$Res> {
|
||||
__$TenderDislikeResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TenderDislikeResponse _self;
|
||||
final $Res Function(_TenderDislikeResponse) _then;
|
||||
|
||||
/// Create a copy of TenderDislikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? message = freezed,}) {
|
||||
return _then(_TenderDislikeResponse(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tender_dislike_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_TenderDislikeResponse _$TenderDislikeResponseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _TenderDislikeResponse(message: json['message'] as String?);
|
||||
|
||||
Map<String, dynamic> _$TenderDislikeResponseToJson(
|
||||
_TenderDislikeResponse instance,
|
||||
) => <String, dynamic>{'message': instance.message};
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'tender_like_response.freezed.dart';
|
||||
part 'tender_like_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class TenderLikeResponse with _$TenderLikeResponse {
|
||||
const factory TenderLikeResponse({required String? message}) =
|
||||
_TenderLikeResponse;
|
||||
|
||||
factory TenderLikeResponse.fromJson(Map<String, Object?> json) =>
|
||||
_$TenderLikeResponseFromJson(json);
|
||||
}
|
||||
+277
@@ -0,0 +1,277 @@
|
||||
// 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
|
||||
|
||||
part of 'tender_like_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TenderLikeResponse {
|
||||
|
||||
String? get message;
|
||||
/// Create a copy of TenderLikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TenderLikeResponseCopyWith<TenderLikeResponse> get copyWith => _$TenderLikeResponseCopyWithImpl<TenderLikeResponse>(this as TenderLikeResponse, _$identity);
|
||||
|
||||
/// Serializes this TenderLikeResponse to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderLikeResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderLikeResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $TenderLikeResponseCopyWith<$Res> {
|
||||
factory $TenderLikeResponseCopyWith(TenderLikeResponse value, $Res Function(TenderLikeResponse) _then) = _$TenderLikeResponseCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TenderLikeResponseCopyWithImpl<$Res>
|
||||
implements $TenderLikeResponseCopyWith<$Res> {
|
||||
_$TenderLikeResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final TenderLikeResponse _self;
|
||||
final $Res Function(TenderLikeResponse) _then;
|
||||
|
||||
/// Create a copy of TenderLikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? message = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [TenderLikeResponse].
|
||||
extension TenderLikeResponsePatterns on TenderLikeResponse {
|
||||
/// 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( _TenderLikeResponse value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderLikeResponse() 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( _TenderLikeResponse value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderLikeResponse():
|
||||
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( _TenderLikeResponse value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderLikeResponse() 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? message)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderLikeResponse() when $default != null:
|
||||
return $default(_that.message);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? message) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderLikeResponse():
|
||||
return $default(_that.message);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? message)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderLikeResponse() when $default != null:
|
||||
return $default(_that.message);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _TenderLikeResponse implements TenderLikeResponse {
|
||||
const _TenderLikeResponse({required this.message});
|
||||
factory _TenderLikeResponse.fromJson(Map<String, dynamic> json) => _$TenderLikeResponseFromJson(json);
|
||||
|
||||
@override final String? message;
|
||||
|
||||
/// Create a copy of TenderLikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TenderLikeResponseCopyWith<_TenderLikeResponse> get copyWith => __$TenderLikeResponseCopyWithImpl<_TenderLikeResponse>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TenderLikeResponseToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderLikeResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderLikeResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TenderLikeResponseCopyWith<$Res> implements $TenderLikeResponseCopyWith<$Res> {
|
||||
factory _$TenderLikeResponseCopyWith(_TenderLikeResponse value, $Res Function(_TenderLikeResponse) _then) = __$TenderLikeResponseCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TenderLikeResponseCopyWithImpl<$Res>
|
||||
implements _$TenderLikeResponseCopyWith<$Res> {
|
||||
__$TenderLikeResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TenderLikeResponse _self;
|
||||
final $Res Function(_TenderLikeResponse) _then;
|
||||
|
||||
/// Create a copy of TenderLikeResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? message = freezed,}) {
|
||||
return _then(_TenderLikeResponse(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,13 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tender_like_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_TenderLikeResponse _$TenderLikeResponseFromJson(Map<String, dynamic> json) =>
|
||||
_TenderLikeResponse(message: json['message'] as String?);
|
||||
|
||||
Map<String, dynamic> _$TenderLikeResponseToJson(_TenderLikeResponse instance) =>
|
||||
<String, dynamic>{'message': instance.message};
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'tender_reject_response.freezed.dart';
|
||||
part 'tender_reject_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class TenderRejectResponse with _$TenderRejectResponse {
|
||||
const factory TenderRejectResponse({required String? message}) =
|
||||
_TenderRejectResponse;
|
||||
|
||||
factory TenderRejectResponse.fromJson(Map<String, Object?> json) =>
|
||||
_$TenderRejectResponseFromJson(json);
|
||||
}
|
||||
+277
@@ -0,0 +1,277 @@
|
||||
// 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
|
||||
|
||||
part of 'tender_reject_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TenderRejectResponse {
|
||||
|
||||
String? get message;
|
||||
/// Create a copy of TenderRejectResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TenderRejectResponseCopyWith<TenderRejectResponse> get copyWith => _$TenderRejectResponseCopyWithImpl<TenderRejectResponse>(this as TenderRejectResponse, _$identity);
|
||||
|
||||
/// Serializes this TenderRejectResponse to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderRejectResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderRejectResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $TenderRejectResponseCopyWith<$Res> {
|
||||
factory $TenderRejectResponseCopyWith(TenderRejectResponse value, $Res Function(TenderRejectResponse) _then) = _$TenderRejectResponseCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TenderRejectResponseCopyWithImpl<$Res>
|
||||
implements $TenderRejectResponseCopyWith<$Res> {
|
||||
_$TenderRejectResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final TenderRejectResponse _self;
|
||||
final $Res Function(TenderRejectResponse) _then;
|
||||
|
||||
/// Create a copy of TenderRejectResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? message = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [TenderRejectResponse].
|
||||
extension TenderRejectResponsePatterns on TenderRejectResponse {
|
||||
/// 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( _TenderRejectResponse value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderRejectResponse() 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( _TenderRejectResponse value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderRejectResponse():
|
||||
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( _TenderRejectResponse value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderRejectResponse() 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? message)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderRejectResponse() when $default != null:
|
||||
return $default(_that.message);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? message) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderRejectResponse():
|
||||
return $default(_that.message);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? message)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderRejectResponse() when $default != null:
|
||||
return $default(_that.message);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _TenderRejectResponse implements TenderRejectResponse {
|
||||
const _TenderRejectResponse({required this.message});
|
||||
factory _TenderRejectResponse.fromJson(Map<String, dynamic> json) => _$TenderRejectResponseFromJson(json);
|
||||
|
||||
@override final String? message;
|
||||
|
||||
/// Create a copy of TenderRejectResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TenderRejectResponseCopyWith<_TenderRejectResponse> get copyWith => __$TenderRejectResponseCopyWithImpl<_TenderRejectResponse>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TenderRejectResponseToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderRejectResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderRejectResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TenderRejectResponseCopyWith<$Res> implements $TenderRejectResponseCopyWith<$Res> {
|
||||
factory _$TenderRejectResponseCopyWith(_TenderRejectResponse value, $Res Function(_TenderRejectResponse) _then) = __$TenderRejectResponseCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TenderRejectResponseCopyWithImpl<$Res>
|
||||
implements _$TenderRejectResponseCopyWith<$Res> {
|
||||
__$TenderRejectResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TenderRejectResponse _self;
|
||||
final $Res Function(_TenderRejectResponse) _then;
|
||||
|
||||
/// Create a copy of TenderRejectResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? message = freezed,}) {
|
||||
return _then(_TenderRejectResponse(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,15 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tender_reject_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_TenderRejectResponse _$TenderRejectResponseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _TenderRejectResponse(message: json['message'] as String?);
|
||||
|
||||
Map<String, dynamic> _$TenderRejectResponseToJson(
|
||||
_TenderRejectResponse instance,
|
||||
) => <String, dynamic>{'message': instance.message};
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'tender_submit_response.freezed.dart';
|
||||
part 'tender_submit_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class TenderSubmitResponse with _$TenderSubmitResponse {
|
||||
const factory TenderSubmitResponse({required String? message}) =
|
||||
_TenderSubmitResponse;
|
||||
|
||||
factory TenderSubmitResponse.fromJson(Map<String, Object?> json) =>
|
||||
_$TenderSubmitResponseFromJson(json);
|
||||
}
|
||||
+277
@@ -0,0 +1,277 @@
|
||||
// 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
|
||||
|
||||
part of 'tender_submit_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TenderSubmitResponse {
|
||||
|
||||
String? get message;
|
||||
/// Create a copy of TenderSubmitResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TenderSubmitResponseCopyWith<TenderSubmitResponse> get copyWith => _$TenderSubmitResponseCopyWithImpl<TenderSubmitResponse>(this as TenderSubmitResponse, _$identity);
|
||||
|
||||
/// Serializes this TenderSubmitResponse to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TenderSubmitResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderSubmitResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $TenderSubmitResponseCopyWith<$Res> {
|
||||
factory $TenderSubmitResponseCopyWith(TenderSubmitResponse value, $Res Function(TenderSubmitResponse) _then) = _$TenderSubmitResponseCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TenderSubmitResponseCopyWithImpl<$Res>
|
||||
implements $TenderSubmitResponseCopyWith<$Res> {
|
||||
_$TenderSubmitResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final TenderSubmitResponse _self;
|
||||
final $Res Function(TenderSubmitResponse) _then;
|
||||
|
||||
/// Create a copy of TenderSubmitResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? message = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [TenderSubmitResponse].
|
||||
extension TenderSubmitResponsePatterns on TenderSubmitResponse {
|
||||
/// 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( _TenderSubmitResponse value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderSubmitResponse() 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( _TenderSubmitResponse value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderSubmitResponse():
|
||||
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( _TenderSubmitResponse value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderSubmitResponse() 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? message)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderSubmitResponse() when $default != null:
|
||||
return $default(_that.message);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? message) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderSubmitResponse():
|
||||
return $default(_that.message);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? message)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TenderSubmitResponse() when $default != null:
|
||||
return $default(_that.message);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _TenderSubmitResponse implements TenderSubmitResponse {
|
||||
const _TenderSubmitResponse({required this.message});
|
||||
factory _TenderSubmitResponse.fromJson(Map<String, dynamic> json) => _$TenderSubmitResponseFromJson(json);
|
||||
|
||||
@override final String? message;
|
||||
|
||||
/// Create a copy of TenderSubmitResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TenderSubmitResponseCopyWith<_TenderSubmitResponse> get copyWith => __$TenderSubmitResponseCopyWithImpl<_TenderSubmitResponse>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TenderSubmitResponseToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TenderSubmitResponse&&(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TenderSubmitResponse(message: $message)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TenderSubmitResponseCopyWith<$Res> implements $TenderSubmitResponseCopyWith<$Res> {
|
||||
factory _$TenderSubmitResponseCopyWith(_TenderSubmitResponse value, $Res Function(_TenderSubmitResponse) _then) = __$TenderSubmitResponseCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? message
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TenderSubmitResponseCopyWithImpl<$Res>
|
||||
implements _$TenderSubmitResponseCopyWith<$Res> {
|
||||
__$TenderSubmitResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TenderSubmitResponse _self;
|
||||
final $Res Function(_TenderSubmitResponse) _then;
|
||||
|
||||
/// Create a copy of TenderSubmitResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? message = freezed,}) {
|
||||
return _then(_TenderSubmitResponse(
|
||||
message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,15 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tender_submit_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_TenderSubmitResponse _$TenderSubmitResponseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _TenderSubmitResponse(message: json['message'] as String?);
|
||||
|
||||
Map<String, dynamic> _$TenderSubmitResponseToJson(
|
||||
_TenderSubmitResponse instance,
|
||||
) => <String, dynamic>{'message': instance.message};
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'tenders_request.freezed.dart';
|
||||
part 'tenders_request.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class TendersRequest with _$TendersRequest {
|
||||
const factory TendersRequest({required String id}) = _TendersRequest;
|
||||
|
||||
factory TendersRequest.fromJson(Map<String, Object?> json) =>
|
||||
_$TendersRequestFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
// 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
|
||||
|
||||
part of 'tenders_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TendersRequest {
|
||||
|
||||
String get id;
|
||||
/// Create a copy of TendersRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TendersRequestCopyWith<TendersRequest> get copyWith => _$TendersRequestCopyWithImpl<TendersRequest>(this as TendersRequest, _$identity);
|
||||
|
||||
/// Serializes this TendersRequest to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TendersRequest&&(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TendersRequest(id: $id)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $TendersRequestCopyWith<$Res> {
|
||||
factory $TendersRequestCopyWith(TendersRequest value, $Res Function(TendersRequest) _then) = _$TendersRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TendersRequestCopyWithImpl<$Res>
|
||||
implements $TendersRequestCopyWith<$Res> {
|
||||
_$TendersRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final TendersRequest _self;
|
||||
final $Res Function(TendersRequest) _then;
|
||||
|
||||
/// Create a copy of TendersRequest
|
||||
/// 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,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [TendersRequest].
|
||||
extension TendersRequestPatterns on TendersRequest {
|
||||
/// 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( _TendersRequest value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersRequest() 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( _TendersRequest value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersRequest():
|
||||
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( _TendersRequest value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersRequest() 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 _TendersRequest() 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 _TendersRequest():
|
||||
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 _TendersRequest() when $default != null:
|
||||
return $default(_that.id);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _TendersRequest implements TendersRequest {
|
||||
const _TendersRequest({required this.id});
|
||||
factory _TendersRequest.fromJson(Map<String, dynamic> json) => _$TendersRequestFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
|
||||
/// Create a copy of TendersRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TendersRequestCopyWith<_TendersRequest> get copyWith => __$TendersRequestCopyWithImpl<_TendersRequest>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TendersRequestToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TendersRequest&&(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TendersRequest(id: $id)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TendersRequestCopyWith<$Res> implements $TendersRequestCopyWith<$Res> {
|
||||
factory _$TendersRequestCopyWith(_TendersRequest value, $Res Function(_TendersRequest) _then) = __$TendersRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TendersRequestCopyWithImpl<$Res>
|
||||
implements _$TendersRequestCopyWith<$Res> {
|
||||
__$TendersRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TendersRequest _self;
|
||||
final $Res Function(_TendersRequest) _then;
|
||||
|
||||
/// Create a copy of TendersRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,}) {
|
||||
return _then(_TendersRequest(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,13 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tenders_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_TendersRequest _$TendersRequestFromJson(Map<String, dynamic> json) =>
|
||||
_TendersRequest(id: json['id'] as String);
|
||||
|
||||
Map<String, dynamic> _$TendersRequestToJson(_TendersRequest instance) =>
|
||||
<String, dynamic>{'id': instance.id};
|
||||
@@ -0,0 +1,16 @@
|
||||
// ignore_for_file: invalid_annotation_target
|
||||
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:tm_app/data/services/model/home/tender/tender_model.dart';
|
||||
|
||||
part 'tenders_response.freezed.dart';
|
||||
part 'tenders_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class TendersResponse with _$TendersResponse {
|
||||
const factory TendersResponse({required List<TenderModel>? tenders}) =
|
||||
_TendersResponse;
|
||||
|
||||
factory TendersResponse.fromJson(Map<String, Object?> json) =>
|
||||
_$TendersResponseFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
// 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
|
||||
|
||||
part of 'tenders_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TendersResponse {
|
||||
|
||||
List<TenderModel>? get tenders;
|
||||
/// Create a copy of TendersResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TendersResponseCopyWith<TendersResponse> get copyWith => _$TendersResponseCopyWithImpl<TendersResponse>(this as TendersResponse, _$identity);
|
||||
|
||||
/// Serializes this TendersResponse to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TendersResponse&&const DeepCollectionEquality().equals(other.tenders, tenders));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(tenders));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TendersResponse(tenders: $tenders)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $TendersResponseCopyWith<$Res> {
|
||||
factory $TendersResponseCopyWith(TendersResponse value, $Res Function(TendersResponse) _then) = _$TendersResponseCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
List<TenderModel>? tenders
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$TendersResponseCopyWithImpl<$Res>
|
||||
implements $TendersResponseCopyWith<$Res> {
|
||||
_$TendersResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final TendersResponse _self;
|
||||
final $Res Function(TendersResponse) _then;
|
||||
|
||||
/// Create a copy of TendersResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? tenders = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
tenders: freezed == tenders ? _self.tenders : tenders // ignore: cast_nullable_to_non_nullable
|
||||
as List<TenderModel>?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [TendersResponse].
|
||||
extension TendersResponsePatterns on TendersResponse {
|
||||
/// 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( _TendersResponse value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersResponse() 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( _TendersResponse value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersResponse():
|
||||
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( _TendersResponse value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersResponse() 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( List<TenderModel>? tenders)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersResponse() when $default != null:
|
||||
return $default(_that.tenders);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( List<TenderModel>? tenders) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersResponse():
|
||||
return $default(_that.tenders);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( List<TenderModel>? tenders)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _TendersResponse() when $default != null:
|
||||
return $default(_that.tenders);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _TendersResponse implements TendersResponse {
|
||||
const _TendersResponse({required final List<TenderModel>? tenders}): _tenders = tenders;
|
||||
factory _TendersResponse.fromJson(Map<String, dynamic> json) => _$TendersResponseFromJson(json);
|
||||
|
||||
final List<TenderModel>? _tenders;
|
||||
@override List<TenderModel>? get tenders {
|
||||
final value = _tenders;
|
||||
if (value == null) return null;
|
||||
if (_tenders is EqualUnmodifiableListView) return _tenders;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of TendersResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TendersResponseCopyWith<_TendersResponse> get copyWith => __$TendersResponseCopyWithImpl<_TendersResponse>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TendersResponseToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TendersResponse&&const DeepCollectionEquality().equals(other._tenders, _tenders));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_tenders));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TendersResponse(tenders: $tenders)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TendersResponseCopyWith<$Res> implements $TendersResponseCopyWith<$Res> {
|
||||
factory _$TendersResponseCopyWith(_TendersResponse value, $Res Function(_TendersResponse) _then) = __$TendersResponseCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
List<TenderModel>? tenders
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$TendersResponseCopyWithImpl<$Res>
|
||||
implements _$TendersResponseCopyWith<$Res> {
|
||||
__$TendersResponseCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TendersResponse _self;
|
||||
final $Res Function(_TendersResponse) _then;
|
||||
|
||||
/// Create a copy of TendersResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? tenders = freezed,}) {
|
||||
return _then(_TendersResponse(
|
||||
tenders: freezed == tenders ? _self._tenders : tenders // ignore: cast_nullable_to_non_nullable
|
||||
as List<TenderModel>?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,18 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tenders_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_TendersResponse _$TendersResponseFromJson(Map<String, dynamic> json) =>
|
||||
_TendersResponse(
|
||||
tenders:
|
||||
(json['tenders'] as List<dynamic>?)
|
||||
?.map((e) => TenderModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TendersResponseToJson(_TendersResponse instance) =>
|
||||
<String, dynamic>{'tenders': instance.tenders};
|
||||
@@ -4,7 +4,7 @@ part 'your_tender_model.freezed.dart';
|
||||
part 'your_tender_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class YourTenderModel with _$YourTenderModel {
|
||||
abstract class YourTenderModel with _$YourTenderModel {
|
||||
const factory YourTenderModel({
|
||||
required String date,
|
||||
required String title,
|
||||
|
||||
@@ -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,321 +9,287 @@ part of 'your_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',
|
||||
);
|
||||
|
||||
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;
|
||||
|
||||
String get date; String get title; String get description; String get location; String get countryFlag; String get status; String get projectStatus;
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$YourTenderModelCopyWith<YourTenderModel> get copyWith => _$YourTenderModelCopyWithImpl<YourTenderModel>(this as YourTenderModel, _$identity);
|
||||
|
||||
/// Serializes this YourTenderModel 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 YourTenderModel&&(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);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTenderModel(date: $date, title: $title, description: $description, location: $location, countryFlag: $countryFlag, status: $status, projectStatus: $projectStatus)';
|
||||
}
|
||||
|
||||
|
||||
/// 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,
|
||||
});
|
||||
}
|
||||
abstract mixin class $YourTenderModelCopyWith<$Res> {
|
||||
factory $YourTenderModelCopyWith(YourTenderModel value, $Res Function(YourTenderModel) _then) = _$YourTenderModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String date, String title, String description, String location, String countryFlag, String status, String projectStatus
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$YourTenderModelCopyWithImpl<$Res, $Val extends YourTenderModel>
|
||||
class _$YourTenderModelCopyWithImpl<$Res>
|
||||
implements $YourTenderModelCopyWith<$Res> {
|
||||
_$YourTenderModelCopyWithImpl(this._value, this._then);
|
||||
_$YourTenderModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final YourTenderModel _self;
|
||||
final $Res Function(YourTenderModel) _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,
|
||||
);
|
||||
}
|
||||
/// 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(_self.copyWith(
|
||||
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,location: null == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||
as String,countryFlag: null == countryFlag ? _self.countryFlag : countryFlag // ignore: cast_nullable_to_non_nullable
|
||||
as String,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as String,projectStatus: null == projectStatus ? _self.projectStatus : projectStatus // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
/// @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,
|
||||
),
|
||||
);
|
||||
}
|
||||
/// Adds pattern-matching-related methods to [YourTenderModel].
|
||||
extension YourTenderModelPatterns on YourTenderModel {
|
||||
/// 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( _YourTenderModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTenderModel() 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( _YourTenderModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTenderModel():
|
||||
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( _YourTenderModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTenderModel() 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 date, String title, String description, String location, String countryFlag, String status, String projectStatus)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTenderModel() when $default != null:
|
||||
return $default(_that.date,_that.title,_that.description,_that.location,_that.countryFlag,_that.status,_that.projectStatus);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 date, String title, String description, String location, String countryFlag, String status, String projectStatus) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTenderModel():
|
||||
return $default(_that.date,_that.title,_that.description,_that.location,_that.countryFlag,_that.status,_that.projectStatus);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 date, String title, String description, String location, String countryFlag, String status, String projectStatus)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTenderModel() when $default != null:
|
||||
return $default(_that.date,_that.title,_that.description,_that.location,_that.countryFlag,_that.status,_that.projectStatus);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @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);
|
||||
class _YourTenderModel implements YourTenderModel {
|
||||
const _YourTenderModel({required this.date, required this.title, required this.description, required this.location, required this.countryFlag, required this.status, required this.projectStatus});
|
||||
factory _YourTenderModel.fromJson(Map<String, dynamic> json) => _$YourTenderModelFromJson(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 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)';
|
||||
}
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$YourTenderModelCopyWith<_YourTenderModel> get copyWith => __$YourTenderModelCopyWithImpl<_YourTenderModel>(this, _$identity);
|
||||
|
||||
@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);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$YourTenderModelToJson(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;
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _YourTenderModel&&(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);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTenderModel(date: $date, title: $title, description: $description, location: $location, countryFlag: $countryFlag, status: $status, projectStatus: $projectStatus)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$YourTenderModelCopyWith<$Res> implements $YourTenderModelCopyWith<$Res> {
|
||||
factory _$YourTenderModelCopyWith(_YourTenderModel value, $Res Function(_YourTenderModel) _then) = __$YourTenderModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String date, String title, String description, String location, String countryFlag, String status, String projectStatus
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$YourTenderModelCopyWithImpl<$Res>
|
||||
implements _$YourTenderModelCopyWith<$Res> {
|
||||
__$YourTenderModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _YourTenderModel _self;
|
||||
final $Res Function(_YourTenderModel) _then;
|
||||
|
||||
/// Create a copy of YourTenderModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $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(_YourTenderModel(
|
||||
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,location: null == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||
as String,countryFlag: null == countryFlag ? _self.countryFlag : countryFlag // ignore: cast_nullable_to_non_nullable
|
||||
as String,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as String,projectStatus: null == projectStatus ? _self.projectStatus : projectStatus // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -6,26 +6,24 @@ 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,
|
||||
);
|
||||
_YourTenderModel _$YourTenderModelFromJson(Map<String, dynamic> json) =>
|
||||
_YourTenderModel(
|
||||
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,
|
||||
};
|
||||
Map<String, dynamic> _$YourTenderModelToJson(_YourTenderModel instance) =>
|
||||
<String, dynamic>{
|
||||
'date': instance.date,
|
||||
'title': instance.title,
|
||||
'description': instance.description,
|
||||
'location': instance.location,
|
||||
'countryFlag': instance.countryFlag,
|
||||
'status': instance.status,
|
||||
'projectStatus': instance.projectStatus,
|
||||
};
|
||||
|
||||
@@ -4,10 +4,9 @@ part 'your_tenders_request_model.freezed.dart';
|
||||
part 'your_tenders_request_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class YourTendersRequestModel with _$YourTendersRequestModel {
|
||||
const factory YourTendersRequestModel({
|
||||
required String id,
|
||||
}) = _YourTendersRequestModel;
|
||||
abstract class YourTendersRequestModel with _$YourTendersRequestModel {
|
||||
const factory YourTendersRequestModel({required String id}) =
|
||||
_YourTendersRequestModel;
|
||||
|
||||
factory YourTendersRequestModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$YourTendersRequestModelFromJson(json);
|
||||
|
||||
+236
-140
@@ -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,173 +9,269 @@ part of 'your_tenders_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',
|
||||
);
|
||||
|
||||
YourTendersRequestModel _$YourTendersRequestModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _YourTendersRequestModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$YourTendersRequestModel {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get id;
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$YourTendersRequestModelCopyWith<YourTendersRequestModel> get copyWith => _$YourTendersRequestModelCopyWithImpl<YourTendersRequestModel>(this as YourTendersRequestModel, _$identity);
|
||||
|
||||
/// Serializes this YourTendersRequestModel 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 YourTendersRequestModel&&(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTendersRequestModel(id: $id)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$YourTendersRequestModelCopyWith<YourTendersRequestModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $YourTendersRequestModelCopyWith<$Res> {
|
||||
factory $YourTendersRequestModelCopyWith(
|
||||
YourTendersRequestModel value,
|
||||
$Res Function(YourTendersRequestModel) then,
|
||||
) = _$YourTendersRequestModelCopyWithImpl<$Res, YourTendersRequestModel>;
|
||||
@useResult
|
||||
$Res call({String id});
|
||||
}
|
||||
abstract mixin class $YourTendersRequestModelCopyWith<$Res> {
|
||||
factory $YourTendersRequestModelCopyWith(YourTendersRequestModel value, $Res Function(YourTendersRequestModel) _then) = _$YourTendersRequestModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$YourTendersRequestModelCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends YourTendersRequestModel
|
||||
>
|
||||
class _$YourTendersRequestModelCopyWithImpl<$Res>
|
||||
implements $YourTendersRequestModelCopyWith<$Res> {
|
||||
_$YourTendersRequestModelCopyWithImpl(this._value, this._then);
|
||||
_$YourTendersRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final YourTendersRequestModel _self;
|
||||
final $Res Function(YourTendersRequestModel) _then;
|
||||
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// 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 YourTendersRequestModel
|
||||
/// 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 _$$YourTendersRequestModelImplCopyWith<$Res>
|
||||
implements $YourTendersRequestModelCopyWith<$Res> {
|
||||
factory _$$YourTendersRequestModelImplCopyWith(
|
||||
_$YourTendersRequestModelImpl value,
|
||||
$Res Function(_$YourTendersRequestModelImpl) then,
|
||||
) = __$$YourTendersRequestModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String id});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$YourTendersRequestModelImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$YourTendersRequestModelCopyWithImpl<
|
||||
$Res,
|
||||
_$YourTendersRequestModelImpl
|
||||
>
|
||||
implements _$$YourTendersRequestModelImplCopyWith<$Res> {
|
||||
__$$YourTendersRequestModelImplCopyWithImpl(
|
||||
_$YourTendersRequestModelImpl _value,
|
||||
$Res Function(_$YourTendersRequestModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? id = null}) {
|
||||
return _then(
|
||||
_$YourTendersRequestModelImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
/// Adds pattern-matching-related methods to [YourTendersRequestModel].
|
||||
extension YourTendersRequestModelPatterns on YourTendersRequestModel {
|
||||
/// 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( _YourTendersRequestModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersRequestModel() 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( _YourTendersRequestModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersRequestModel():
|
||||
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( _YourTendersRequestModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersRequestModel() 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 _YourTendersRequestModel() 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 _YourTendersRequestModel():
|
||||
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 _YourTendersRequestModel() when $default != null:
|
||||
return $default(_that.id);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$YourTendersRequestModelImpl implements _YourTendersRequestModel {
|
||||
const _$YourTendersRequestModelImpl({required this.id});
|
||||
|
||||
factory _$YourTendersRequestModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$YourTendersRequestModelImplFromJson(json);
|
||||
class _YourTendersRequestModel implements YourTendersRequestModel {
|
||||
const _YourTendersRequestModel({required this.id});
|
||||
factory _YourTendersRequestModel.fromJson(Map<String, dynamic> json) => _$YourTendersRequestModelFromJson(json);
|
||||
|
||||
@override
|
||||
final String id;
|
||||
@override final String id;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTendersRequestModel(id: $id)';
|
||||
}
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$YourTendersRequestModelCopyWith<_YourTendersRequestModel> get copyWith => __$YourTendersRequestModelCopyWithImpl<_YourTendersRequestModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$YourTendersRequestModelImpl &&
|
||||
(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id);
|
||||
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$YourTendersRequestModelImplCopyWith<_$YourTendersRequestModelImpl>
|
||||
get copyWith => __$$YourTendersRequestModelImplCopyWithImpl<
|
||||
_$YourTendersRequestModelImpl
|
||||
>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$YourTendersRequestModelImplToJson(this);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$YourTendersRequestModelToJson(this, );
|
||||
}
|
||||
|
||||
abstract class _YourTendersRequestModel implements YourTendersRequestModel {
|
||||
const factory _YourTendersRequestModel({required final String id}) =
|
||||
_$YourTendersRequestModelImpl;
|
||||
|
||||
factory _YourTendersRequestModel.fromJson(Map<String, dynamic> json) =
|
||||
_$YourTendersRequestModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get id;
|
||||
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$YourTendersRequestModelImplCopyWith<_$YourTendersRequestModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _YourTendersRequestModel&&(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTendersRequestModel(id: $id)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$YourTendersRequestModelCopyWith<$Res> implements $YourTendersRequestModelCopyWith<$Res> {
|
||||
factory _$YourTendersRequestModelCopyWith(_YourTendersRequestModel value, $Res Function(_YourTendersRequestModel) _then) = __$YourTendersRequestModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$YourTendersRequestModelCopyWithImpl<$Res>
|
||||
implements _$YourTendersRequestModelCopyWith<$Res> {
|
||||
__$YourTendersRequestModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _YourTendersRequestModel _self;
|
||||
final $Res Function(_YourTendersRequestModel) _then;
|
||||
|
||||
/// Create a copy of YourTendersRequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,}) {
|
||||
return _then(_YourTendersRequestModel(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -6,10 +6,10 @@ part of 'your_tenders_request_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$YourTendersRequestModelImpl _$$YourTendersRequestModelImplFromJson(
|
||||
_YourTendersRequestModel _$YourTendersRequestModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$YourTendersRequestModelImpl(id: json['id'] as String);
|
||||
) => _YourTendersRequestModel(id: json['id'] as String);
|
||||
|
||||
Map<String, dynamic> _$$YourTendersRequestModelImplToJson(
|
||||
_$YourTendersRequestModelImpl instance,
|
||||
Map<String, dynamic> _$YourTendersRequestModelToJson(
|
||||
_YourTendersRequestModel instance,
|
||||
) => <String, dynamic>{'id': instance.id};
|
||||
|
||||
@@ -5,7 +5,7 @@ part 'your_tender_model_response.freezed.dart';
|
||||
part 'your_tender_model_response.g.dart';
|
||||
|
||||
@freezed
|
||||
class YourTendersResponseModel with _$YourTendersResponseModel {
|
||||
abstract class YourTendersResponseModel with _$YourTendersResponseModel {
|
||||
const factory YourTendersResponseModel({
|
||||
required List<YourTenderModel> approvedTenders,
|
||||
required List<YourTenderModel> tendersSubmitted,
|
||||
|
||||
+253
-194
@@ -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,225 +9,284 @@ part of 'your_tender_model_response.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',
|
||||
);
|
||||
|
||||
YourTendersResponseModel _$YourTendersResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _YourTendersResponseModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$YourTendersResponseModel {
|
||||
List<YourTenderModel> get approvedTenders =>
|
||||
throw _privateConstructorUsedError;
|
||||
List<YourTenderModel> get tendersSubmitted =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
List<YourTenderModel> get approvedTenders; List<YourTenderModel> get tendersSubmitted;
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$YourTendersResponseModelCopyWith<YourTendersResponseModel> get copyWith => _$YourTendersResponseModelCopyWithImpl<YourTendersResponseModel>(this as YourTendersResponseModel, _$identity);
|
||||
|
||||
/// Serializes this YourTendersResponseModel 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 YourTendersResponseModel&&const DeepCollectionEquality().equals(other.approvedTenders, approvedTenders)&&const DeepCollectionEquality().equals(other.tendersSubmitted, tendersSubmitted));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(approvedTenders),const DeepCollectionEquality().hash(tendersSubmitted));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTendersResponseModel(approvedTenders: $approvedTenders, tendersSubmitted: $tendersSubmitted)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$YourTendersResponseModelCopyWith<YourTendersResponseModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $YourTendersResponseModelCopyWith<$Res> {
|
||||
factory $YourTendersResponseModelCopyWith(
|
||||
YourTendersResponseModel value,
|
||||
$Res Function(YourTendersResponseModel) then,
|
||||
) = _$YourTendersResponseModelCopyWithImpl<$Res, YourTendersResponseModel>;
|
||||
@useResult
|
||||
$Res call({
|
||||
List<YourTenderModel> approvedTenders,
|
||||
List<YourTenderModel> tendersSubmitted,
|
||||
});
|
||||
}
|
||||
abstract mixin class $YourTendersResponseModelCopyWith<$Res> {
|
||||
factory $YourTendersResponseModelCopyWith(YourTendersResponseModel value, $Res Function(YourTendersResponseModel) _then) = _$YourTendersResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
List<YourTenderModel> approvedTenders, List<YourTenderModel> tendersSubmitted
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$YourTendersResponseModelCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends YourTendersResponseModel
|
||||
>
|
||||
class _$YourTendersResponseModelCopyWithImpl<$Res>
|
||||
implements $YourTendersResponseModelCopyWith<$Res> {
|
||||
_$YourTendersResponseModelCopyWithImpl(this._value, this._then);
|
||||
_$YourTendersResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final YourTendersResponseModel _self;
|
||||
final $Res Function(YourTendersResponseModel) _then;
|
||||
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? approvedTenders = null, Object? tendersSubmitted = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
approvedTenders:
|
||||
null == approvedTenders
|
||||
? _value.approvedTenders
|
||||
: approvedTenders // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,
|
||||
tendersSubmitted:
|
||||
null == tendersSubmitted
|
||||
? _value.tendersSubmitted
|
||||
: tendersSubmitted // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? approvedTenders = null,Object? tendersSubmitted = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
approvedTenders: null == approvedTenders ? _self.approvedTenders : approvedTenders // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,tendersSubmitted: null == tendersSubmitted ? _self.tendersSubmitted : tendersSubmitted // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,
|
||||
));
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$YourTendersResponseModelImplCopyWith<$Res>
|
||||
implements $YourTendersResponseModelCopyWith<$Res> {
|
||||
factory _$$YourTendersResponseModelImplCopyWith(
|
||||
_$YourTendersResponseModelImpl value,
|
||||
$Res Function(_$YourTendersResponseModelImpl) then,
|
||||
) = __$$YourTendersResponseModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
List<YourTenderModel> approvedTenders,
|
||||
List<YourTenderModel> tendersSubmitted,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$YourTendersResponseModelImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$YourTendersResponseModelCopyWithImpl<
|
||||
$Res,
|
||||
_$YourTendersResponseModelImpl
|
||||
>
|
||||
implements _$$YourTendersResponseModelImplCopyWith<$Res> {
|
||||
__$$YourTendersResponseModelImplCopyWithImpl(
|
||||
_$YourTendersResponseModelImpl _value,
|
||||
$Res Function(_$YourTendersResponseModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? approvedTenders = null, Object? tendersSubmitted = null}) {
|
||||
return _then(
|
||||
_$YourTendersResponseModelImpl(
|
||||
approvedTenders:
|
||||
null == approvedTenders
|
||||
? _value._approvedTenders
|
||||
: approvedTenders // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,
|
||||
tendersSubmitted:
|
||||
null == tendersSubmitted
|
||||
? _value._tendersSubmitted
|
||||
: tendersSubmitted // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,
|
||||
),
|
||||
);
|
||||
}
|
||||
/// Adds pattern-matching-related methods to [YourTendersResponseModel].
|
||||
extension YourTendersResponseModelPatterns on YourTendersResponseModel {
|
||||
/// 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( _YourTendersResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersResponseModel() 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( _YourTendersResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersResponseModel():
|
||||
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( _YourTendersResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersResponseModel() 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( List<YourTenderModel> approvedTenders, List<YourTenderModel> tendersSubmitted)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersResponseModel() when $default != null:
|
||||
return $default(_that.approvedTenders,_that.tendersSubmitted);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( List<YourTenderModel> approvedTenders, List<YourTenderModel> tendersSubmitted) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersResponseModel():
|
||||
return $default(_that.approvedTenders,_that.tendersSubmitted);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( List<YourTenderModel> approvedTenders, List<YourTenderModel> tendersSubmitted)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _YourTendersResponseModel() when $default != null:
|
||||
return $default(_that.approvedTenders,_that.tendersSubmitted);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$YourTendersResponseModelImpl implements _YourTendersResponseModel {
|
||||
const _$YourTendersResponseModelImpl({
|
||||
required final List<YourTenderModel> approvedTenders,
|
||||
required final List<YourTenderModel> tendersSubmitted,
|
||||
}) : _approvedTenders = approvedTenders,
|
||||
_tendersSubmitted = tendersSubmitted;
|
||||
|
||||
factory _$YourTendersResponseModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$YourTendersResponseModelImplFromJson(json);
|
||||
class _YourTendersResponseModel implements YourTendersResponseModel {
|
||||
const _YourTendersResponseModel({required final List<YourTenderModel> approvedTenders, required final List<YourTenderModel> tendersSubmitted}): _approvedTenders = approvedTenders,_tendersSubmitted = tendersSubmitted;
|
||||
factory _YourTendersResponseModel.fromJson(Map<String, dynamic> json) => _$YourTendersResponseModelFromJson(json);
|
||||
|
||||
final List<YourTenderModel> _approvedTenders;
|
||||
@override
|
||||
List<YourTenderModel> get approvedTenders {
|
||||
if (_approvedTenders is EqualUnmodifiableListView) return _approvedTenders;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_approvedTenders);
|
||||
}
|
||||
|
||||
final List<YourTenderModel> _tendersSubmitted;
|
||||
@override
|
||||
List<YourTenderModel> get tendersSubmitted {
|
||||
if (_tendersSubmitted is EqualUnmodifiableListView)
|
||||
return _tendersSubmitted;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_tendersSubmitted);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTendersResponseModel(approvedTenders: $approvedTenders, tendersSubmitted: $tendersSubmitted)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$YourTendersResponseModelImpl &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._approvedTenders,
|
||||
_approvedTenders,
|
||||
) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._tendersSubmitted,
|
||||
_tendersSubmitted,
|
||||
));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_approvedTenders),
|
||||
const DeepCollectionEquality().hash(_tendersSubmitted),
|
||||
);
|
||||
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$YourTendersResponseModelImplCopyWith<_$YourTendersResponseModelImpl>
|
||||
get copyWith => __$$YourTendersResponseModelImplCopyWithImpl<
|
||||
_$YourTendersResponseModelImpl
|
||||
>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$YourTendersResponseModelImplToJson(this);
|
||||
}
|
||||
final List<YourTenderModel> _approvedTenders;
|
||||
@override List<YourTenderModel> get approvedTenders {
|
||||
if (_approvedTenders is EqualUnmodifiableListView) return _approvedTenders;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_approvedTenders);
|
||||
}
|
||||
|
||||
abstract class _YourTendersResponseModel implements YourTendersResponseModel {
|
||||
const factory _YourTendersResponseModel({
|
||||
required final List<YourTenderModel> approvedTenders,
|
||||
required final List<YourTenderModel> tendersSubmitted,
|
||||
}) = _$YourTendersResponseModelImpl;
|
||||
|
||||
factory _YourTendersResponseModel.fromJson(Map<String, dynamic> json) =
|
||||
_$YourTendersResponseModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
List<YourTenderModel> get approvedTenders;
|
||||
@override
|
||||
List<YourTenderModel> get tendersSubmitted;
|
||||
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$YourTendersResponseModelImplCopyWith<_$YourTendersResponseModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
final List<YourTenderModel> _tendersSubmitted;
|
||||
@override List<YourTenderModel> get tendersSubmitted {
|
||||
if (_tendersSubmitted is EqualUnmodifiableListView) return _tendersSubmitted;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_tendersSubmitted);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$YourTendersResponseModelCopyWith<_YourTendersResponseModel> get copyWith => __$YourTendersResponseModelCopyWithImpl<_YourTendersResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$YourTendersResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _YourTendersResponseModel&&const DeepCollectionEquality().equals(other._approvedTenders, _approvedTenders)&&const DeepCollectionEquality().equals(other._tendersSubmitted, _tendersSubmitted));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_approvedTenders),const DeepCollectionEquality().hash(_tendersSubmitted));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'YourTendersResponseModel(approvedTenders: $approvedTenders, tendersSubmitted: $tendersSubmitted)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$YourTendersResponseModelCopyWith<$Res> implements $YourTendersResponseModelCopyWith<$Res> {
|
||||
factory _$YourTendersResponseModelCopyWith(_YourTendersResponseModel value, $Res Function(_YourTendersResponseModel) _then) = __$YourTendersResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
List<YourTenderModel> approvedTenders, List<YourTenderModel> tendersSubmitted
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$YourTendersResponseModelCopyWithImpl<$Res>
|
||||
implements _$YourTendersResponseModelCopyWith<$Res> {
|
||||
__$YourTendersResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _YourTendersResponseModel _self;
|
||||
final $Res Function(_YourTendersResponseModel) _then;
|
||||
|
||||
/// Create a copy of YourTendersResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? approvedTenders = null,Object? tendersSubmitted = null,}) {
|
||||
return _then(_YourTendersResponseModel(
|
||||
approvedTenders: null == approvedTenders ? _self._approvedTenders : approvedTenders // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,tendersSubmitted: null == tendersSubmitted ? _self._tendersSubmitted : tendersSubmitted // ignore: cast_nullable_to_non_nullable
|
||||
as List<YourTenderModel>,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
+4
-4
@@ -6,9 +6,9 @@ part of 'your_tender_model_response.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$YourTendersResponseModelImpl _$$YourTendersResponseModelImplFromJson(
|
||||
_YourTendersResponseModel _$YourTendersResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$YourTendersResponseModelImpl(
|
||||
) => _YourTendersResponseModel(
|
||||
approvedTenders:
|
||||
(json['approvedTenders'] as List<dynamic>)
|
||||
.map((e) => YourTenderModel.fromJson(e as Map<String, dynamic>))
|
||||
@@ -19,8 +19,8 @@ _$YourTendersResponseModelImpl _$$YourTendersResponseModelImplFromJson(
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$YourTendersResponseModelImplToJson(
|
||||
_$YourTendersResponseModelImpl instance,
|
||||
Map<String, dynamic> _$YourTendersResponseModelToJson(
|
||||
_YourTendersResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'approvedTenders': instance.approvedTenders,
|
||||
'tendersSubmitted': instance.tendersSubmitted,
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:tm_app/core/utils/logger.dart';
|
||||
import 'package:tm_app/core/utils/result.dart';
|
||||
import 'package:tm_app/data/services/mock_data/tenders_mock_data.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_dislike_response/tender_dislike_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_like_response/tender_like_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_reject_response/tender_reject_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_submit_response/tender_submit_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tenders_request/tenders_request.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tenders_response/tenders_response.dart';
|
||||
import 'package:tm_app/data/services/network_manager.dart';
|
||||
|
||||
class TendersService {
|
||||
TendersService({required NetworkManager networkManager})
|
||||
: _networkManager = networkManager;
|
||||
final NetworkManager _networkManager;
|
||||
|
||||
Future<Result<TendersResponse>> getTenders({
|
||||
TendersRequest? tendersRequestModel,
|
||||
}) async {
|
||||
try {
|
||||
// final result = await _networkManager.makeRequest(
|
||||
// '/api/v1/tenders',
|
||||
// (json) => TendersResponse.fromJson(json),
|
||||
// method: 'GET',
|
||||
// );
|
||||
await Future.delayed(Duration(seconds: 2));
|
||||
appLogger.info('get tenders success');
|
||||
// TODO: will change when api is ready
|
||||
return Result.ok(TendersResponse.fromJson(jsonDecode(tendersMockData)));
|
||||
} on DioException catch (e) {
|
||||
appLogger.error('get tenders failed: $e');
|
||||
return Result.error(e);
|
||||
} on Exception catch (e, stackTrace) {
|
||||
appLogger.error('get tenders failed: $e', stackTrace: stackTrace);
|
||||
return Result.error(Exception(e));
|
||||
}
|
||||
}
|
||||
|
||||
Future<Result<TenderLikeResponse>> likeTender() async {
|
||||
try {
|
||||
// final result = await _networkManager.makeRequest(
|
||||
// '/api/v1/tenders',
|
||||
// (json) => TenderLikeResponse.fromJson(json),
|
||||
// method: 'POST',
|
||||
// );
|
||||
// await Future.delayed(Duration(seconds: 2));
|
||||
appLogger.info('like tender success');
|
||||
// TODO: will change when api is ready
|
||||
return Result.ok(
|
||||
TenderLikeResponse.fromJson({'message': 'Tender liked successfully'}),
|
||||
);
|
||||
} on DioException catch (e) {
|
||||
appLogger.error('like tender failed: $e');
|
||||
return Result.error(e);
|
||||
} on Exception catch (e, stackTrace) {
|
||||
appLogger.error('like tender failed: $e', stackTrace: stackTrace);
|
||||
return Result.error(Exception(e));
|
||||
}
|
||||
}
|
||||
|
||||
Future<Result<TenderDislikeResponse>> dislikeTender() async {
|
||||
try {
|
||||
// final result = await _networkManager.makeRequest(
|
||||
// '/api/v1/tenders',
|
||||
// (json) => TenderDislikeResponse.fromJson(json),
|
||||
// method: 'POST',
|
||||
// );
|
||||
// await Future.delayed(Duration(seconds: 2));
|
||||
appLogger.info('dislike tender success');
|
||||
// TODO: will change when api is ready
|
||||
return Result.ok(
|
||||
TenderDislikeResponse.fromJson({
|
||||
'message': 'Tender disliked successfully',
|
||||
}),
|
||||
);
|
||||
} on DioException catch (e) {
|
||||
appLogger.error('dislike tender failed: $e');
|
||||
return Result.error(e);
|
||||
} on Exception catch (e, stackTrace) {
|
||||
appLogger.error('dislike tender failed: $e', stackTrace: stackTrace);
|
||||
return Result.error(Exception(e));
|
||||
}
|
||||
}
|
||||
|
||||
Future<Result<TenderSubmitResponse>> submitTender() async {
|
||||
try {
|
||||
// final result = await _networkManager.makeRequest(
|
||||
// '/api/v1/tenders',
|
||||
// (json) => TenderSubmitResponse.fromJson(json),
|
||||
// method: 'POST',
|
||||
// );
|
||||
// await Future.delayed(Duration(seconds: 2));
|
||||
appLogger.info('submit tender success');
|
||||
// TODO: will change when api is ready
|
||||
return Result.ok(
|
||||
TenderSubmitResponse.fromJson({
|
||||
'message': 'Tender submitted successfully',
|
||||
}),
|
||||
);
|
||||
} on DioException catch (e) {
|
||||
appLogger.error('submit tender failed: $e');
|
||||
return Result.error(e);
|
||||
} on Exception catch (e, stackTrace) {
|
||||
appLogger.error('submit tender failed: $e', stackTrace: stackTrace);
|
||||
return Result.error(Exception(e));
|
||||
}
|
||||
}
|
||||
|
||||
Future<Result<TenderRejectResponse>> rejectTender() async {
|
||||
try {
|
||||
// final result = await _networkManager.makeRequest(
|
||||
// '/api/v1/tenders',
|
||||
// (json) => TenderRejectResponse.fromJson(json),
|
||||
// method: 'POST',
|
||||
// );
|
||||
// await Future.delayed(Duration(seconds: 2));
|
||||
appLogger.info('reject tender success');
|
||||
// TODO: will change when api is ready
|
||||
return Result.ok(
|
||||
TenderRejectResponse.fromJson({
|
||||
'message': 'Tender rejected successfully',
|
||||
}),
|
||||
);
|
||||
} on DioException catch (e) {
|
||||
appLogger.error('reject tender failed: $e');
|
||||
return Result.error(e);
|
||||
} on Exception catch (e, stackTrace) {
|
||||
appLogger.error('reject tender failed: $e', stackTrace: stackTrace);
|
||||
return Result.error(Exception(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,6 +157,9 @@ class $AssetsSvgsGen {
|
||||
/// File path: assets/svgs/password_visibility.svg
|
||||
String get passwordVisibility => 'assets/svgs/password_visibility.svg';
|
||||
|
||||
/// File path: assets/svgs/password_visibility_off.svg
|
||||
String get passwordVisibilityOff => 'assets/svgs/password_visibility_off.svg';
|
||||
|
||||
/// File path: assets/svgs/user_icon.svg
|
||||
String get userIcon => 'assets/svgs/user_icon.svg';
|
||||
|
||||
@@ -166,6 +169,7 @@ class $AssetsSvgsGen {
|
||||
export,
|
||||
passwordIcon,
|
||||
passwordVisibility,
|
||||
passwordVisibilityOff,
|
||||
userIcon,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,85 +1,214 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/views/tenders/models/tender_model.dart';
|
||||
import 'package:tm_app/data/repositories/tenders_repository.dart';
|
||||
import 'package:tm_app/data/services/model/home/tender/tender_model.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_dislike_response/tender_dislike_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_like_response/tender_like_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_reject_response/tender_reject_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tender_submit_response/tender_submit_response.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tenders_request/tenders_request.dart';
|
||||
import 'package:tm_app/data/services/model/tenders/tenders_response/tenders_response.dart';
|
||||
|
||||
import '../core/utils/result.dart';
|
||||
|
||||
class TendersViewModel with ChangeNotifier {
|
||||
List<Tender> likedTenders = [];
|
||||
List<Tender> dislikedTenders = [];
|
||||
final TendersRepository _tendersRepository;
|
||||
|
||||
TendersViewModel({required TendersRepository tendersRepository})
|
||||
: _tendersRepository = tendersRepository {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
getTenders();
|
||||
});
|
||||
}
|
||||
|
||||
bool _isLoading = false;
|
||||
String? _errorMessage;
|
||||
TendersResponse? _tendersResponse;
|
||||
|
||||
bool get isLoading => _isLoading;
|
||||
String? get errorMessage => _errorMessage;
|
||||
TendersResponse? get tendersResponse => _tendersResponse;
|
||||
|
||||
int currentPage = 1;
|
||||
List<Tender> rejectedTenders = [];
|
||||
List<Tender> submittedTenders = [];
|
||||
|
||||
void onDislike(Tender tender) {
|
||||
if (likedTenders.contains(tender)) {
|
||||
likedTenders.remove(tender);
|
||||
if (submittedTenders.contains(tender)) {
|
||||
submittedTenders.remove(tender);
|
||||
}
|
||||
Future<void> getTenders() async {
|
||||
_isLoading = true;
|
||||
_errorMessage = null;
|
||||
notifyListeners();
|
||||
|
||||
final request = TendersRequest(id: 'JNDFKMDV-100JF');
|
||||
final result = await _tendersRepository.getTenders(
|
||||
tendersRequestModel: request,
|
||||
);
|
||||
switch (result) {
|
||||
case Ok<TendersResponse>():
|
||||
_tendersResponse = result.value;
|
||||
break;
|
||||
case Error<TendersResponse>():
|
||||
_errorMessage = result.error.toString();
|
||||
break;
|
||||
}
|
||||
_isLoading = false;
|
||||
notifyListeners();
|
||||
_errorMessage = null;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
if (!dislikedTenders.contains(tender)) {
|
||||
dislikedTenders.add(tender);
|
||||
if (submittedTenders.contains(tender)) {
|
||||
submittedTenders.remove(tender);
|
||||
}
|
||||
/// Updates a tender's state in the list
|
||||
void _updateTenderState(
|
||||
String tenderId, {
|
||||
bool? liked,
|
||||
bool? disliked,
|
||||
bool? rejected,
|
||||
bool? submitted,
|
||||
}) {
|
||||
if (_tendersResponse?.tenders != null) {
|
||||
final updatedTenders =
|
||||
_tendersResponse!.tenders!.map((element) {
|
||||
if (element.tenderId == tenderId) {
|
||||
return element.copyWith(
|
||||
liked: liked,
|
||||
disliked: disliked,
|
||||
rejected: rejected,
|
||||
submitted: submitted,
|
||||
);
|
||||
}
|
||||
return element;
|
||||
}).toList();
|
||||
|
||||
_tendersResponse = _tendersResponse!.copyWith(tenders: updatedTenders);
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets a tender as liked
|
||||
Future<void> markLiked(TenderModel tender) async {
|
||||
_updateTenderState(
|
||||
tender.tenderId!,
|
||||
liked: true,
|
||||
disliked: false,
|
||||
rejected: false,
|
||||
submitted: tender.submitted,
|
||||
);
|
||||
notifyListeners();
|
||||
final result = await _tendersRepository.likeTender();
|
||||
switch (result) {
|
||||
case Ok<TenderLikeResponse>():
|
||||
break;
|
||||
case Error<TenderLikeResponse>():
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets a tender as disliked
|
||||
Future<void> markDisliked(TenderModel tender) async {
|
||||
_updateTenderState(
|
||||
tender.tenderId!,
|
||||
disliked: true,
|
||||
liked: false,
|
||||
rejected: tender.rejected,
|
||||
submitted: false,
|
||||
);
|
||||
notifyListeners();
|
||||
final result = await _tendersRepository.dislikeTender();
|
||||
switch (result) {
|
||||
case Ok<TenderDislikeResponse>():
|
||||
break;
|
||||
case Error<TenderDislikeResponse>():
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets a tender as rejected
|
||||
Future<void> markRejected(TenderModel tender) async {
|
||||
_updateTenderState(
|
||||
tender.tenderId!,
|
||||
rejected: true,
|
||||
liked: false,
|
||||
disliked: tender.disliked,
|
||||
submitted: false,
|
||||
);
|
||||
notifyListeners();
|
||||
final result = await _tendersRepository.rejectTender();
|
||||
switch (result) {
|
||||
case Ok<TenderRejectResponse>():
|
||||
break;
|
||||
case Error<TenderRejectResponse>():
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets a tender as submitted
|
||||
Future<void> markSubmitted(TenderModel tender) async {
|
||||
_updateTenderState(
|
||||
tender.tenderId!,
|
||||
submitted: true,
|
||||
liked: tender.liked,
|
||||
disliked: false,
|
||||
rejected: false,
|
||||
);
|
||||
notifyListeners();
|
||||
final result = await _tendersRepository.submitTender();
|
||||
switch (result) {
|
||||
case Ok<TenderSubmitResponse>():
|
||||
break;
|
||||
case Error<TenderSubmitResponse>():
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// Clears a specific state for a tender
|
||||
void clearTenderState(
|
||||
TenderModel tenderModel, {
|
||||
bool? isLiked,
|
||||
bool? isDisliked,
|
||||
bool? isRejected,
|
||||
bool? isSubmitted,
|
||||
}) {
|
||||
_updateTenderState(
|
||||
tenderModel.tenderId!,
|
||||
liked: isLiked ?? tenderModel.liked,
|
||||
disliked: isDisliked ?? tenderModel.disliked,
|
||||
rejected: isRejected ?? tenderModel.rejected,
|
||||
submitted: isSubmitted ?? tenderModel.submitted,
|
||||
);
|
||||
}
|
||||
|
||||
/// Toggles like state for a tender
|
||||
void toggleLike(TenderModel tender) {
|
||||
if (tender.liked == true) {
|
||||
clearTenderState(tender, isLiked: false);
|
||||
} else {
|
||||
dislikedTenders.remove(tender);
|
||||
markLiked(tender);
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void onLike(Tender tender) {
|
||||
if (dislikedTenders.contains(tender)) {
|
||||
dislikedTenders.remove(tender);
|
||||
if (rejectedTenders.contains(tender)) {
|
||||
rejectedTenders.remove(tender);
|
||||
}
|
||||
}
|
||||
|
||||
if (!likedTenders.contains(tender)) {
|
||||
likedTenders.add(tender);
|
||||
if (rejectedTenders.contains(tender)) {
|
||||
rejectedTenders.remove(tender);
|
||||
}
|
||||
/// Toggles dislike state for a tender
|
||||
void toggleDislike(TenderModel tender) {
|
||||
if (tender.disliked == true) {
|
||||
clearTenderState(tender, isDisliked: false);
|
||||
} else {
|
||||
likedTenders.remove(tender);
|
||||
markDisliked(tender);
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void onReject(Tender tender) {
|
||||
if (rejectedTenders.contains(tender)) {
|
||||
rejectedTenders.remove(tender);
|
||||
} else if (submittedTenders.contains(tender)) {
|
||||
submittedTenders.remove(tender);
|
||||
rejectedTenders.add(tender);
|
||||
if (likedTenders.contains(tender)) {
|
||||
likedTenders.remove(tender);
|
||||
}
|
||||
/// Toggles reject state for a tender
|
||||
void toggleReject(TenderModel tender) {
|
||||
if (tender.rejected == true) {
|
||||
clearTenderState(tender, isRejected: false);
|
||||
} else {
|
||||
rejectedTenders.add(tender);
|
||||
if (likedTenders.contains(tender)) {
|
||||
likedTenders.remove(tender);
|
||||
}
|
||||
markRejected(tender);
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void onSubmit(Tender tender) {
|
||||
if (submittedTenders.contains(tender)) {
|
||||
submittedTenders.remove(tender);
|
||||
} else if (rejectedTenders.contains(tender)) {
|
||||
rejectedTenders.remove(tender);
|
||||
submittedTenders.add(tender);
|
||||
if (dislikedTenders.contains(tender)) {
|
||||
dislikedTenders.remove(tender);
|
||||
}
|
||||
/// Toggles submit state for a tender
|
||||
void toggleSubmit(TenderModel tender) {
|
||||
if (tender.submitted == true) {
|
||||
clearTenderState(tender, isSubmitted: false);
|
||||
} else {
|
||||
submittedTenders.add(tender);
|
||||
if (dislikedTenders.contains(tender)) {
|
||||
dislikedTenders.remove(tender);
|
||||
}
|
||||
markSubmitted(tender);
|
||||
}
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/view_models/tenders_view_model.dart';
|
||||
import 'package:tm_app/views/tenders/widgets/main_tenders_slider.dart';
|
||||
|
||||
class DesktopTendersPage extends StatelessWidget {
|
||||
@@ -13,13 +15,30 @@ class DesktopTendersPage extends StatelessWidget {
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
body: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: SizedBox(
|
||||
width: 740,
|
||||
height: 800,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.0.h()),
|
||||
child: MainTendersSlider(isDesktop: true),
|
||||
),
|
||||
child: Consumer<TendersViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
if (viewModel.isLoading) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: AppColors.jellyBean,
|
||||
),
|
||||
);
|
||||
}
|
||||
if (viewModel.errorMessage != null) {
|
||||
return Center(child: Text(viewModel.errorMessage!));
|
||||
}
|
||||
return SizedBox(
|
||||
width: 740,
|
||||
height: 800,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.0.h()),
|
||||
child: MainTendersSlider(
|
||||
tenders: viewModel.tendersResponse?.tenders ?? [],
|
||||
isDesktop: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/views/tenders/widgets/main_tenders_slider.dart';
|
||||
import 'package:tm_app/view_models/tenders_view_model.dart';
|
||||
|
||||
import '../../../core/constants/strings.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../shared/tender_app_bar.dart';
|
||||
import '../widgets/main_tenders_slider.dart';
|
||||
|
||||
class MobileTendersPage extends StatelessWidget {
|
||||
const MobileTendersPage({super.key});
|
||||
@@ -15,11 +17,24 @@ class MobileTendersPage extends StatelessWidget {
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
appBar: tenderMobileAppBar(title: AppStrings.tendersTitle),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.0.h()),
|
||||
child: MainTendersSlider(),
|
||||
),
|
||||
body: Consumer<TendersViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
if (viewModel.isLoading) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(color: AppColors.jellyBean),
|
||||
);
|
||||
}
|
||||
if (viewModel.errorMessage != null) {
|
||||
return Center(child: Text(viewModel.errorMessage!));
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.0.h()),
|
||||
child: MainTendersSlider(
|
||||
tenders: viewModel.tendersResponse?.tenders ?? [],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/view_models/tenders_view_model.dart';
|
||||
import 'package:tm_app/views/tenders/widgets/main_tenders_slider.dart';
|
||||
|
||||
class TabletTendersPage extends StatelessWidget {
|
||||
@@ -13,13 +15,23 @@ class TabletTendersPage extends StatelessWidget {
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 24.0.w(),
|
||||
right: 24.0.w(),
|
||||
top: 128.0.h(),
|
||||
),
|
||||
child: MainTendersSlider(),
|
||||
child: Consumer<TendersViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
if (viewModel.isLoading) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(color: AppColors.jellyBean),
|
||||
);
|
||||
}
|
||||
if (viewModel.errorMessage != null) {
|
||||
return Center(child: Text(viewModel.errorMessage!));
|
||||
}
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 24.0.w(), top: 128.0.h()),
|
||||
child: MainTendersSlider(
|
||||
tenders: viewModel.tendersResponse?.tenders ?? [],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/data/services/model/home/tender/tender_model.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import '../models/tender_model.dart';
|
||||
import 'tender_card.dart';
|
||||
|
||||
class MainTendersSlider extends StatefulWidget {
|
||||
const MainTendersSlider({super.key, this.isDesktop = false});
|
||||
const MainTendersSlider({
|
||||
required this.tenders,
|
||||
super.key,
|
||||
this.isDesktop = false,
|
||||
});
|
||||
final bool isDesktop;
|
||||
final List<TenderModel> tenders;
|
||||
|
||||
@override
|
||||
State<MainTendersSlider> createState() => _MainTendersSliderState();
|
||||
@@ -39,7 +44,7 @@ class _MainTendersSliderState extends State<MainTendersSlider> {
|
||||
curve: Curves.easeInOutCubic,
|
||||
);
|
||||
setState(() {
|
||||
if (currentPage == sampleTenders.length) {
|
||||
if (currentPage == widget.tenders.length) {
|
||||
return;
|
||||
}
|
||||
currentPage = currentPage + 1;
|
||||
@@ -62,14 +67,14 @@ class _MainTendersSliderState extends State<MainTendersSlider> {
|
||||
child: PageView.builder(
|
||||
controller: pageController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: sampleTenders.length,
|
||||
itemCount: widget.tenders.length,
|
||||
onPageChanged: (index) {
|
||||
setState(() {
|
||||
currentPage = index + 1;
|
||||
});
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
final tender = sampleTenders[index];
|
||||
final tender = widget.tenders[index];
|
||||
return TenderCard(tender: tender, isDesktop: widget.isDesktop);
|
||||
},
|
||||
),
|
||||
@@ -102,7 +107,7 @@ class _MainTendersSliderState extends State<MainTendersSlider> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'$currentPage/${sampleTenders.length}',
|
||||
'$currentPage/${widget.tenders.length}',
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/data/services/model/home/tender/tender_model.dart';
|
||||
import 'package:tm_app/view_models/tenders_view_model.dart';
|
||||
import 'package:tm_app/views/tenders/models/tender_model.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
|
||||
class TenderActionButtons extends StatelessWidget {
|
||||
final Tender tender;
|
||||
final TenderModel tender;
|
||||
final bool isDesktop;
|
||||
|
||||
const TenderActionButtons({
|
||||
@@ -32,7 +32,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
onTap: () {
|
||||
viewModel.onDislike(tender);
|
||||
viewModel.toggleDislike(tender);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -42,7 +42,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
fit: BoxFit.cover,
|
||||
AssetsManager.dislike,
|
||||
colorFilter: ColorFilter.mode(
|
||||
viewModel.dislikedTenders.contains(tender)
|
||||
tender.disliked ?? false
|
||||
? AppColors.errorColor
|
||||
: AppColors.grey50,
|
||||
BlendMode.srcATop,
|
||||
@@ -51,12 +51,12 @@ class TenderActionButtons extends StatelessWidget {
|
||||
SizedBox(height: 8.0.h()),
|
||||
if (!isDesktop)
|
||||
Text(
|
||||
'Like',
|
||||
'Dislike',
|
||||
style: TextStyle(
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color:
|
||||
viewModel.dislikedTenders.contains(tender)
|
||||
tender.disliked ?? false
|
||||
? AppColors.errorColor
|
||||
: AppColors.grey50,
|
||||
),
|
||||
@@ -72,7 +72,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
onTap: () {
|
||||
viewModel.onReject(tender);
|
||||
viewModel.toggleReject(tender);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -83,7 +83,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color:
|
||||
viewModel.rejectedTenders.contains(tender)
|
||||
tender.rejected ?? false
|
||||
? AppColors.errorColor
|
||||
: AppColors.grey60,
|
||||
width: 1.5.w(),
|
||||
@@ -93,7 +93,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
color:
|
||||
viewModel.rejectedTenders.contains(tender)
|
||||
tender.rejected ?? false
|
||||
? AppColors.errorColor
|
||||
: AppColors.grey60,
|
||||
size: 16,
|
||||
@@ -107,7 +107,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color:
|
||||
viewModel.rejectedTenders.contains(tender)
|
||||
tender.rejected ?? false
|
||||
? AppColors.errorColor
|
||||
: AppColors.grey60,
|
||||
),
|
||||
@@ -123,7 +123,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
onTap: () {
|
||||
viewModel.onSubmit(tender);
|
||||
viewModel.toggleSubmit(tender);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -134,7 +134,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color:
|
||||
viewModel.submittedTenders.contains(tender)
|
||||
tender.submitted ?? false
|
||||
? AppColors.successColor
|
||||
: AppColors.grey60,
|
||||
width: 1.5.w(),
|
||||
@@ -144,7 +144,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
child: SvgPicture.asset(
|
||||
AssetsManager.tick,
|
||||
colorFilter: ColorFilter.mode(
|
||||
viewModel.submittedTenders.contains(tender)
|
||||
tender.submitted ?? false
|
||||
? AppColors.successColor
|
||||
: AppColors.grey60,
|
||||
BlendMode.srcATop,
|
||||
@@ -159,7 +159,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color:
|
||||
viewModel.submittedTenders.contains(tender)
|
||||
tender.submitted ?? false
|
||||
? AppColors.successColor
|
||||
: AppColors.grey60,
|
||||
),
|
||||
@@ -175,7 +175,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
onTap: () {
|
||||
viewModel.onLike(tender);
|
||||
viewModel.toggleLike(tender);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -185,7 +185,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
fit: BoxFit.cover,
|
||||
AssetsManager.like,
|
||||
colorFilter: ColorFilter.mode(
|
||||
viewModel.likedTenders.contains(tender)
|
||||
tender.liked ?? false
|
||||
? AppColors.successColor
|
||||
: AppColors.grey50,
|
||||
BlendMode.srcATop,
|
||||
@@ -199,7 +199,7 @@ class TenderActionButtons extends StatelessWidget {
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color:
|
||||
viewModel.likedTenders.contains(tender)
|
||||
tender.liked ?? false
|
||||
? AppColors.successColor
|
||||
: AppColors.grey50,
|
||||
),
|
||||
|
||||
@@ -2,15 +2,15 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/routes/app_routes.dart';
|
||||
import 'package:tm_app/data/services/model/home/tender/tender_model.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import '../models/tender_model.dart';
|
||||
import 'tender_action_buttons.dart';
|
||||
|
||||
class TenderCard extends StatelessWidget {
|
||||
final Tender tender;
|
||||
final TenderModel tender;
|
||||
final bool isDesktop;
|
||||
const TenderCard({required this.tender, super.key, this.isDesktop = false});
|
||||
|
||||
@@ -41,7 +41,7 @@ class TenderCard extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
tender.date,
|
||||
tender.createdTime ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey60,
|
||||
fontSize: 12.0.sp(),
|
||||
@@ -78,7 +78,7 @@ class TenderCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
tender.deadline,
|
||||
tender.deadline ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontSize: 14.0.sp(),
|
||||
@@ -92,7 +92,7 @@ class TenderCard extends StatelessWidget {
|
||||
|
||||
// Title
|
||||
Text(
|
||||
tender.title,
|
||||
tender.title ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontSize: 16.0.sp(),
|
||||
@@ -103,7 +103,7 @@ class TenderCard extends StatelessWidget {
|
||||
|
||||
// Description
|
||||
Text(
|
||||
tender.description,
|
||||
tender.description ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontSize: 16.0.sp(),
|
||||
@@ -115,7 +115,7 @@ class TenderCard extends StatelessWidget {
|
||||
|
||||
// Tender ID
|
||||
Text(
|
||||
tender.tenderId,
|
||||
tender.tenderId ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey,
|
||||
fontSize: 14.0.sp(),
|
||||
@@ -144,7 +144,7 @@ class TenderCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${tender.matchPercentage.toInt()}%',
|
||||
'${tender.profileMatch?.toInt() ?? 0}%',
|
||||
style: TextStyle(
|
||||
color: AppColors.secondaryTextColor,
|
||||
fontSize: 16.0.sp(),
|
||||
@@ -165,7 +165,7 @@ class TenderCard extends StatelessWidget {
|
||||
),
|
||||
child: FractionallySizedBox(
|
||||
alignment: Alignment.centerLeft,
|
||||
widthFactor: tender.matchPercentage / 100,
|
||||
widthFactor: tender.profileMatch ?? 0 / 100,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.secondary50,
|
||||
@@ -186,7 +186,7 @@ class TenderCard extends StatelessWidget {
|
||||
SvgPicture.asset(AssetsManager.location),
|
||||
SizedBox(width: 4.0.w()),
|
||||
Text(
|
||||
tender.location,
|
||||
tender.location ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontSize: 14.0.sp(),
|
||||
|
||||
Reference in New Issue
Block a user