97 lines
2.8 KiB
Dart
97 lines
2.8 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'example_candidate_model.dart';
|
|
|
|
class ExampleCard extends StatelessWidget {
|
|
final ExampleCandidateModel candidate;
|
|
|
|
const ExampleCard({
|
|
Key? key,
|
|
required this.candidate,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(10),
|
|
color: CupertinoColors.white,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: CupertinoColors.systemGrey.withOpacity(0.2),
|
|
spreadRadius: 3,
|
|
blurRadius: 7,
|
|
offset: const Offset(0, 3),
|
|
)
|
|
],
|
|
),
|
|
alignment: Alignment.center,
|
|
child: Column(
|
|
children: [
|
|
Flexible(
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
gradient: candidate.color,
|
|
borderRadius: const BorderRadius.only(
|
|
topLeft: Radius.circular(10),
|
|
topRight: Radius.circular(10),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
padding: const EdgeInsets.all(15),
|
|
decoration: const BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.only(
|
|
bottomLeft: Radius.circular(10),
|
|
bottomRight: Radius.circular(10),
|
|
),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
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,
|
|
fontSize: 15,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|