Files
eatvio_app/lib/features/diets/presentation/widgets/cpfc_container.dart
2024-11-20 14:30:48 +03:00

51 lines
1.8 KiB
Dart

import 'package:eatvio_app/generated/l10n.dart';
import 'package:eatvio_app/core/theme/custom_text_style.dart';
import 'package:eatvio_app/core/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: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.calories, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
Column(
children: [
Text('$protein', style: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.proteins, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
Column(
children: [
Text('$fat', style: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.fats, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
Column(
children: [
Text('$carbohydrates', style: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.carbohydrates, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
],
),
);
}
}