Files
rmtPocketWatcher/flutter_app/lib/widgets/price_stats_card.dart
2025-12-14 21:53:46 -05:00

61 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
class PriceStatsCard extends StatelessWidget {
final String title;
final String value;
final String? subtitle;
final Color? valueColor;
final double? fontSize;
const PriceStatsCard({
super.key,
required this.title,
required this.value,
this.subtitle,
this.valueColor,
this.fontSize,
});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
color: const Color(0xFF1A1F3A),
borderRadius: BorderRadius.circular(8),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: const TextStyle(
color: Color(0xFF888888),
fontSize: 12,
),
),
const SizedBox(height: 5),
Text(
value,
style: TextStyle(
color: valueColor ?? Colors.white,
fontSize: fontSize ?? 18,
fontWeight: FontWeight.bold,
),
),
if (subtitle != null) ...[
const SizedBox(height: 2),
Text(
subtitle!,
style: const TextStyle(
color: Color(0xFF888888),
fontSize: 12,
),
),
],
],
),
);
}
}