plan creation screen added

This commit is contained in:
Username1548
2024-12-02 15:55:57 +07:00
parent a1d9e13514
commit 1688ac1dc8
55 changed files with 3506 additions and 350 deletions

View File

@@ -1,50 +0,0 @@
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;
final int roundDigit = 1;
@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.toStringAsFixed(roundDigit)}', style: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.calories, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
Column(
children: [
Text('${protein.toStringAsFixed(roundDigit)}', style: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.proteins, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
Column(
children: [
Text('${fat.toStringAsFixed(roundDigit)}', style: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.fats, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
Column(
children: [
Text('${carbohydrates.toStringAsFixed(roundDigit)}', style: TextStyles.textMSemibold.copyWith(color: appTheme.black)),
Text(s.carbohydrates, style: TextStyles.textXSSemibold.copyWith(color: appTheme.black)),
],
),
],
),
);
}
}

View File

@@ -12,8 +12,9 @@ import 'package:go_router/go_router.dart';
import 'package:share_plus/share_plus.dart';
class MoreOptions extends StatelessWidget {
const MoreOptions({super.key, required this.id});
const MoreOptions({super.key, required this.id, this.disableActions});
final int id;
final bool? disableActions;
@override
Widget build(BuildContext context) {
final s = S.of(context);
@@ -25,7 +26,7 @@ class MoreOptions extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
GestureDetector(
onTap: () {
onTap:disableActions == true ? null : () {
Clipboard.setData(ClipboardData(text: baseUrl + '/ru/diet/' + id.toString()));
showInfoToast(s.link_was_copied);
},
@@ -34,7 +35,6 @@ class MoreOptions extends StatelessWidget {
Text(
s.copy_link,
style: TextStyles.textMMedium.copyWith(
color: appTheme.black,
),
),
@@ -48,7 +48,7 @@ class MoreOptions extends StatelessWidget {
child: CustomDivider(),
),
GestureDetector(
onTap: () => Share.shareUri(
onTap: disableActions == true ? null : () => Share.shareUri(
Uri.parse(
baseUrl + '/ru/diet/' + id.toString(),
),
@@ -58,7 +58,6 @@ class MoreOptions extends StatelessWidget {
Text(
s.share,
style: TextStyles.textMMedium.copyWith(
color: appTheme.black,
),
),
@@ -72,7 +71,7 @@ class MoreOptions extends StatelessWidget {
child: CustomDivider(),
),
GestureDetector(
onTap: () {
onTap: disableActions == true ? null : () {
context.push('complainingScreen');
},
child: Row(