Files
tm_app/lib/views/home/tender_card.dart
T
2025-08-09 08:18:05 +03:30

78 lines
2.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../../core/utils/size_config.dart';
class TenderCard extends StatelessWidget {
const TenderCard({
required this.backgroundColor,
required this.iconPath,
required this.title,
required this.amount,
required this.textColor,
required this.onTap,
required this.enableTap,
this.width,
this.height,
super.key,
});
final Color backgroundColor;
final String iconPath;
final String title;
final String amount;
final Color textColor;
final VoidCallback onTap;
final bool enableTap;
final double? width;
final double? height;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: enableTap ? onTap : null,
child: Container(
width: width ?? 178.0.w(),
height: height ?? 148.0.h(),
padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 12.0.h()),
decoration: BoxDecoration(
color: backgroundColor,
borderRadius: BorderRadius.circular(8),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(iconPath),
SizedBox(height: 4.0.h()),
Text(
title,
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.bold,
color: Color(0xFF777777),
),
),
Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
amount,
style: TextStyle(
fontSize: 24.0.sp(),
fontWeight: FontWeight.bold,
color: textColor,
),
),
enableTap
? SvgPicture.asset('assets/icons/arrow-right.svg')
: SizedBox(),
],
),
],
),
),
);
}
}