import 'package:flutter/material.dart'; import 'package:flutter_common/widget/common_widget.dart'; class StatisticCard extends StatelessWidget { final IconData icon; final Color color; final String title; final num value; final String unit; const StatisticCard({ super.key, required this.icon, required this.color, required this.title, required this.value, required this.unit, }); @override Widget build(BuildContext context) { return CommonCard( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( width: 40, height: 40, child: Icon(icon, color: color, size: 40), ), const SizedBox(width: 10), Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Text(title, style: TextStyle(fontSize: 20, color: color)), const SizedBox(height: 4), Row( children: [ Text( value.toString(), style: TextStyle(fontSize: 20, color: color), ), const SizedBox(width: 5), Text(unit, style: TextStyle(fontSize: 20, color: color)), ], ), ], ), ], ), ); } }