130 lines
4.4 KiB
Dart
130 lines
4.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:csp2/common/data/job.dart';
|
|
class JobCard extends StatelessWidget {
|
|
final Job job;
|
|
|
|
const JobCard({super.key, required this.job});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
|
elevation: 3,
|
|
child: SizedBox(
|
|
height: 200,
|
|
child: Row(
|
|
children: [
|
|
// 왼쪽 영역
|
|
Expanded(
|
|
flex: 2,
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(20),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
job.jobName,
|
|
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(height: 10),
|
|
Expanded(
|
|
child: Text(
|
|
job.jobDescription,
|
|
overflow: TextOverflow.ellipsis,
|
|
maxLines: 4,
|
|
),
|
|
),
|
|
const SizedBox(height: 6),
|
|
Text(
|
|
"Show More", // You might want to make this clickable to show full description
|
|
style: TextStyle(
|
|
color: Colors.blue,
|
|
decoration: TextDecoration.underline,
|
|
),
|
|
),
|
|
const SizedBox(height: 10),
|
|
Text(
|
|
job.jobJobtag,
|
|
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black54),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
// 오른쪽 영역
|
|
Expanded(
|
|
flex: 1,
|
|
child: Container(
|
|
decoration: const BoxDecoration(
|
|
color: Color(0xFFEFF1FB),
|
|
borderRadius: BorderRadius.only(
|
|
topRight: Radius.circular(16),
|
|
bottomRight: Radius.circular(16),
|
|
),
|
|
),
|
|
padding: const EdgeInsets.all(20),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
// 수입
|
|
Text(
|
|
job.jobIncome is num ? "\$ ${job.jobIncome}" : job.jobIncome.toString(),
|
|
style: const TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
|
|
maxLines: 1,
|
|
softWrap: false,
|
|
),
|
|
|
|
// 수입 타입
|
|
Text(
|
|
job.jobIncomeType,
|
|
style: const TextStyle(color: Colors.grey),
|
|
maxLines: 1,
|
|
softWrap: false,
|
|
),
|
|
|
|
const SizedBox(height: 5),
|
|
// 도시
|
|
Text(
|
|
job.jobLocationCity,
|
|
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
|
maxLines: 1,
|
|
softWrap: false,
|
|
),
|
|
|
|
// 국가
|
|
Text(
|
|
job.jobLocationCountry,
|
|
style: const TextStyle(color: Colors.grey),
|
|
maxLines: 1,
|
|
softWrap: false,
|
|
),
|
|
|
|
|
|
const Spacer(),
|
|
|
|
// 지원 버튼
|
|
SizedBox(
|
|
height: 44,
|
|
child: ElevatedButton(
|
|
onPressed: () {},
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: const Color(0xB91459DB),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(50),
|
|
),
|
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
),
|
|
child: const Text("Apply", style: TextStyle(color: Colors.white)),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |