Приложение на флаторе, настройки

This commit is contained in:
Халимов Рустам
2026-05-13 17:21:37 +03:00
parent 89e325556c
commit e8161d23d4
119 changed files with 18469 additions and 0 deletions
@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../bloc/chat_bloc.dart';
import '../bloc/chat_state.dart';
class ChatsPage extends StatelessWidget {
const ChatsPage({super.key});
@override
Widget build(BuildContext context) {
return BlocBuilder<ChatBloc, ChatState>(
builder: (context, state) {
return state.when(
initial: () => const Center(child: CircularProgressIndicator()),
loading: () => const Center(child: CircularProgressIndicator()),
chatsLoaded: (_) => const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.chat_bubble_outline, size: 64, color: Colors.grey),
SizedBox(height: 16),
Text('У вас пока нет чатов'),
],
),
),
chatSelected: (_, __) => const Center(child: Text('Chat selected')),
messagesLoaded: (_) => const Center(child: Text('Messages loaded')),
messageSent: () => const Center(child: Text('Message sent')),
error: (message) => Center(child: Text('Ошибка: $message')),
);
},
);
}
}