diff --git a/lib/features/diary/presentation/pages/diary_recommendations_scree.dart b/lib/features/diary/presentation/pages/diary_recommendations_scree.dart index 6c5dea7..b2dcfca 100644 --- a/lib/features/diary/presentation/pages/diary_recommendations_scree.dart +++ b/lib/features/diary/presentation/pages/diary_recommendations_scree.dart @@ -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)), + // Добавьте другие детали о продукте по необходимости + ], + ), + ), + ) + ], ), ), ), diff --git a/lib/locator_service.dart b/lib/locator_service.dart index 5ca320f..2c05df6 100644 --- a/lib/locator_service.dart +++ b/lib/locator_service.dart @@ -28,31 +28,43 @@ final sl = GetIt.instance; Future init() async { // BLoC / Cubit - sl.registerLazySingleton(() => InitializationCubit(chatRepository: sl())); + sl.registerLazySingleton( + () => InitializationCubit(chatRepository: sl())); sl.registerLazySingleton(() => NewMessagesCubit()); sl.registerLazySingleton(() => NotificationsCubit()); - sl.registerFactory(() => RegistrationCubit(registrationRepository: sl())); - sl.registerFactory(() => ChatRoomCubit(chatRepository: sl(), initializationCubit: sl())); + sl.registerFactory( + () => RegistrationCubit(registrationRepository: sl())); + sl.registerFactory( + () => ChatRoomCubit(chatRepository: sl(), initializationCubit: sl())); sl.registerFactory(() => FeedCubit(feedRepository: sl())); sl.registerFactory(() => RecipesCubit(feedRepository: sl())); - sl.registerFactory(() => BlogPostCubit(blogPostRepository: sl())); + sl.registerFactory( + () => BlogPostCubit(blogPostRepository: sl())); sl.registerFactory(() => DiaryBloc(diaryRepository: sl())); - sl.registerFactory(() => CalendarCubit(calendarRepository: sl())); + sl.registerFactory( + () => CalendarCubit(calendarRepository: sl())); // Repository - sl.registerLazySingleton(() => ChatRepository(chatService: sl())); - sl.registerLazySingleton(() => FeedRepository(feedService: sl())); - sl.registerLazySingleton(() => BlogPostRepository(blogPostService: sl())); - sl.registerLazySingleton(() => RegistrationRepository(registrationService: sl())); - sl.registerLazySingleton(() => DiaryRepository(diaryService: sl())); - sl.registerLazySingleton(() => CalendarRepository(calendarService: sl())); + sl.registerLazySingleton( + () => ChatRepository(chatService: sl())); + sl.registerLazySingleton( + () => FeedRepository(feedService: sl())); + sl.registerLazySingleton( + () => BlogPostRepository(blogPostService: sl())); + sl.registerLazySingleton( + () => RegistrationRepository(registrationService: sl())); + sl.registerLazySingleton( + () => DiaryRepository(diaryService: sl())); + sl.registerLazySingleton( + () => CalendarRepository(calendarService: sl())); // Services sl.registerLazySingleton(() => ChatService(sl())); sl.registerLazySingleton(() => FeedService(sl())); sl.registerLazySingleton(() => BlogPostService(sl())); - sl.registerLazySingleton(() => RegistrationService(sl())); + sl.registerLazySingleton( + () => RegistrationService(sl())); sl.registerLazySingleton(() => DiaryService(sl())); sl.registerLazySingleton(() => CalendarService(sl()));