diff --git a/README.md b/README.md index d1a7a1e..5348f75 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,49 @@ -# yahay +# Yahay -A new Flutter Chat Application. Uses Laravel + Php as backend +Flutter stable version -## Getting Started +Yahay is a Flutter project designed to allow users to video chat with other people using WebRTC. The project also integrates a file picker implementation through Telegram. This project is currently under development and is not yet finished. -This project is a starting point for a Flutter application. +## Features -A few resources to get you started if this is your first Flutter project: +- **Flutter Frontend** +- **Laravel + PHP Backend** + You can find the backend project here: [Yahay Laravel Backend](https://github.com/sb-dor/Yahay-Laravel) +- **WebRTC Integration** + Enables video chat functionality between users. +- **Telegram File Picker** + Allows users to select and share files using a Telegram file picker. -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) +## How to Run the Project -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +### Prerequisites + +- **Flutter**: Make sure you have Flutter installed on your machine. +- **Laravel Backend**: Make sure you have Php installed on your machine. + +### Laravel Setup + +1. Clone the backend repository from the link above. +2. Add a `.env` file with the following configuration in main project folder: + +```env +MAIN_URL=YOUR_LOCAL_URL + +PUSHER_APP_ID=yahapappid +PUSHER_APP_KEY=D4C11397CF5822DDA8516843BFE7AE0944E36A01 +PUSHER_APP_SECRET=yahayappsecret +PUSHER_HOST=192.168.100.3 +PUSHER_PORT=6001 +PUSHER_SCHEME=ws +``` + +Run the following commands in the backend project: + + composer install + php artisan migrate + php artisan serve + php artisan websocket:serve + +Add host by adding --host if you want: + + --host HOST --port PORT_NUMBERS \ No newline at end of file diff --git a/lib/features/telegram_file_picker_feature/view/bloc/telegram_file_picker_bloc.dart b/lib/features/telegram_file_picker_feature/view/bloc/telegram_file_picker_bloc.dart index 816e391..1405470 100644 --- a/lib/features/telegram_file_picker_feature/view/bloc/telegram_file_picker_bloc.dart +++ b/lib/features/telegram_file_picker_feature/view/bloc/telegram_file_picker_bloc.dart @@ -397,6 +397,7 @@ class TelegramFilePickerBloc { if (_currentStateModel.getPathForGettingImagesFrom == null && !event.getGalleryData) return; _currentStateModel.clearSpecificFolderData(); _currentStateModel.closeSpecificFolderDataStream(); + yield* _emitter(); if (event.getGalleryData) { _currentStateModel.initSpecificFolderDataStream( _filePickerUseCase.getRecentImagesAndVideos().listen(