import 'package:flutter/material.dart'; import 'package:csp2/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: [ Flexible( child: Text( "\$ ${job.jobIncome}", style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold), overflow: TextOverflow.ellipsis, ), ), Flexible( child: Text( job.jobIncomeType, style: TextStyle(color: Colors.grey), overflow: TextOverflow.ellipsis, ), ), const SizedBox(height: 20), Flexible( child: Text( job.jobLocationCity, style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), overflow: TextOverflow.ellipsis, ), ), Flexible( child: Text( job.jobLocationCountry, style: TextStyle(color: Colors.grey), overflow: TextOverflow.ellipsis, ), ), const Spacer(), ElevatedButton( onPressed: () {}, style: ElevatedButton.styleFrom( backgroundColor: Color(0xFF3056D3), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(50), ), padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), ), child: const Text("지원"), ), ], ), ), ), ], ), ), ); } }