diet creation scrren is done

This commit is contained in:
Username1548
2024-12-11 19:15:25 +07:00
parent 2e0a8c559f
commit 2f168a2f35
63 changed files with 3113 additions and 633 deletions

View File

@@ -1,6 +1,5 @@
import 'package:eatvio_app/features/diets/presentation/widgets/info_bouble.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.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';
@@ -8,11 +7,12 @@ import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.dart';
class AuthorCard extends StatelessWidget {
const AuthorCard({super.key, required this.author});
const AuthorCard({super.key, required this.author, required this.title});
final Author author;
final String title;
@override
Widget build(BuildContext context) {
final s = S.of(context);
// final s = S.of(context);
return Container(
width: MediaQuery.sizeOf(context).width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: appTheme.cardBackground),
@@ -42,7 +42,7 @@ class AuthorCard extends StatelessWidget {
),
),
title: Text(
s.diet_author,
title,
style: TextStyles.textSSemibold.copyWith(
color: appTheme.gray,
),
@@ -57,18 +57,19 @@ class AuthorCard extends StatelessWidget {
),
),
SizedBox(width: 10),
InfoBouble(
radius: 12,
backgroundColor: appTheme.whiteA700,
children: [
Text(
'128-й в рейтинге',
style: TextStyles.textMMediumAuto.copyWith(
color: appTheme.blueA400,
if (author.authorPlaceInRating != null)
InfoBouble(
radius: 12,
backgroundColor: appTheme.whiteA700,
children: [
Text(
'${author.authorPlaceInRating}-й в рейтинге',
style: TextStyles.textMMediumAuto.copyWith(
color: appTheme.blueA400,
),
),
),
],
),
],
),
],
),
],