df02cff668
- Renamed BottomNavigation to TenderBottomNavigation for clarity. - Updated TendersScreen to use TenderBottomNavigation. - Converted TendersScreen from StatelessWidget to StatefulWidget to manage tab state. - Added TabController for handling tab changes and improved layout with SafeArea and PageView.
95 lines
2.7 KiB
Dart
95 lines
2.7 KiB
Dart
class Tender {
|
|
final String date;
|
|
final String deadline;
|
|
final String title;
|
|
final String description;
|
|
final String tenderId;
|
|
final String location;
|
|
final String country;
|
|
final double matchPercentage;
|
|
|
|
Tender({
|
|
required this.date,
|
|
required this.deadline,
|
|
required this.title,
|
|
required this.description,
|
|
required this.tenderId,
|
|
required this.location,
|
|
required this.country,
|
|
required this.matchPercentage,
|
|
});
|
|
|
|
factory Tender.fromJson(Map<String, dynamic> json) {
|
|
return Tender(
|
|
date: json['date'] as String,
|
|
deadline: json['deadline'] as String,
|
|
title: json['title'] as String,
|
|
description: json['description'] as String,
|
|
tenderId: json['tenderId'] as String,
|
|
location: json['location'] as String,
|
|
country: json['country'] as String,
|
|
matchPercentage: (json['matchPercentage'] as num).toDouble(),
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'date': date,
|
|
'deadline': deadline,
|
|
'title': title,
|
|
'description': description,
|
|
'tenderId': tenderId,
|
|
'location': location,
|
|
'country': country,
|
|
'matchPercentage': matchPercentage,
|
|
};
|
|
}
|
|
}
|
|
|
|
final List<Tender> sampleTenders = [
|
|
Tender(
|
|
date: '2025-05-20',
|
|
deadline: '2025-06-10',
|
|
title: 'Digital Services Tender',
|
|
description:
|
|
'A tender for digital services and IT infrastructure development. The project involves modernizing existing systems and implementing new digital solutions for improved efficiency.',
|
|
tenderId: 'KLF 2025/119',
|
|
location: 'Stockholm',
|
|
country: 'SE',
|
|
matchPercentage: 85.0,
|
|
),
|
|
Tender(
|
|
date: '2025-04-15',
|
|
deadline: '2025-05-01',
|
|
title: 'Construction Project',
|
|
description:
|
|
'Seeking contractors for a large-scale construction project in the city center. Includes both residential and commercial buildings.',
|
|
tenderId: 'CST 2025/042',
|
|
location: 'Gothenburg',
|
|
country: 'SE',
|
|
matchPercentage: 72.0,
|
|
),
|
|
Tender(
|
|
date: '2025-03-10',
|
|
deadline: '2025-04-05',
|
|
title: 'Healthcare Equipment Supply',
|
|
description:
|
|
'Supplying medical and healthcare equipment to regional hospitals. Includes installation and maintenance services.',
|
|
tenderId: 'HLT 2025/301',
|
|
location: 'Malmö',
|
|
country: 'SE',
|
|
matchPercentage: 90.0,
|
|
),
|
|
Tender(
|
|
date: '2025-02-28',
|
|
deadline: '2025-03-20',
|
|
title: 'IT Consulting Services',
|
|
description:
|
|
'Looking for experienced IT consultants to support digital transformation initiatives for public sector organizations.',
|
|
tenderId: 'ITC 2025/210',
|
|
location: 'Uppsala',
|
|
country: 'SE',
|
|
matchPercentage: 78.0,
|
|
),
|
|
];
|