Files
eatvio_app/lib/features/diets/presentation/widgets/cpfc_container.dart
2024-11-12 19:05:30 +07:00

47 lines
1.9 KiB
Dart

import 'package:eatvio_app/generated/l10n.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:flutter/material.dart';
class CpfcContainer extends StatelessWidget {
const CpfcContainer({super.key, required this.calories, required this.protein, required this.fat, required this.carbohydrates});
final double calories;
final double protein;
final double fat;
final double carbohydrates;
@override
Widget build(BuildContext context) {
final s = S.of(context);
return Container(
color: appTheme.cardBackground,
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Column(
children: [
Text('$calories', style: TextStyle(color: appTheme.blueGray800, fontSize: 16, fontWeight: FontWeight.w600)),
Text(s.calories, style: TextStyle(color: appTheme.blueGray800, fontSize: 12, fontWeight: FontWeight.w500)),
],
),
Column(
children: [
Text('$protein', style: TextStyle(color: appTheme.blueGray800, fontSize: 16, fontWeight: FontWeight.w600)),
Text(s.proteins, style: TextStyle(color: appTheme.blueGray800, fontSize: 12, fontWeight: FontWeight.w500)),
],
),
Column(
children: [
Text('$fat', style: TextStyle(color: appTheme.blueGray800, fontSize: 16, fontWeight: FontWeight.w600)),
Text(s.fats, style: TextStyle(color: appTheme.blueGray800, fontSize: 12, fontWeight: FontWeight.w500)),
],
),
Column(
children: [
Text('$carbohydrates', style: TextStyle(color: appTheme.blueGray800, fontSize: 16, fontWeight: FontWeight.w600)),
Text(s.carbohydrates, style: TextStyle(color: appTheme.blueGray800, fontSize: 12, fontWeight: FontWeight.w500)),
],
),
],),
);
}
}