feat(profile): add button for weight and circumferences

This commit is contained in:
mso7nueh
2024-09-04 11:51:03 +03:00
parent d519c505e7
commit 0316ea9228
10 changed files with 385 additions and 153 deletions

View File

@@ -112,8 +112,16 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
Builder(
builder: (context) {
if (_selectedChipIndex == 0) return WeightChartWidget(chartPoints: chartPoints);
if (_selectedChipIndex == 1) return CircumferenceChartWidget(chartData: chartData);
if (_selectedChipIndex == 0)
return WeightChartWidget(
chartPoints: chartPoints,
profileCubit: context.read<ProfileCubit>(),
);
if (_selectedChipIndex == 1)
return CircumferenceChartWidget(
chartData: chartData,
profileCubit: context.read<ProfileCubit>(),
);
if (_selectedChipIndex == 2)
return ImtChartWidget(chartPoints: chartPoints);
else