78 lines
2.1 KiB
Dart
78 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'example_candidate_model.dart';
|
|
|
|
class ExampleCard extends StatelessWidget {
|
|
final ExampleCandidateModel candidate;
|
|
|
|
const ExampleCard(
|
|
this.candidate, {
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
clipBehavior: Clip.hardEdge,
|
|
decoration: BoxDecoration(
|
|
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
|
color: Colors.white,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.2),
|
|
spreadRadius: 3,
|
|
blurRadius: 7,
|
|
offset: const Offset(0, 3),
|
|
)
|
|
],
|
|
),
|
|
alignment: Alignment.center,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Flexible(
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
gradient: LinearGradient(
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
colors: candidate.color,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.all(16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
candidate.name,
|
|
style: const TextStyle(
|
|
color: Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 20,
|
|
),
|
|
),
|
|
const SizedBox(height: 5),
|
|
Text(
|
|
candidate.job,
|
|
style: const TextStyle(
|
|
color: Colors.grey,
|
|
fontSize: 15,
|
|
),
|
|
),
|
|
const SizedBox(height: 5),
|
|
Text(
|
|
candidate.city,
|
|
style: const TextStyle(color: Colors.grey),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|