import 'package:cpd_2022_energy/provider/energy_model.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class OutputCardWidget extends StatelessWidget { const OutputCardWidget({super.key}); @override Widget build(BuildContext context) { return Consumer( builder: (context, model, child) => Card( child: Column(children: [ Text("Energy in Kilo Joule: ${model.totalEnergy.toStringAsFixed(2)}"), Text('Water in Liter: ${model.boilingWaterAmount.toStringAsFixed(2)}'), Text('Iron in Kilogram: ${model.annealingIronAmount.toStringAsFixed(2)}'), ]))); } }