buildScienceParamCard function
Implementation
Widget buildScienceParamCard({required String title, required String value, required double percent, required Color color, bool isProgress = true}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title, style: TextStyle(color: Colors.white54, fontSize: 10, fontWeight: FontWeight.bold)),
const SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(value, style: const TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold, fontFamily: 'Courier')),
],
),
if(isProgress) ...[
const SizedBox(height: 6),
ClipRRect(
borderRadius: BorderRadius.circular(2),
child: LinearProgressIndicator(
value: percent,
backgroundColor: Colors.white10,
valueColor: AlwaysStoppedAnimation<Color>(color),
minHeight: 4,
),
),
]
],
);
}