summary_details.dart 943 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:fitness_dashboard_ui/widgets/custom_card_widget.dart';
  2. import 'package:flutter/material.dart';
  3. class SummaryDetails extends StatelessWidget {
  4. const SummaryDetails({super.key});
  5. @override
  6. Widget build(BuildContext context) {
  7. return CustomCard(
  8. color: const Color(0xFF2F353E),
  9. child: Row(
  10. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  11. children: [
  12. buildDetails('Cal', '305'),
  13. buildDetails('Steps', '10983'),
  14. buildDetails('Distance', '7km'),
  15. buildDetails('Sleep', '7hr'),
  16. ],
  17. ),
  18. );
  19. }
  20. Widget buildDetails(String key, String value) {
  21. return Column(
  22. children: [
  23. Text(
  24. key,
  25. style: const TextStyle(fontSize: 11, color: Colors.grey),
  26. ),
  27. const SizedBox(height: 2),
  28. Text(
  29. value,
  30. style: const TextStyle(fontSize: 14),
  31. ),
  32. ],
  33. );
  34. }
  35. }