64 lines
1.8 KiB
Dart
64 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../common/data/service_data.dart';
|
|
import '../../../common/theme/theme.dart';
|
|
import '../image/image.dart';
|
|
import 'gradient_card.dart';
|
|
|
|
class ServiceCard extends StatelessWidget {
|
|
final Service service;
|
|
const ServiceCard({super.key, required this.service});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GradientCard(
|
|
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
|
child: Row(
|
|
children: [
|
|
ClipRRect(
|
|
borderRadius: BorderRadiusGeometry.circular(8),
|
|
child: Image.asset(
|
|
service.imagePath,
|
|
width: 60,
|
|
height: 60,
|
|
errorBuilder: (context, error, stackTrace) =>
|
|
ImagePlaceholder(width: 60, height: 60),
|
|
),
|
|
),
|
|
SizedBox(width: 12),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
service.name,
|
|
style: AppStyle.xl.copyWith(
|
|
fontWeight: FontWeight.bold,
|
|
color: AppColor.white,
|
|
),
|
|
),
|
|
Text(
|
|
service.description,
|
|
style: AppStyle.md.copyWith(
|
|
fontWeight: FontWeight.w500,
|
|
color: AppColor.white,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
InkWell(
|
|
child: Text(
|
|
'Ubah',
|
|
style: AppStyle.md.copyWith(
|
|
color: AppColor.white,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|