import 'package:eatvio_app/features/notifications/presentation/notifications_cubit/notifications_cubit.dart'; import 'package:eatvio_app/features/notifications/presentation/notifications_cubit/notifications_state.dart'; import 'package:eatvio_app/features/notifications/presentation/widgets/notification_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; class NotificationsScreen extends StatelessWidget { const NotificationsScreen({super.key}); @override Widget build(BuildContext context) { return BlocBuilder( builder: (BuildContext context, NotificationsState state) { return Scaffold( appBar: AppBar( title: const Text('Уведомления'), ), body: state is NotificationsStateLoaded ? CustomScrollView( slivers: [ SliverList.builder( itemBuilder: (context, index) => NotificationWidget( notification: state.notifications[index], ), itemCount: state.notifications.length, ) ], ) : const Placeholder(), ); }, ); } }