feat(diary): Recommended diet product list for current day (stump)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// ignore_for_file: unused_local_variable
|
||||
|
||||
import 'package:eatvio_app/features/diary/models/portion.dart';
|
||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
|
||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_state.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
@@ -55,6 +56,8 @@ class DiaryRecommendationsScreen extends StatelessWidget {
|
||||
|
||||
Widget _buildDiaryRecommendations(
|
||||
BuildContext context, DiaryStateLoaded state) {
|
||||
final Portion product =
|
||||
new Portion(id: 1, product_name: "", quantity: 1, portion: "");
|
||||
return Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
@@ -75,7 +78,29 @@ class DiaryRecommendationsScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.v),
|
||||
child: Column(
|
||||
children: [],
|
||||
children: [
|
||||
Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(product.product_name),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Название продукта: ${product.product_name}',
|
||||
style: TextStyle(fontSize: 24)),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'Количество: ${product.quantity} ${product.portion}',
|
||||
style: TextStyle(fontSize: 18)),
|
||||
// Добавьте другие детали о продукте по необходимости
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -28,31 +28,43 @@ final sl = GetIt.instance;
|
||||
|
||||
Future<void> init() async {
|
||||
// BLoC / Cubit
|
||||
sl.registerLazySingleton<InitializationCubit>(() => InitializationCubit(chatRepository: sl()));
|
||||
sl.registerLazySingleton<InitializationCubit>(
|
||||
() => InitializationCubit(chatRepository: sl()));
|
||||
sl.registerLazySingleton<NewMessagesCubit>(() => NewMessagesCubit());
|
||||
sl.registerLazySingleton<NotificationsCubit>(() => NotificationsCubit());
|
||||
|
||||
sl.registerFactory<RegistrationCubit>(() => RegistrationCubit(registrationRepository: sl()));
|
||||
sl.registerFactory<ChatRoomCubit>(() => ChatRoomCubit(chatRepository: sl(), initializationCubit: sl()));
|
||||
sl.registerFactory<RegistrationCubit>(
|
||||
() => RegistrationCubit(registrationRepository: sl()));
|
||||
sl.registerFactory<ChatRoomCubit>(
|
||||
() => ChatRoomCubit(chatRepository: sl(), initializationCubit: sl()));
|
||||
sl.registerFactory<FeedCubit>(() => FeedCubit(feedRepository: sl()));
|
||||
sl.registerFactory<RecipesCubit>(() => RecipesCubit(feedRepository: sl()));
|
||||
sl.registerFactory<BlogPostCubit>(() => BlogPostCubit(blogPostRepository: sl()));
|
||||
sl.registerFactory<BlogPostCubit>(
|
||||
() => BlogPostCubit(blogPostRepository: sl()));
|
||||
sl.registerFactory<DiaryBloc>(() => DiaryBloc(diaryRepository: sl()));
|
||||
sl.registerFactory<CalendarCubit>(() => CalendarCubit(calendarRepository: sl()));
|
||||
sl.registerFactory<CalendarCubit>(
|
||||
() => CalendarCubit(calendarRepository: sl()));
|
||||
|
||||
// Repository
|
||||
sl.registerLazySingleton<ChatRepository>(() => ChatRepository(chatService: sl()));
|
||||
sl.registerLazySingleton<FeedRepository>(() => FeedRepository(feedService: sl()));
|
||||
sl.registerLazySingleton<BlogPostRepository>(() => BlogPostRepository(blogPostService: sl()));
|
||||
sl.registerLazySingleton<RegistrationRepository>(() => RegistrationRepository(registrationService: sl()));
|
||||
sl.registerLazySingleton<DiaryRepository>(() => DiaryRepository(diaryService: sl()));
|
||||
sl.registerLazySingleton<CalendarRepository>(() => CalendarRepository(calendarService: sl()));
|
||||
sl.registerLazySingleton<ChatRepository>(
|
||||
() => ChatRepository(chatService: sl()));
|
||||
sl.registerLazySingleton<FeedRepository>(
|
||||
() => FeedRepository(feedService: sl()));
|
||||
sl.registerLazySingleton<BlogPostRepository>(
|
||||
() => BlogPostRepository(blogPostService: sl()));
|
||||
sl.registerLazySingleton<RegistrationRepository>(
|
||||
() => RegistrationRepository(registrationService: sl()));
|
||||
sl.registerLazySingleton<DiaryRepository>(
|
||||
() => DiaryRepository(diaryService: sl()));
|
||||
sl.registerLazySingleton<CalendarRepository>(
|
||||
() => CalendarRepository(calendarService: sl()));
|
||||
|
||||
// Services
|
||||
sl.registerLazySingleton<ChatService>(() => ChatService(sl()));
|
||||
sl.registerLazySingleton<FeedService>(() => FeedService(sl()));
|
||||
sl.registerLazySingleton<BlogPostService>(() => BlogPostService(sl()));
|
||||
sl.registerLazySingleton<RegistrationService>(() => RegistrationService(sl()));
|
||||
sl.registerLazySingleton<RegistrationService>(
|
||||
() => RegistrationService(sl()));
|
||||
sl.registerLazySingleton<DiaryService>(() => DiaryService(sl()));
|
||||
sl.registerLazySingleton<CalendarService>(() => CalendarService(sl()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user