import 'package:flutter/material.dart'; import '../models/energy_data.dart'; import '../theme/app_theme.dart'; class GainsCard extends StatelessWidget { final EnergyData data; const GainsCard({super.key, required this.data}); @override Widget build(BuildContext context) { return Card( child: InkWell( borderRadius: BorderRadius.circular(16), onTap: () {}, child: Padding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Container( width: 40, height: 40, decoration: BoxDecoration( color: Colors.amber.shade50, shape: BoxShape.circle, ), child: const Icon(Icons.euro_rounded, color: Colors.amber, size: 22), ), const SizedBox(width: 12), const Text( 'Gains', style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, color: AppTheme.textDark, ), ), ], ), Row( children: [ Text( '${data.dayGains.toStringAsFixed(2)} €', style: const TextStyle( fontSize: 16, fontWeight: FontWeight.bold, color: AppTheme.textDark, ), ), const Icon(Icons.chevron_right, color: AppTheme.textLight), ], ), ], ), ), ), ); } }