├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── core_packages ├── trans_labels.json ├── v_chat_receive_share │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── analysis_options.yaml │ ├── example │ │ └── main.dart │ ├── lib │ │ └── v_chat_receive_share.dart │ ├── pubspec.yaml │ └── pubspec_overrides.yaml ├── v_chat_sdk_core │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── analysis_options.yaml │ ├── example │ │ └── main.dart │ ├── lib │ │ ├── src │ │ │ ├── events │ │ │ │ ├── app_life_cycle.dart │ │ │ │ ├── event_bus.dart │ │ │ │ ├── events.dart │ │ │ │ ├── socket_status_event.dart │ │ │ │ ├── v_app_event.dart │ │ │ │ ├── v_call_events.dart │ │ │ │ ├── v_message_events.dart │ │ │ │ ├── v_notifications_events.dart │ │ │ │ ├── v_room_events.dart │ │ │ │ └── v_socket_interval.dart │ │ │ ├── exceptions │ │ │ │ ├── exceptions.dart │ │ │ │ └── http │ │ │ │ │ ├── http.dart │ │ │ │ │ └── v_chat_http_exception.dart │ │ │ ├── http │ │ │ │ ├── abstraction │ │ │ │ │ ├── abstraction.dart │ │ │ │ │ └── auth_abs.dart │ │ │ │ ├── api_service │ │ │ │ │ ├── api_service.dart │ │ │ │ │ ├── auth │ │ │ │ │ │ ├── auth_api.chopper.dart │ │ │ │ │ │ ├── auth_api.dart │ │ │ │ │ │ └── auth_api_service.dart │ │ │ │ │ ├── block │ │ │ │ │ │ ├── block_api.chopper.dart │ │ │ │ │ │ ├── block_api.dart │ │ │ │ │ │ └── block_api_service.dart │ │ │ │ │ ├── call │ │ │ │ │ │ ├── call_api.chopper.dart │ │ │ │ │ │ ├── call_api.dart │ │ │ │ │ │ └── call_api_service.dart │ │ │ │ │ ├── channel │ │ │ │ │ │ ├── channel_api.chopper.dart │ │ │ │ │ │ ├── channel_api.dart │ │ │ │ │ │ └── channel_api_service.dart │ │ │ │ │ ├── interceptors.dart │ │ │ │ │ ├── message │ │ │ │ │ │ ├── message_api.chopper.dart │ │ │ │ │ │ ├── message_api.dart │ │ │ │ │ │ └── message_api_service.dart │ │ │ │ │ └── profile │ │ │ │ │ │ ├── profile_api.chopper.dart │ │ │ │ │ │ ├── profile_api.dart │ │ │ │ │ │ └── profile_api_service.dart │ │ │ │ ├── dto │ │ │ │ │ ├── create_broadcast_dto.dart │ │ │ │ │ ├── create_group_dto.dart │ │ │ │ │ ├── dto.dart │ │ │ │ │ ├── v_chat_register_dto.dart │ │ │ │ │ ├── v_room_messages_dto.dart │ │ │ │ │ └── v_rooms_dto.dart │ │ │ │ ├── http.dart │ │ │ │ └── socket │ │ │ │ │ ├── socket_controller.dart │ │ │ │ │ ├── socket_io_client.dart │ │ │ │ │ └── socket_service.dart │ │ │ ├── local_db │ │ │ │ ├── core │ │ │ │ │ ├── abstraction │ │ │ │ │ │ ├── base_local_api_cache_repo.dart │ │ │ │ │ │ ├── base_local_message_repo.dart │ │ │ │ │ │ └── base_local_room_repo.dart │ │ │ │ │ └── imp │ │ │ │ │ │ ├── api_cache │ │ │ │ │ │ ├── api_cache_keys.dart │ │ │ │ │ │ ├── api_cache_memory_imp.dart │ │ │ │ │ │ └── api_cache_sql_imp.dart │ │ │ │ │ │ ├── message │ │ │ │ │ │ ├── memory_message_imp.dart │ │ │ │ │ │ └── sql_message_imp.dart │ │ │ │ │ │ └── room │ │ │ │ │ │ ├── memory_room_imp.dart │ │ │ │ │ │ └── sql_room_imp.dart │ │ │ │ └── tables │ │ │ │ │ ├── api_cache_table.dart │ │ │ │ │ ├── db_provider.dart │ │ │ │ │ ├── message_table.dart │ │ │ │ │ └── room_table.dart │ │ │ ├── logger │ │ │ │ └── v_logger.dart │ │ │ ├── models │ │ │ │ ├── api_cache_model.dart │ │ │ │ ├── call │ │ │ │ │ ├── agora_connect_model.dart │ │ │ │ │ ├── call.dart │ │ │ │ │ ├── v_call_dto.dart │ │ │ │ │ └── v_call_history.dart │ │ │ │ ├── controller │ │ │ │ │ ├── config.dart │ │ │ │ │ ├── v_chat_config.dart │ │ │ │ │ ├── v_navigator.dart │ │ │ │ │ └── v_push_model.dart │ │ │ │ ├── current_room.dart │ │ │ │ ├── link_preview_data.dart │ │ │ │ ├── models.dart │ │ │ │ ├── push_provider │ │ │ │ │ ├── push.dart │ │ │ │ │ ├── v_chat_push_provider.dart │ │ │ │ │ └── v_push_config.dart │ │ │ │ ├── socket │ │ │ │ │ ├── new_call_model.dart │ │ │ │ │ ├── on_aceept_call.dart │ │ │ │ │ ├── on_ban_user_chat.dart │ │ │ │ │ ├── on_deliver_room_messages_model.dart │ │ │ │ │ ├── on_enter_room_model.dart │ │ │ │ │ ├── room_typing_model.dart │ │ │ │ │ └── socket.dart │ │ │ │ ├── v_app_event.dart │ │ │ │ ├── v_base_filter.dart │ │ │ │ ├── v_chat_base_exception.dart │ │ │ │ ├── v_mention_model.dart │ │ │ │ ├── v_message │ │ │ │ │ ├── base_message │ │ │ │ │ │ └── v_base_message.dart │ │ │ │ │ ├── call_message │ │ │ │ │ │ ├── call_message.dart │ │ │ │ │ │ └── msg_call_att.dart │ │ │ │ │ ├── core │ │ │ │ │ │ └── message_factory.dart │ │ │ │ │ ├── custom_message │ │ │ │ │ │ ├── custom_message.dart │ │ │ │ │ │ └── custom_msg_att.dart │ │ │ │ │ ├── empty_message.dart │ │ │ │ │ ├── file_message │ │ │ │ │ │ ├── file_message.dart │ │ │ │ │ │ └── message_file_data.dart │ │ │ │ │ ├── image_message │ │ │ │ │ │ ├── image_message.dart │ │ │ │ │ │ └── message_image_data.dart │ │ │ │ │ ├── info_message │ │ │ │ │ │ ├── info_message.dart │ │ │ │ │ │ └── msg_info_att.dart │ │ │ │ │ ├── location_message │ │ │ │ │ │ ├── location_message.dart │ │ │ │ │ │ └── v_location_message_data.dart │ │ │ │ │ ├── message_upload_model.dart │ │ │ │ │ ├── text_message │ │ │ │ │ │ └── text_message.dart │ │ │ │ │ ├── v_message.dart │ │ │ │ │ ├── v_message_status_model.dart │ │ │ │ │ ├── video_message │ │ │ │ │ │ ├── message_video_data.dart │ │ │ │ │ │ └── video_message.dart │ │ │ │ │ └── voice_message │ │ │ │ │ │ ├── message_voice_data.dart │ │ │ │ │ │ └── voice_message.dart │ │ │ │ ├── v_pagination_model.dart │ │ │ │ ├── v_room │ │ │ │ │ ├── broadcast │ │ │ │ │ │ ├── my_broadcast_info.dart │ │ │ │ │ │ └── v_broadcast_member.dart │ │ │ │ │ ├── export_v_room.dart │ │ │ │ │ ├── group │ │ │ │ │ │ ├── v_group_member.dart │ │ │ │ │ │ └── v_my_group_info.dart │ │ │ │ │ ├── online_offline_model.dart │ │ │ │ │ ├── v_my_order_info.dart │ │ │ │ │ └── v_room.dart │ │ │ │ ├── v_to_chat_chat_settings_model.dart │ │ │ │ ├── v_user │ │ │ │ │ ├── v_base_user.dart │ │ │ │ │ ├── v_user.dart │ │ │ │ │ └── v_user_image.dart │ │ │ │ └── web_meta_data.dart │ │ │ ├── native_api │ │ │ │ ├── local │ │ │ │ │ ├── native_local_cache.dart │ │ │ │ │ ├── native_local_message.dart │ │ │ │ │ └── native_local_room.dart │ │ │ │ ├── native.dart │ │ │ │ ├── remote │ │ │ │ │ ├── native_remote_auth.dart │ │ │ │ │ └── native_remote_socket.dart │ │ │ │ ├── streams │ │ │ │ │ └── v_streams.dart │ │ │ │ └── v_native_api.dart │ │ │ ├── service │ │ │ │ ├── call_listener.dart │ │ │ │ ├── controller_helper.dart │ │ │ │ ├── events_daemon.dart │ │ │ │ ├── message_queue.dart │ │ │ │ ├── notification_listener.dart │ │ │ │ ├── offline_online_emitter_service.dart │ │ │ │ ├── re_send_daemon.dart │ │ │ │ ├── room_tracker.dart │ │ │ │ ├── service.dart │ │ │ │ └── v_app_lifecycle_state.dart │ │ │ ├── user_apis │ │ │ │ ├── auth │ │ │ │ │ └── auth.dart │ │ │ │ ├── block │ │ │ │ │ └── block.dart │ │ │ │ └── room │ │ │ │ │ └── room.dart │ │ │ ├── utils │ │ │ │ ├── api_constants.dart │ │ │ │ ├── app_pref.dart │ │ │ │ ├── device_info.dart │ │ │ │ ├── enums.dart │ │ │ │ ├── regex.dart │ │ │ │ ├── stream_utils.dart │ │ │ │ ├── string_utils.dart │ │ │ │ ├── utils.dart │ │ │ │ ├── v_async_widgets_builder.dart │ │ │ │ ├── v_message_constants.dart │ │ │ │ ├── v_message_encryption.dart │ │ │ │ └── v_safe_api_call.dart │ │ │ ├── v_chat_controller.dart │ │ │ └── widgets │ │ │ │ ├── auto_direction.dart │ │ │ │ ├── text_parser_widget.dart │ │ │ │ └── widgets.dart │ │ └── v_chat_sdk_core.dart │ ├── pubspec.yaml │ └── test │ │ └── v_chat_sdk_core_test.dart └── v_chat_sdk_sample │ ├── .gitignore │ ├── .metadata │ ├── README.md │ ├── analysis_options.yaml │ ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── google-services.json │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── vchatsdk │ │ │ │ │ └── app │ │ │ │ │ └── v_chat_sdk_sample │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle │ ├── assets │ └── images │ │ ├── facebook.png │ │ ├── facebook_logo.png │ │ ├── google.png │ │ ├── ic_launcher_round.png │ │ ├── logo.png │ │ ├── placeholder.jpg │ │ └── welcome_image.png │ ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-50x50@1x.png │ │ │ │ ├── Icon-App-50x50@2x.png │ │ │ │ ├── Icon-App-57x57@1x.png │ │ │ │ ├── Icon-App-57x57@2x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-72x72@1x.png │ │ │ │ ├── Icon-App-72x72@2x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── GoogleService-Info.plist │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h │ ├── RunnerTests │ │ └── RunnerTests.swift │ └── firebase_app_id_file.json │ ├── lib │ ├── app │ │ ├── core │ │ │ ├── app_service.dart │ │ │ ├── clould │ │ │ │ ├── cloud_fire_upload.dart │ │ │ │ └── cloud_firestore_api.dart │ │ │ ├── enums.dart │ │ │ ├── lazy_inject.dart │ │ │ ├── models │ │ │ │ ├── order.model.dart │ │ │ │ ├── product.model.dart │ │ │ │ └── user.model.dart │ │ │ ├── repository │ │ │ │ ├── order.repository.dart │ │ │ │ ├── product.repository.dart │ │ │ │ └── user.repository.dart │ │ │ ├── user_filter_dto.dart │ │ │ ├── utils │ │ │ │ ├── app_auth.dart │ │ │ │ ├── app_localization.dart │ │ │ │ └── app_pref.dart │ │ │ └── widgets │ │ │ │ ├── app_btn.dart │ │ │ │ ├── async_widgets_builder.dart │ │ │ │ └── chat_btn.dart │ │ ├── modules │ │ │ ├── about │ │ │ │ ├── bindings │ │ │ │ │ └── about_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── about_controller.dart │ │ │ │ └── views │ │ │ │ │ └── about_view.dart │ │ │ ├── auth │ │ │ │ └── register │ │ │ │ │ ├── bindings │ │ │ │ │ └── register_binding.dart │ │ │ │ │ ├── controllers │ │ │ │ │ └── register_controller.dart │ │ │ │ │ └── views │ │ │ │ │ └── register_view.dart │ │ │ ├── broadcast_members │ │ │ │ ├── bindings │ │ │ │ │ └── broadcast_members_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── broadcast_members_controller.dart │ │ │ │ └── views │ │ │ │ │ └── broadcast_members_view.dart │ │ │ ├── broadcast_settings │ │ │ │ ├── bindings │ │ │ │ │ └── broadcast_settings_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── broadcast_settings_controller.dart │ │ │ │ └── views │ │ │ │ │ └── broadcast_settings_view.dart │ │ │ ├── choose_members │ │ │ │ ├── bindings │ │ │ │ │ └── choose_members_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── choose_members_controller.dart │ │ │ │ └── views │ │ │ │ │ └── choose_members_view.dart │ │ │ ├── create_broadcast │ │ │ │ ├── bindings │ │ │ │ │ └── create_broadcast_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── create_broadcast_controller.dart │ │ │ │ └── views │ │ │ │ │ └── create_broadcast_view.dart │ │ │ ├── create_group │ │ │ │ ├── bindings │ │ │ │ │ └── create_group_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── create_group_controller.dart │ │ │ │ └── views │ │ │ │ │ └── create_group_view.dart │ │ │ ├── create_product │ │ │ │ ├── bindings │ │ │ │ │ └── create_product_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── create_product_controller.dart │ │ │ │ └── views │ │ │ │ │ └── create_product_view.dart │ │ │ ├── edit_profile │ │ │ │ ├── bindings │ │ │ │ │ └── edit_profile_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── edit_profile_controller.dart │ │ │ │ └── views │ │ │ │ │ └── edit_profile_view.dart │ │ │ ├── group_members │ │ │ │ ├── bindings │ │ │ │ │ └── group_members_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── group_members_controller.dart │ │ │ │ └── views │ │ │ │ │ └── group_members_view.dart │ │ │ ├── group_settings │ │ │ │ ├── bindings │ │ │ │ │ └── group_settings_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── group_settings_controller.dart │ │ │ │ └── views │ │ │ │ │ └── group_settings_view.dart │ │ │ ├── home_tabs │ │ │ │ ├── chats_tab │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── chats_tab_controller.dart │ │ │ │ │ ├── views │ │ │ │ │ │ └── chats_tab_view.dart │ │ │ │ │ └── web_chat_scaffold.dart │ │ │ │ ├── explore_tab │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── explore_tab_controller.dart │ │ │ │ │ └── views │ │ │ │ │ │ ├── explore_tab_view.dart │ │ │ │ │ │ └── product_item.dart │ │ │ │ ├── home │ │ │ │ │ ├── bindings │ │ │ │ │ │ └── home_binding.dart │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── home_controller.dart │ │ │ │ │ └── views │ │ │ │ │ │ └── home_view.dart │ │ │ │ ├── settings_tab │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── settings_tab_controller.dart │ │ │ │ │ ├── models.dart │ │ │ │ │ └── views │ │ │ │ │ │ ├── settings_tab_view.dart │ │ │ │ │ │ └── widgets │ │ │ │ │ │ └── profile_item.dart │ │ │ │ └── users_tab │ │ │ │ │ ├── controllers │ │ │ │ │ └── users_tab_controller.dart │ │ │ │ │ └── views │ │ │ │ │ └── users_tab_view.dart │ │ │ ├── message_page │ │ │ │ └── message_page.dart │ │ │ ├── my_orders │ │ │ │ ├── bindings │ │ │ │ │ └── my_orders_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── my_orders_controller.dart │ │ │ │ └── views │ │ │ │ │ └── my_orders_view.dart │ │ │ ├── on_boarding │ │ │ │ ├── bindings │ │ │ │ │ └── on_boarding_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── on_boarding_controller.dart │ │ │ │ └── views │ │ │ │ │ └── on_boarding_view.dart │ │ │ ├── peer_profile │ │ │ │ ├── bindings │ │ │ │ │ └── peer_profile_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── peer_profile_controller.dart │ │ │ │ └── views │ │ │ │ │ └── peer_profile_view.dart │ │ │ ├── product_details │ │ │ │ ├── bindings │ │ │ │ │ └── product_details_binding.dart │ │ │ │ ├── controllers │ │ │ │ │ └── product_details_controller.dart │ │ │ │ └── views │ │ │ │ │ └── product_details_view.dart │ │ │ └── splash │ │ │ │ ├── bindings │ │ │ │ └── splash_binding.dart │ │ │ │ ├── controllers │ │ │ │ └── splash_controller.dart │ │ │ │ └── views │ │ │ │ └── splash_view.dart │ │ ├── routes │ │ │ ├── app_pages.dart │ │ │ └── app_routes.dart │ │ └── v_chat │ │ │ ├── app_pick.dart │ │ │ ├── auto_direction.dart │ │ │ ├── conditional_builder.dart │ │ │ ├── extension.dart │ │ │ ├── platform_cache_image_widget.dart │ │ │ ├── string_utils.dart │ │ │ ├── v_app_alert.dart │ │ │ ├── v_async_widgets_builder.dart │ │ │ ├── v_chat_avatar_image.dart │ │ │ ├── v_circle_avatar.dart │ │ │ ├── v_enums.dart │ │ │ ├── v_file.dart │ │ │ ├── v_image_viewer.dart │ │ │ ├── v_safe_api_call.dart │ │ │ ├── v_search_app_bare.dart │ │ │ └── v_video_player.dart │ ├── firebase_options.dart │ ├── generated │ │ ├── intl │ │ │ ├── messages_all.dart │ │ │ ├── messages_ar.dart │ │ │ └── messages_en.dart │ │ └── l10n.dart │ ├── l10n │ │ ├── intl_ar.arb │ │ └── intl_en.arb │ ├── main.dart │ └── v_chat_config.dart │ ├── linux │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ │ ├── CMakeLists.txt │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ ├── main.cc │ ├── my_application.cc │ └── my_application.h │ ├── macos │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── app_icon_1024.png │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ └── app_icon_64.png │ │ ├── Base.lproj │ │ │ └── MainMenu.xib │ │ ├── Configs │ │ │ ├── AppInfo.xcconfig │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── Warnings.xcconfig │ │ ├── DebugProfile.entitlements │ │ ├── GoogleService-Info.plist │ │ ├── Info.plist │ │ ├── MainFlutterWindow.swift │ │ └── Release.entitlements │ ├── RunnerTests │ │ └── RunnerTests.swift │ └── firebase_app_id_file.json │ ├── pubspec.lock │ ├── pubspec.yaml │ ├── pubspec_overrides.yaml │ ├── test │ └── widget_test.dart │ ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── index.html │ └── manifest.json │ ├── windows │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ │ ├── CMakeLists.txt │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ └── runner │ │ ├── CMakeLists.txt │ │ ├── Runner.rc │ │ ├── flutter_window.cpp │ │ ├── flutter_window.h │ │ ├── main.cpp │ │ ├── resource.h │ │ ├── resources │ │ └── app_icon.ico │ │ ├── runner.exe.manifest │ │ ├── utils.cpp │ │ ├── utils.h │ │ ├── win32_window.cpp │ │ └── win32_window.h │ └── x.json ├── header_template.txt ├── melos.yaml ├── pubspec.lock ├── pubspec.yaml ├── push_providers ├── v_chat_firebase_fcm │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── analysis_options.yaml │ ├── example │ │ └── main.dart │ ├── lib │ │ ├── src │ │ │ ├── app_pref.dart │ │ │ └── v_chat_fcm_provider.dart │ │ └── v_chat_firebase_fcm.dart │ ├── pubspec.yaml │ ├── pubspec_overrides.yaml │ └── test │ │ └── v_chat_firebase_fcm_test.dart └── v_chat_one_signal │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── analysis_options.yaml │ ├── example │ └── main.dart │ ├── lib │ ├── src │ │ └── one_signal_push.dart │ └── v_chat_one_signal.dart │ ├── pubspec.yaml │ └── pubspec_overrides.yaml └── v_ui_packages ├── v_chat_message_page ├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example │ └── main.dart ├── lib │ ├── src │ │ ├── agora │ │ │ ├── core │ │ │ │ ├── agora_user.dart │ │ │ │ ├── call_navigator.dart │ │ │ │ ├── call_state.dart │ │ │ │ ├── v_call_localization.dart │ │ │ │ └── v_caller_state.dart │ │ │ ├── pages │ │ │ │ ├── call │ │ │ │ │ ├── call_page.dart │ │ │ │ │ └── call_page_without_agora.dart │ │ │ │ ├── pick_up │ │ │ │ │ └── pick_up.dart │ │ │ │ └── widgets │ │ │ │ │ ├── agora_video_layout.dart │ │ │ │ │ ├── agora_video_view.dart │ │ │ │ │ ├── call_actions_row.dart │ │ │ │ │ ├── timer_widget.dart │ │ │ │ │ └── user_icon_widget.dart │ │ │ └── v_agora.dart │ │ ├── assets │ │ │ └── data │ │ │ │ ├── api_messages.dart │ │ │ │ ├── local_messages.dart │ │ │ │ └── local_rooms.dart │ │ ├── core │ │ │ ├── core.dart │ │ │ ├── enums.dart │ │ │ ├── extension.dart │ │ │ ├── extentions.dart │ │ │ ├── message_nav.dart │ │ │ ├── stream_mixin.dart │ │ │ ├── types.dart │ │ │ ├── v_downloader_service.dart │ │ │ └── v_message_localization.dart │ │ ├── models │ │ │ ├── app_bare_state_model.dart │ │ │ ├── input_state_model.dart │ │ │ ├── message_config.dart │ │ │ └── models.dart │ │ ├── page │ │ │ ├── message_pages │ │ │ │ ├── controllers │ │ │ │ │ ├── message_sender_controller.dart │ │ │ │ │ ├── message_stream_state_controller.dart │ │ │ │ │ ├── v_base_message_controller.dart │ │ │ │ │ ├── v_message_item_controller.dart │ │ │ │ │ └── v_voice_controller.dart │ │ │ │ ├── pages │ │ │ │ │ ├── broadcast │ │ │ │ │ │ ├── broadcast_app_bar_controller.dart │ │ │ │ │ │ ├── v_broadcast_controller.dart │ │ │ │ │ │ └── v_broadcast_view.dart │ │ │ │ │ ├── group │ │ │ │ │ │ ├── group_app_bar_controller.dart │ │ │ │ │ │ ├── group_controller.dart │ │ │ │ │ │ └── group_view.dart │ │ │ │ │ ├── order │ │ │ │ │ │ ├── order_app_bar_controller.dart │ │ │ │ │ │ ├── v_order_controller.dart │ │ │ │ │ │ └── v_order_view.dart │ │ │ │ │ └── single │ │ │ │ │ │ ├── single_app_bar_controller.dart │ │ │ │ │ │ ├── v_single_controller.dart │ │ │ │ │ │ └── v_single_view.dart │ │ │ │ ├── pasteboard │ │ │ │ │ ├── file_convertor.dart │ │ │ │ │ └── pasteboard.dart │ │ │ │ ├── providers │ │ │ │ │ └── message_provider.dart │ │ │ │ ├── states │ │ │ │ │ ├── block_state_controller.dart │ │ │ │ │ ├── input_state_controller.dart │ │ │ │ │ └── message_state │ │ │ │ │ │ └── message_state_controller.dart │ │ │ │ ├── v_message_page.dart │ │ │ │ └── widget_states │ │ │ │ │ ├── input_widget_state.dart │ │ │ │ │ └── message_body_state_widget.dart │ │ │ └── message_status │ │ │ │ ├── broadcast │ │ │ │ ├── message_broadcast_status_controller.dart │ │ │ │ └── message_broadcast_status_page.dart │ │ │ │ ├── group │ │ │ │ ├── message_group_status_controller.dart │ │ │ │ └── message_group_status_page.dart │ │ │ │ └── single │ │ │ │ ├── message_single_status_controller.dart │ │ │ │ └── message_single_status_page.dart │ │ ├── theme │ │ │ ├── message_item_theme.dart │ │ │ ├── theme.dart │ │ │ ├── v_inherited_message_theme.dart │ │ │ ├── v_message_theme.dart │ │ │ ├── v_message_theme_exc.dart │ │ │ └── v_msg_status_theme.dart │ │ ├── v_chat │ │ │ ├── app_pref.dart │ │ │ ├── auto_direction.dart │ │ │ ├── conditional_builder.dart │ │ │ ├── platform_cache_image_widget.dart │ │ │ ├── string_utils.dart │ │ │ ├── v_app_alert.dart │ │ │ ├── v_async_widgets_builder.dart │ │ │ ├── v_chat_avatar_image.dart │ │ │ ├── v_circle_avatar.dart │ │ │ ├── v_enums.dart │ │ │ ├── v_file.dart │ │ │ ├── v_image_viewer.dart │ │ │ ├── v_message_constants.dart │ │ │ ├── v_safe_api_call.dart │ │ │ ├── v_search_app_bare.dart │ │ │ ├── v_socket_status_widget.dart │ │ │ └── v_video_player.dart │ │ ├── v_message.dart │ │ └── widgets │ │ │ ├── app_bare │ │ │ └── v_message_app_bare.dart │ │ │ ├── arrow_down.dart │ │ │ ├── drag_drop_if_web_desk.dart │ │ │ ├── input_widgets │ │ │ ├── ban_widget.dart │ │ │ └── reply_msg_widget.dart │ │ │ ├── message_items │ │ │ ├── shared │ │ │ │ ├── bubble │ │ │ │ │ ├── bubble_normal.dart │ │ │ │ │ ├── bubble_special_one.dart │ │ │ │ │ └── swipe_to_reply.dart │ │ │ │ ├── center_item_holder.dart │ │ │ │ ├── constraint_image.dart │ │ │ │ ├── direction_item_holder.dart │ │ │ │ ├── forward_item_widget.dart │ │ │ │ ├── group_header.dart │ │ │ │ ├── message_broadcast_icon.dart │ │ │ │ ├── message_status_icon.dart │ │ │ │ ├── message_time_widget.dart │ │ │ │ ├── message_typing_widget.dart │ │ │ │ ├── reply_item_widget.dart │ │ │ │ ├── rounded_container.dart │ │ │ │ └── text_parser_widget.dart │ │ │ ├── v_message_item.dart │ │ │ └── widgets │ │ │ │ ├── all_deleted_item.dart │ │ │ │ ├── call_message_item.dart │ │ │ │ ├── date_divider_item.dart │ │ │ │ ├── file_message_item.dart │ │ │ │ ├── image_message_item.dart │ │ │ │ ├── location_message_item.dart │ │ │ │ ├── t.dart │ │ │ │ ├── text_message_item.dart │ │ │ │ ├── video_message_item.dart │ │ │ │ └── voice_message_item.dart │ │ │ └── widgets.dart │ └── v_chat_message_page.dart ├── pubspec.yaml ├── pubspec_overrides.yaml └── test │ └── v_chat_message_page_test.dart └── v_chat_room_page ├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example └── main.dart ├── lib ├── src │ ├── assets │ │ └── data │ │ │ ├── api_messages.dart │ │ │ ├── api_rooms.dart │ │ │ ├── local_messages.dart │ │ │ └── local_rooms.dart │ └── room │ │ ├── pages │ │ ├── choose_rooms │ │ │ ├── choose_room_controller.dart │ │ │ └── choose_rooms_page.dart │ │ └── room_page │ │ │ ├── room_item_controller.dart │ │ │ ├── room_provider.dart │ │ │ ├── states │ │ │ └── room_state_controller.dart │ │ │ ├── v_room_controller.dart │ │ │ └── v_room_page.dart │ │ ├── room.dart │ │ ├── shared │ │ ├── colored_circle_container.dart │ │ ├── enums.dart │ │ ├── extension.dart │ │ ├── extentions.dart │ │ ├── room_nav.dart │ │ ├── shared.dart │ │ ├── stream_mixin.dart │ │ ├── theme │ │ │ ├── theme.dart │ │ │ ├── v_msg_status_theme.dart │ │ │ └── v_room_theme.dart │ │ ├── v_app_alert.dart │ │ ├── v_chat_avatar_image.dart │ │ ├── v_circle_avatar.dart │ │ ├── v_message_constants.dart │ │ ├── v_room_trans.dart │ │ └── v_safe_api_call.dart │ │ └── widgets │ │ ├── room_item │ │ ├── message_status_icon.dart │ │ └── v_room_item.dart │ │ ├── room_item_builder │ │ ├── chat_last_msg_time.dart │ │ ├── chat_mute_widget.dart │ │ ├── chat_title.dart │ │ ├── chat_typing_widget.dart │ │ ├── chat_un_read_counter.dart │ │ └── room_item_msg.dart │ │ ├── v_socket_status_widget.dart │ │ └── widgets.dart └── v_chat_room_page.dart ├── pubspec.yaml ├── pubspec_overrides.yaml └── test └── v_chat_room_page_test.dart /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 2.0.0 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 hatemragab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish,and 9 | to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | You don't have right to re sell this Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | - initial release. 3 | ## 0.6.0 4 | - add package apis 5 | ## 1.0.0 6 | - Support Dart 3 -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 hatemragab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish,and 9 | to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | You don't have right to re sell this Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | 4 | # You might want to exclude auto-generated files from dart analysis 5 | analyzer: 6 | exclude: 7 | - receive_share_example/** 8 | - ./receive_share_example 9 | - '**.g.dart' 10 | 11 | 12 | # You can customize the lint rules set to your own liking. A list of all rules 13 | # can be found at https://dart-lang.github.io/linter/lints/options/options.html 14 | linter: 15 | rules: 16 | # Util classes are awesome! 17 | # avoid_classes_with_only_static_members: false 18 | 19 | # Make constructors the first thing in every class 20 | # sort_constructors_first: true 21 | 22 | # Choose wisely, but you don't have to 23 | # prefer_double_quotes: true 24 | # prefer_single_quotes: true 25 | -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/example/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: v_chat_receive_share 2 | description: v chat receive share will make your app support share from other apps 3 | version: 2.1.0 4 | homepage: https://v-chat-sdk.github.io/vchat-v2-docs/docs/intro 5 | issue_tracker: https://github.com/hatemragab/v_chat_sdk/issues 6 | repository: https://github.com/hatemragab/v_chat_sdk/tree/master/v_shared_packages/v_chat_receive_share 7 | 8 | environment: 9 | sdk: '>=2.17.0 <4.0.0' 10 | flutter: ">=1.17.0" 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | v_chat_sdk_core: ^2.1.0 16 | share_handler: ^0.0.21 17 | v_chat_media_editor: ^2.0.0 18 | v_platform: ^2.0.0 19 | intl: ^0.19.0 20 | dev_dependencies: 21 | flutter_test: 22 | sdk: flutter 23 | flutter_lints: ^4.0.0 24 | lints: ^4.0.0 25 | 26 | 27 | flutter: 28 | 29 | platforms: 30 | android: 31 | ios: 32 | web: 33 | windows: 34 | macos: 35 | -------------------------------------------------------------------------------- /core_packages/v_chat_receive_share/pubspec_overrides.yaml: -------------------------------------------------------------------------------- 1 | # melos_managed_dependency_overrides: v_chat_sdk_core 2 | dependency_overrides: 3 | v_chat_sdk_core: 4 | path: ../v_chat_sdk_core 5 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 2.1.0 2 | - Support video and voice calls 3 | ## 2.0.0 4 | - Support flutter v 3.22 and above 5 | 6 | ## 1.4.0 7 | - Support more native apis for control the chat 8 | ## 1.1.0 9 | 10 | - update translation system 11 | 12 | ## 1.0.0 13 | 14 | - Support Dart 3 15 | - ## 0.8.0+1 16 | - add muteRoomNotification and unMuteRoomNotification apis for RoomApi class 17 | - ## 0.8.0 18 | - update dependency 19 | - ## 0.7.1 20 | - support windows os 21 | - ## 0.7.0 22 | - support macos 23 | - ## 0.6.0 24 | - add all apis 25 | - ## 0.5.0 26 | - support voice and video calls 27 | 28 | ## 0.4.0 29 | 30 | - full localization support 31 | 32 | ## 0.3.0 33 | 34 | - add web support 35 | 36 | ## 0.0.2 37 | 38 | * initial release. 39 | 40 | ## 0.0.3 41 | 42 | * update chopper tp v 6 43 | 44 | ## 0.1.0 45 | 46 | * update v utils add almost all apis 47 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 hatemragab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish,and 9 | to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | You don't have right to re sell this Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer to use the lint rule set from `package:lint` 2 | include: package:lint/package.yaml # Use this for packages with public API 3 | 4 | 5 | # You might want to exclude auto-generated files from dart analysis 6 | analyzer: 7 | exclude: 8 | - ./example 9 | - '**.g.dart' 10 | 11 | 12 | # You can customize the lint rules set to your own liking. A list of all rules 13 | # can be found at https://dart-lang.github.io/linter/lints/options/options.html 14 | linter: 15 | rules: 16 | 17 | # Util classes are awesome! 18 | # avoid_classes_with_only_static_members: false 19 | avoid_classes_with_only_static_members: false 20 | prefer_constructors_over_static_methods: false 21 | use_build_context_synchronously: false 22 | 23 | # Make constructors the first thing in every class 24 | # sort_constructors_first: true 25 | 26 | # Choose wisely, but you don't have to 27 | # prefer_double_quotes: true 28 | # prefer_single_quotes: true -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/example/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/events/app_life_cycle.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/models/v_app_event.dart'; 6 | 7 | class VAppLifeCycle extends VAppEvent { 8 | final bool isGoBackground; 9 | 10 | const VAppLifeCycle({ 11 | required this.isGoBackground, 12 | }); 13 | 14 | @override 15 | List get props => [isGoBackground]; 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/events/event_bus.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:event_bus_plus/res/event_bus.dart'; 6 | 7 | /// vEventBus is a singleton instance of [EventBus] for v chat service 8 | abstract class VEventBusSingleton { 9 | static EventBus vEventBus = EventBus(); 10 | } 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/events/events.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | // export './app_life_cycle.dart'; 6 | export './event_bus.dart'; 7 | export './socket_status_event.dart'; 8 | export './v_call_events.dart'; 9 | export './v_message_events.dart'; 10 | export './v_notifications_events.dart'; 11 | export './v_room_events.dart'; 12 | export './v_socket_interval.dart'; 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/events/socket_status_event.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/models/v_app_event.dart'; 6 | 7 | class VSocketStatusEvent extends VAppEvent { 8 | final bool isConnected; 9 | final int connectTimes; 10 | 11 | const VSocketStatusEvent({ 12 | required this.isConnected, 13 | required this.connectTimes, 14 | }); 15 | 16 | @override 17 | List get props => [isConnected, connectTimes]; 18 | } 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/events/v_app_event.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:event_bus_plus/res/app_event.dart'; 6 | 7 | ///parent class for all app events 8 | abstract class VAppEvent extends AppEvent { 9 | const VAppEvent(); 10 | } 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/events/v_socket_interval.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/models/v_app_event.dart'; 6 | 7 | class VSocketIntervalEvent extends VAppEvent { 8 | @override 9 | List get props => [DateTime.now().microsecondsSinceEpoch]; 10 | } 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/exceptions/exceptions.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './http/http.dart'; 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/exceptions/http/http.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | // export './v_chat_http_exception.dart'; 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/http/abstraction/abstraction.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './auth_abs.dart'; 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/http/abstraction/auth_abs.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'dart:ui'; 6 | 7 | import 'package:v_chat_sdk_core/src/models/v_user/v_base_user.dart'; 8 | import 'package:v_platform/v_platform.dart'; 9 | 10 | abstract class AuthEndPoints { 11 | Future connect({ 12 | required String identifier, 13 | required String fullName, 14 | VPlatformFile? image, 15 | required Locale deviceLanguage, 16 | }); 17 | 18 | Future logout(); 19 | } 20 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/http/api_service/api_service.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './auth/auth_api_service.dart'; 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/http/dto/dto.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './create_broadcast_dto.dart'; 6 | export './create_group_dto.dart'; 7 | export './v_chat_register_dto.dart'; 8 | export './v_room_messages_dto.dart'; 9 | export './v_rooms_dto.dart'; 10 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/http/http.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export '././dto/dto.dart'; 6 | export './api_service/api_service.dart'; 7 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/local_db/core/abstraction/base_local_api_cache_repo.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/models/api_cache_model.dart'; 6 | 7 | abstract class BaseLocalApiCacheRepo { 8 | Future insert(ApiCacheModel model); 9 | 10 | Future getOneByEndPoint(String endpoint); 11 | 12 | Future reCreate(); 13 | } 14 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/local_db/core/imp/api_cache/api_cache_keys.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | abstract class ApiCacheKeys { 6 | static const mySingleInfo = "api/single/id/my-info/"; 7 | static const myGroupInfo = "api/group/id/my-info/"; 8 | static const myBroadcastInfo = "api/broadcast/id/my-info/"; 9 | static const groupIdInfo = "api/group/id/info/"; 10 | static const singleIdInfo = "api/single/id/info/"; 11 | static const usersSearch = "api/users/search"; 12 | } 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/local_db/core/imp/api_cache/api_cache_memory_imp.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/local_db/core/abstraction/base_local_api_cache_repo.dart'; 6 | import 'package:v_chat_sdk_core/src/models/api_cache_model.dart'; 7 | 8 | class ApiCacheMemoryImp extends BaseLocalApiCacheRepo { 9 | // final _apiCaches = >[]; 10 | 11 | @override 12 | Future getOneByEndPoint(String endpoint) { 13 | return Future.value(); 14 | } 15 | 16 | @override 17 | Future insert(ApiCacheModel model) { 18 | return Future.value(1); 19 | } 20 | 21 | @override 22 | Future reCreate() { 23 | return Future.value(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/local_db/tables/api_cache_table.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:sqflite/sqflite.dart'; 6 | 7 | abstract class ApiCacheTable { 8 | static const tableName = 'api_'; 9 | static const columnId = '${tableName}id'; 10 | static const columnJsonValue = '${tableName}json_value'; 11 | 12 | static Future recreateTable(Transaction db) async { 13 | await db.execute( 14 | ''' 15 | drop table if exists $tableName 16 | ''', 17 | ); 18 | await ApiCacheTable.createTable(db); 19 | } 20 | 21 | static Future createTable(Transaction db) async { 22 | await db.execute( 23 | ''' 24 | create table $tableName ( 25 | $columnId TEXT PRIMARY KEY UNIQUE , 26 | $columnJsonValue TEXT 27 | ) 28 | ''', 29 | ); 30 | 31 | await db.execute( 32 | ''' 33 | CREATE INDEX idx_id_$tableName 34 | ON $tableName ($columnId) 35 | ''', 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/logger/v_logger.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | 7 | abstract class VChatLogger { 8 | static String name = "V_CHAT_SDK_V2"; 9 | 10 | static void red(String text) { 11 | if (kDebugMode) { 12 | print( 13 | '\x1B[31m$text\x1B[0m', 14 | ); 15 | } 16 | } 17 | 18 | static void green(String text) { 19 | if (kDebugMode) { 20 | print( 21 | '\x1B[32m$text\x1B[0m', 22 | ); 23 | } 24 | } 25 | 26 | static void yellow(String text) { 27 | if (kDebugMode) { 28 | print( 29 | '\x1B[33m$text\x1B[0m', 30 | ); 31 | } 32 | } 33 | 34 | static void blue(String text) { 35 | if (kDebugMode) { 36 | print( 37 | '\x1B[34m$text\x1B[0m', 38 | ); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/call/agora_connect_model.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | class VAgoraConnect { 6 | final String channelName; 7 | final int uid; 8 | final String rtcToken; 9 | final String joinedAt; 10 | 11 | // 12 | const VAgoraConnect({ 13 | required this.channelName, 14 | required this.uid, 15 | required this.rtcToken, 16 | required this.joinedAt, 17 | }); 18 | 19 | @override 20 | String toString() { 21 | return 'VAgoraConnect{channelName: $channelName, uid: $uid, rtcToken: $rtcToken, joinedAt: $joinedAt}'; 22 | } 23 | 24 | Map toMap() { 25 | return { 26 | 'channelName': channelName, 27 | 'uid': uid, 28 | 'rtcToken': rtcToken, 29 | 'joinedAt': joinedAt, 30 | }; 31 | } 32 | 33 | factory VAgoraConnect.fromMap(Map map) { 34 | return VAgoraConnect( 35 | channelName: map['channelName'] as String, 36 | uid: int.parse(map['uid'].toString(), radix: 10), 37 | rtcToken: map['rtcToken'] as String, 38 | joinedAt: map['joinedAt'] as String, 39 | ); 40 | } 41 | 42 | // 43 | } 44 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/call/call.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './agora_connect_model.dart'; 6 | export './v_call_dto.dart'; 7 | export './v_call_history.dart'; 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/controller/config.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './v_chat_config.dart'; 6 | export './v_navigator.dart'; 7 | export './v_push_model.dart'; 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/current_room.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | class CurrentRoom { 6 | bool isActive; 7 | String roomId; 8 | 9 | CurrentRoom({ 10 | required this.isActive, 11 | required this.roomId, 12 | }); 13 | 14 | @override 15 | bool operator ==(Object other) => 16 | identical(this, other) || 17 | other is CurrentRoom && 18 | runtimeType == other.runtimeType && 19 | roomId == other.roomId; 20 | 21 | @override 22 | int get hashCode => roomId.hashCode; 23 | } 24 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/link_preview_data.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/models/v_message/image_message/message_image_data.dart'; 6 | 7 | class VLinkPreviewData { 8 | final VMessageImageData? image; 9 | final String? title; 10 | final String? desc; 11 | final String? link; 12 | 13 | const VLinkPreviewData({ 14 | this.image, 15 | this.title, 16 | this.desc, 17 | this.link, 18 | }); 19 | 20 | Map toMap() { 21 | return { 22 | 'image': image?.toMap(), 23 | 'title': title, 24 | 'desc': desc, 25 | 'link': link, 26 | }; 27 | } 28 | 29 | @override 30 | String toString() { 31 | return 'LinkPreviewData{image: $image, title: $title, desc: $desc, link: $link}'; 32 | } 33 | 34 | factory VLinkPreviewData.fromMap( 35 | Map map, 36 | ) { 37 | return VLinkPreviewData( 38 | image: map['image'] == null 39 | ? null 40 | : VMessageImageData.fromMap( 41 | map['image'] as Map, 42 | ), 43 | title: map['title'] as String?, 44 | desc: map['desc'] as String?, 45 | link: map['link'] as String?, 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './call/call.dart'; 6 | export './controller/config.dart'; 7 | export './current_room.dart'; 8 | export './link_preview_data.dart'; 9 | export './push_provider/push.dart'; 10 | export './socket/socket.dart'; 11 | export './v_base_filter.dart'; 12 | export './v_message/v_message.dart'; 13 | export './v_pagination_model.dart'; 14 | export './v_room/export_v_room.dart'; 15 | export './v_to_chat_chat_settings_model.dart'; 16 | export './v_user/v_user.dart'; 17 | export './web_meta_data.dart'; 18 | export 'v_app_event.dart'; 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/push_provider/push.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './v_chat_push_provider.dart'; 6 | export './v_push_config.dart'; 7 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/push_provider/v_push_config.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | class VLocalNotificationPushConfig { 6 | final String? channelName; 7 | 8 | const VLocalNotificationPushConfig({ 9 | this.channelName = "vchatsdk_channel", 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/socket/socket.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './new_call_model.dart'; 6 | export './on_aceept_call.dart'; 7 | export './on_ban_user_chat.dart'; 8 | export './on_deliver_room_messages_model.dart'; 9 | export './on_enter_room_model.dart'; 10 | export './room_typing_model.dart'; 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_app_event.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:event_bus_plus/event_bus_plus.dart'; 6 | 7 | abstract class VAppEvent extends AppEvent { 8 | const VAppEvent(); 9 | } 10 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_chat_base_exception.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | abstract class VChatBaseException implements Exception { 6 | final Object exception; 7 | final StackTrace? stack; 8 | 9 | VChatBaseException({ 10 | required this.exception, 11 | this.stack, 12 | }); 13 | 14 | @override 15 | String toString() { 16 | return exception.toString(); 17 | } 18 | } 19 | 20 | class VChatDartException extends VChatBaseException { 21 | VChatDartException({required super.exception}); 22 | } 23 | 24 | class VUserInternetException extends VChatBaseException { 25 | VUserInternetException({required super.exception}); 26 | } 27 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_mention_model.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | class VMentionModel { 6 | final String identifier; 7 | final String name; 8 | final String image; 9 | 10 | VMentionModel({ 11 | required this.identifier, 12 | required this.name, 13 | required this.image, 14 | }); 15 | 16 | Map toMap() { 17 | return { 18 | 'identifier': identifier, 19 | 'name': name, 20 | 'image': image, 21 | }; 22 | } 23 | 24 | factory VMentionModel.fromMap(Map map) { 25 | return VMentionModel( 26 | identifier: map['identifier'] as String, 27 | name: map['name'] as String, 28 | image: map['image'] as String, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_message/custom_message/custom_msg_att.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | class VCustomMsgData { 6 | ///Your custom data as a map 7 | final Map data; 8 | 9 | // 10 | 11 | VCustomMsgData({ 12 | required this.data, 13 | }); 14 | 15 | @override 16 | String toString() { 17 | return 'VCustomMsgAtt{data: $data}'; 18 | } 19 | 20 | Map toMap() { 21 | return { 22 | 'data': data, 23 | }; 24 | } 25 | 26 | factory VCustomMsgData.fromMap(Map map) { 27 | return VCustomMsgData( 28 | data: map['data'] as Map, 29 | ); 30 | } 31 | 32 | // 33 | } 34 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_message/v_message.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './base_message/v_base_message.dart'; 6 | export './call_message/call_message.dart'; 7 | export './call_message/msg_call_att.dart'; 8 | export './core/message_factory.dart'; 9 | export './custom_message/custom_message.dart'; 10 | export './custom_message/custom_msg_att.dart'; 11 | export './empty_message.dart'; 12 | export './file_message/file_message.dart'; 13 | export './file_message/message_file_data.dart'; 14 | export './image_message/image_message.dart'; 15 | export './image_message/message_image_data.dart'; 16 | export './info_message/info_message.dart'; 17 | export './info_message/msg_info_att.dart'; 18 | export './location_message/location_message.dart'; 19 | export './location_message/v_location_message_data.dart'; 20 | export './message_upload_model.dart'; 21 | export './text_message/text_message.dart'; 22 | export './v_message_status_model.dart'; 23 | export './video_message/message_video_data.dart'; 24 | export './video_message/video_message.dart'; 25 | export './voice_message/message_voice_data.dart'; 26 | export './voice_message/voice_message.dart'; 27 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_room/export_v_room.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './broadcast/my_broadcast_info.dart'; 6 | export './broadcast/v_broadcast_member.dart'; 7 | export './group/v_group_member.dart'; 8 | export './group/v_my_group_info.dart'; 9 | export './online_offline_model.dart'; 10 | export './v_my_order_info.dart'; 11 | export './v_room.dart'; 12 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_to_chat_chat_settings_model.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/models/models.dart'; 6 | 7 | class VToChatSettingsModel { 8 | final String title; 9 | final String image; 10 | final String roomId; 11 | final VRoom room; 12 | 13 | const VToChatSettingsModel({ 14 | required this.title, 15 | required this.image, 16 | required this.roomId, 17 | required this.room, 18 | }); 19 | 20 | @override 21 | String toString() { 22 | return 'VToChatSettingsModel{title: $title, image: $image, roomId: $roomId room $room}'; 23 | } 24 | 25 | VToChatSettingsModel copyWith({ 26 | String? title, 27 | String? image, 28 | String? roomId, 29 | VRoom? room, 30 | }) { 31 | return VToChatSettingsModel( 32 | title: title ?? this.title, 33 | image: image ?? this.image, 34 | roomId: roomId ?? this.roomId, 35 | room: room ?? this.room, 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/models/v_user/v_user.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './v_base_user.dart'; 6 | export './v_user.dart'; 7 | export './v_user_image.dart'; 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/native_api/local/native_local_cache.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:sqflite/sqlite_api.dart'; 6 | import 'package:v_chat_sdk_core/src/local_db/core/abstraction/base_local_api_cache_repo.dart'; 7 | import 'package:v_chat_sdk_core/src/local_db/core/imp/api_cache/api_cache_memory_imp.dart'; 8 | import 'package:v_chat_sdk_core/src/local_db/core/imp/api_cache/api_cache_sql_imp.dart'; 9 | import 'package:v_chat_sdk_core/src/models/api_cache_model.dart'; 10 | import 'package:v_platform/v_platform.dart'; 11 | 12 | class NativeLocalApiCache { 13 | late final BaseLocalApiCacheRepo _apiCacheRepo; 14 | 15 | NativeLocalApiCache(Database? database) { 16 | if (VPlatforms.isWeb) { 17 | _apiCacheRepo = ApiCacheMemoryImp(); 18 | } else { 19 | _apiCacheRepo = ApiCacheSqlImp(database!); 20 | } 21 | } 22 | 23 | Future insertToApiCache(ApiCacheModel model) async { 24 | return _apiCacheRepo.insert(model); 25 | } 26 | 27 | Future getOneApiCache(String endPoint) async { 28 | return _apiCacheRepo.getOneByEndPoint(endPoint); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/native_api/native.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './streams/v_streams.dart'; 6 | export './v_native_api.dart'; 7 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/native_api/remote/native_remote_auth.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | /// Represents the Native Remote Auth that manages authentication 8 | /// in the VChat application, using a remote API service. 9 | class NativeRemoteAuth { 10 | final VAuthApiService _authApiService; 11 | 12 | /// Creates a new instance of [NativeRemoteAuth]. 13 | /// 14 | /// Takes in an instance of [VAuthApiService] as a parameter. 15 | NativeRemoteAuth(this._authApiService); 16 | 17 | /// Connects to the remote API using the provided [dto] and returns 18 | /// the user identifier upon successful connection. 19 | Future connect(VChatRegisterDto dto) { 20 | return Future.value(_authApiService.connect(dto)); 21 | } 22 | 23 | /// Logs out from the remote API and returns a boolean indicating 24 | /// the success of the logout operation. 25 | Future logout() { 26 | return Future.value(_authApiService.logout()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/native_api/streams/v_streams.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | class VStreams { 8 | final _emitter = VEventBusSingleton.vEventBus; 9 | 10 | Stream get messageStream => _emitter.on(); 11 | 12 | Stream get socketStatusStream => 13 | _emitter.on(); 14 | 15 | Stream get totalUnreadMessageCountStream => 16 | _emitter.on(); 17 | 18 | Stream get socketIntervalStream => 19 | _emitter.on(); 20 | 21 | Stream get roomStream => _emitter.on(); 22 | Stream get callStream => _emitter.on(); 23 | 24 | Stream get vOnNotificationsClickedStream => 25 | _emitter.on(); 26 | 27 | Stream get vOnNewNotificationStream => 28 | _emitter.on(); 29 | 30 | Stream get vOnUpdateNotificationsTokenStream => 31 | _emitter.on(); 32 | } 33 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/service/call_listener.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | class CallListener { 8 | final VNativeApi nativeApi; 9 | final VChatConfig vChatConfig; 10 | final VNavigator vNavigator; 11 | 12 | CallListener( 13 | this.nativeApi, 14 | this.vChatConfig, 15 | this.vNavigator, 16 | ) { 17 | _init(); 18 | } 19 | 20 | Future _init() async { 21 | await nativeApi.remote.socketIo.socketCompleter.future; 22 | VEventBusSingleton.vEventBus.on().listen((event) { 23 | if (event is VOnNewCallEvent) { 24 | return; 25 | } 26 | if (event is VCallTimeoutEvent) { 27 | return; 28 | } 29 | if (event is VCallAcceptedEvent) { 30 | return; 31 | } 32 | if (event is VCallEndedEvent) { 33 | return; 34 | } 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/service/offline_online_emitter_service.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | class OfflineOnlineEmitterService { 8 | final _emitter = VEventBusSingleton.vEventBus; 9 | 10 | void start() { 11 | _emitter.on().listen((e) { 12 | if (e.isOnline) { 13 | _handleOnlineEvent(e); 14 | } else { 15 | _handleOfflineEvent(e); 16 | } 17 | }); 18 | } 19 | 20 | void _handleOnlineEvent(VOnlineOfflineModel e) { 21 | // final isOnline = OnlineOfflineService.isUserOnlineByPeerId(e.peerId); 22 | //if (isOnline) return; 23 | // OnlineOfflineService.setUser(e); 24 | _emitter.fire(VRoomOnlineEvent(roomId: e.roomId)); 25 | } 26 | 27 | void _handleOfflineEvent(VOnlineOfflineModel e) { 28 | //we need to set this user offline 29 | // final isOffline = OnlineOfflineService.isUserOfflineByPeerId(e.peerId); 30 | // if (isOffline) return; 31 | // OnlineOfflineService.setUser(e); 32 | _emitter.fire(VRoomOfflineEvent(roomId: e.roomId)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/service/re_send_daemon.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | ///this class will ensure to resend all failed messages 8 | class ReSendDaemon with VSocketIntervalStream { 9 | final _messagesRef = VChatController.I.nativeApi.local.message; 10 | 11 | ReSendDaemon() { 12 | initSocketIntervalStream( 13 | VEventBusSingleton.vEventBus.on(), 14 | ); 15 | } 16 | 17 | void start() { 18 | onIntervalFire(); 19 | } 20 | 21 | @override 22 | Future onIntervalFire() async { 23 | final unSendMessages = await _messagesRef.getUnSendMessages(); 24 | for (final e in unSendMessages) { 25 | if (e is VTextMessage) { 26 | await MessageUploaderQueue.instance.addToQueue( 27 | await MessageFactory.createUploadMessage(e), 28 | ); 29 | } else { 30 | MessageUploaderQueue.instance.addToQueue( 31 | await MessageFactory.createUploadMessage(e), 32 | ); 33 | } 34 | } 35 | } 36 | 37 | void close() { 38 | closeSocketIntervalStream(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/service/service.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './message_queue.dart'; 6 | export './notification_listener.dart'; 7 | export './room_tracker.dart'; 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/user_apis/block/block.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/src/http/api_service/block/block_api_service.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | class Block { 9 | final VNativeApi _vNativeApi; 10 | 11 | VBlockApiService get _api => _vNativeApi.remote.block; 12 | 13 | Block( 14 | this._vNativeApi, 15 | ); 16 | 17 | Future blockUser({ 18 | required String peerIdentifier, 19 | }) async { 20 | return _api.blockUser(identifier: peerIdentifier); 21 | } 22 | 23 | Future checkIfThereBan({ 24 | required String peerIdentifier, 25 | }) async { 26 | return _api.checkIfThereBan(identifier: peerIdentifier); 27 | } 28 | 29 | Future unBlockUser({ 30 | required String peerIdentifier, 31 | }) async { 32 | return _api.unBlockUser(identifier: peerIdentifier); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/utils/regex.dart: -------------------------------------------------------------------------------- 1 | /// Regex to check if text is email. 2 | const regexEmail = r'([a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)'; 3 | 4 | /// Regex to check if content type is an image. 5 | const regexImageContentType = r'image\/*'; 6 | 7 | /// Regex to find all links in the text. 8 | const regexLink = 9 | r'((http|ftp|https):\/\/)?([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?'; 10 | 11 | final vMentionRegExp = RegExp(r"\[(@[^:]+):([^\]]+)\]"); 12 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/utils/stream_utils.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 8 | 9 | mixin VSocketStatusStream { 10 | StreamSubscription? _socketStatusStream; 11 | 12 | void initSocketStatusStream(Stream stream) { 13 | _socketStatusStream = stream.listen((event) { 14 | if (event.isConnected) { 15 | onSocketConnected(); 16 | } else { 17 | onSocketDisconnect(); 18 | } 19 | }); 20 | } 21 | 22 | void closeSocketStatusStream() { 23 | _socketStatusStream?.cancel(); 24 | } 25 | 26 | void onSocketConnected() {} 27 | 28 | void onSocketDisconnect() {} 29 | } 30 | 31 | mixin VSocketIntervalStream { 32 | late final StreamSubscription 33 | _socketIntervalStatusStream; 34 | 35 | void initSocketIntervalStream(Stream stream) { 36 | _socketIntervalStatusStream = stream.listen((event) { 37 | onIntervalFire(); 38 | }); 39 | } 40 | 41 | void closeSocketIntervalStream() { 42 | _socketIntervalStatusStream.cancel(); 43 | } 44 | 45 | void onIntervalFire(); 46 | } 47 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/utils/string_utils.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | abstract class VStringUtils { 6 | static final vMentionRegExp = RegExp(r"\[(@[^:]+):([^\]]+)\]"); 7 | 8 | static String parseVMentions( 9 | String txt, { 10 | bool withOutAt = false, 11 | }) { 12 | return txt.replaceAllMapped( 13 | VStringUtils.vMentionRegExp, 14 | (match) { 15 | final matchTxt = match.group(1)!; 16 | if (withOutAt) { 17 | return matchTxt.replaceFirst("@", ""); 18 | } 19 | return matchTxt; 20 | }, 21 | ); 22 | } 23 | 24 | static String printDuration(Duration duration) { 25 | String twoDigits(int n) => n.toString().padLeft(2, "0"); 26 | final twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60)); 27 | final twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60)); 28 | return "$twoDigitMinutes:$twoDigitSeconds"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/utils/utils.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export '../models/controller/v_chat_config.dart'; 6 | // export './api_constants.dart'; 7 | export './enums.dart' 8 | hide VStorageKeys 9 | hide VChatLoadingState 10 | hide VLoadMoreStatus; 11 | export './stream_utils.dart'; 12 | export './v_message_encryption.dart'; 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/utils/v_message_constants.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | abstract class VMessageConstants { 6 | static const String heart = "\u{2764}"; 7 | static const String faceWithTears = "\u{1F602}"; 8 | static const String disappointedFace = "\u{1F625}"; 9 | static const String angryFace = "\u{1F621}"; 10 | static const String astonishedFace = "\u{1F632}"; 11 | static const String thumbsUp = "\u{1F44D}"; 12 | 13 | static const thisContentIsFile = "📁"; 14 | static const thisContentIsVoice = "🎤"; 15 | static const thisContentIsImage = "📷"; 16 | static const thisContentIsVideo = "🎥"; 17 | static const thisContentIsLocation = "📍"; 18 | } 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/utils/v_message_encryption.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | //todo encrypt the message 6 | abstract class VMessageEncryption { 7 | // final _key = VChatController.I.vChatConfig.encryptHashKey; 8 | 9 | static String encryptMessage(String message) { 10 | return message; 11 | } 12 | 13 | static String deCryptMessage(String message) { 14 | return message; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/src/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './text_parser_widget.dart'; 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/lib/v_chat_sdk_core.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './src/../src/models/models.dart'; 6 | export './src/events/events.dart'; 7 | export './src/exceptions/exceptions.dart'; 8 | export './src/http/http.dart'; 9 | export './src/native_api/native.dart'; 10 | export './src/service/service.dart'; 11 | export './src/utils/utils.dart'; 12 | export './src/v_chat_controller.dart'; 13 | export './src/widgets/widgets.dart'; 14 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_core/test/v_chat_sdk_core_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | void main() {} 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/README.md: -------------------------------------------------------------------------------- 1 | # v_chat_sdk_sample 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/kotlin/com/vchatsdk/app/v_chat_sdk_sample/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.vchatsdk.app.v_chat_sdk_sample 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip 6 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "7.3.0" apply false 22 | id "org.jetbrains.kotlin.android" version "1.9.24" apply false 23 | id "com.google.gms.google-services" version "4.4.0" apply false 24 | } 25 | 26 | include ":app" 27 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/assets/images/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/assets/images/facebook.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/assets/images/facebook_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/assets/images/facebook_logo.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/assets/images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/assets/images/google.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/assets/images/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/assets/images/ic_launcher_round.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/assets/images/logo.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/assets/images/placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/assets/images/placeholder.jpg -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/assets/images/welcome_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/assets/images/welcome_image.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | if #available(iOS 10.0, *) { 11 | UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate 12 | } 13 | GeneratedPluginRegistrant.register(with: self) 14 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 706118575283-36suf2ucff8cdel98n6rpc9o81cqj1n4.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.706118575283-36suf2ucff8cdel98n6rpc9o81cqj1n4 9 | API_KEY 10 | AIzaSyAPF9x4otICpjEYAOdGeHJWyxiZHlSExpI 11 | GCM_SENDER_ID 12 | 706118575283 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.vchatsdk.app.v2 17 | PROJECT_ID 18 | v-chat-sdk-v2 19 | STORAGE_BUCKET 20 | v-chat-sdk-v2.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:706118575283:ios:17e133cae0c891d7b8bcc6 33 | 34 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:706118575283:ios:17e133cae0c891d7b8bcc6", 5 | "FIREBASE_PROJECT_ID": "v-chat-sdk-v2", 6 | "GCM_SENDER_ID": "706118575283" 7 | } -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/app_service.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | class AppService extends GetxController { 9 | late Locale locale; 10 | 11 | ThemeMode themeMode = ThemeMode.system; 12 | 13 | void setLocal(Locale locale) { 14 | this.locale = locale; 15 | Get.locale = locale; 16 | Get.updateLocale(locale); 17 | update(); 18 | } 19 | 20 | String get getLangCode => locale.languageCode; 21 | 22 | void setTheme(ThemeMode themeType) { 23 | if (themeType == ThemeMode.light) { 24 | themeMode = ThemeMode.light; 25 | } else if (themeType == ThemeMode.dark) { 26 | themeMode = ThemeMode.dark; 27 | } else if (themeType == ThemeMode.system) { 28 | themeMode = ThemeMode.system; 29 | } 30 | update(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/clould/cloud_fire_upload.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/enums.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | enum SStorageKeys { 6 | myProfile, 7 | appLanguage, 8 | accessToken, 9 | isLogin, 10 | appTheme, 11 | appLang, 12 | clintVersion, 13 | } 14 | 15 | enum ApiCallStatus { 16 | loading, 17 | success, 18 | error, 19 | empty, 20 | holding, 21 | } 22 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/lazy_inject.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | class LazyInjection extends Bindings { 8 | @override 9 | void dependencies() { 10 | // Get.lazyPut( 11 | // () => UserRepository( 12 | // apiClient: CloudFireStoreApi(collection: "users"), 13 | // ), 14 | // fenix: true, 15 | // ); 16 | // Get.lazyPut( 17 | // () => ProductRepository( 18 | // apiClient: CloudFireStoreApi(collection: "products"), 19 | // ), 20 | // fenix: true, 21 | // ); 22 | // Get.lazyPut( 23 | // () => OrderRepository( 24 | // apiClient: CloudFireStoreApi(collection: "orders"), 25 | // ), 26 | // fenix: true, 27 | // ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/utils/app_auth.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_sample/app/core/models/user.model.dart'; 6 | 7 | import '../enums.dart'; 8 | import 'app_pref.dart'; 9 | 10 | abstract class AppAuth { 11 | static UserModel get getMyModel { 12 | return UserModel.fromMap(AppPref.getMap(SStorageKeys.myProfile.name)!); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/utils/app_localization.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import '../enums.dart'; 6 | import 'app_pref.dart'; 7 | 8 | abstract class AppLocalization { 9 | static String? get languageCode => 10 | AppPref.getStringOrNullKey(SStorageKeys.appLanguage.name); 11 | 12 | static Future updateLanguageCode(String languageCode) => 13 | AppPref.setStringKey(SStorageKeys.appLanguage.name, languageCode); 14 | } 15 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/widgets/app_btn.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:textless/textless.dart'; 7 | 8 | class AppBtn extends StatelessWidget { 9 | final VoidCallback onPress; 10 | final String title; 11 | final Object? heroTag; 12 | 13 | const AppBtn({ 14 | Key? key, 15 | required this.onPress, 16 | required this.title, 17 | this.heroTag, 18 | }) : super(key: key); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return FloatingActionButton( 23 | onPressed: onPress, 24 | heroTag: heroTag, 25 | child: title.text.alignCenter, 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/core/widgets/chat_btn.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class ChatBtn extends StatelessWidget { 8 | final VoidCallback onPress; 9 | 10 | const ChatBtn({Key? key, required this.onPress}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return FloatingActionButton( 15 | onPressed: onPress, 16 | heroTag: "${DateTime.now().microsecondsSinceEpoch}", 17 | child: Row( 18 | crossAxisAlignment: CrossAxisAlignment.center, 19 | mainAxisAlignment: MainAxisAlignment.center, 20 | children: const [ 21 | Icon(Icons.message), 22 | SizedBox( 23 | width: 5, 24 | ), 25 | Text("Chat"), 26 | ], 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/about/bindings/about_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/about_controller.dart'; 8 | 9 | class AboutBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.lazyPut( 13 | () => AboutController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/about/controllers/about_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | class AboutController extends GetxController { 8 | final count = 0.obs; 9 | 10 | void increment() => count.value++; 11 | } 12 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/about/views/about_view.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | import 'package:get/get.dart'; 8 | 9 | import '../controllers/about_controller.dart'; 10 | 11 | class AboutView extends GetView { 12 | const AboutView({Key? key}) : super(key: key); 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar( 17 | title: const Text('AboutView'), 18 | centerTitle: true, 19 | ), 20 | body: const Center( 21 | child: Text( 22 | 'AboutView is working', 23 | style: TextStyle(fontSize: 20), 24 | ), 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/auth/register/bindings/register_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/register_controller.dart'; 8 | 9 | class RegisterBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | RegisterController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/broadcast_members/bindings/broadcast_members_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/broadcast_members_controller.dart'; 8 | 9 | class BroadcastMembersBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | BroadcastMembersController(Get.arguments), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/broadcast_settings/bindings/broadcast_settings_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | import '../controllers/broadcast_settings_controller.dart'; 9 | 10 | class BroadcastSettingsBinding extends Bindings { 11 | @override 12 | void dependencies() { 13 | Get.put( 14 | BroadcastSettingsController(Get.arguments as VToChatSettingsModel), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/broadcast_settings/controllers/broadcast_settings_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | import '../../../routes/app_pages.dart'; 9 | 10 | class BroadcastSettingsController extends GetxController { 11 | final VToChatSettingsModel data; 12 | 13 | BroadcastSettingsController(this.data); 14 | 15 | void toShowMembers() { 16 | Get.toNamed(Routes.BROADCAST_MEMBERS, arguments: data); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/choose_members/bindings/choose_members_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/choose_members_controller.dart'; 8 | 9 | class ChooseMembersBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | ChooseMembersController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/create_broadcast/bindings/create_broadcast_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | import '../controllers/create_broadcast_controller.dart'; 9 | 10 | class CreateBroadcastBinding extends Bindings { 11 | @override 12 | void dependencies() { 13 | Get.put( 14 | CreateBroadcastController(Get.arguments as List), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/create_group/bindings/create_group_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | import '../controllers/create_group_controller.dart'; 9 | 10 | class CreateGroupBinding extends Bindings { 11 | @override 12 | void dependencies() { 13 | Get.put( 14 | CreateGroupController(Get.arguments as List), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/create_product/bindings/create_product_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/create_product_controller.dart'; 8 | 9 | class CreateProductBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | CreateProductController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/edit_profile/bindings/edit_profile_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/edit_profile_controller.dart'; 8 | 9 | class EditProfileBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | EditProfileController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/group_members/bindings/group_members_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/group_members_controller.dart'; 8 | 9 | class GroupMembersBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | GroupMembersController(Get.arguments), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/group_settings/bindings/group_settings_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | import '../controllers/group_settings_controller.dart'; 9 | 10 | class GroupSettingsBinding extends Bindings { 11 | @override 12 | void dependencies() { 13 | Get.put( 14 | GroupSettingsController(Get.arguments as VToChatSettingsModel), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/group_settings/controllers/group_settings_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | import 'package:v_chat_sdk_sample/app/routes/app_pages.dart'; 8 | 9 | class GroupSettingsController extends GetxController { 10 | final VToChatSettingsModel data; 11 | 12 | GroupSettingsController(this.data); 13 | 14 | void toShowMembers() { 15 | Get.toNamed(Routes.GROUP_MEMBERS, arguments: data); 16 | } 17 | 18 | void leave() async { 19 | await VChatController.I.roomApi.leaveGroup(roomId: data.roomId); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/home_tabs/explore_tab/controllers/explore_tab_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:get/get.dart'; 8 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 9 | import 'package:v_chat_sdk_sample/app/routes/app_pages.dart'; 10 | 11 | class ExploreTabController extends GetxController { 12 | // final ProductRepository repository; 13 | int txt = 0; 14 | late StreamSubscription totalUnreadMessageCountStream; 15 | 16 | // ExploreTabController(this.repository); 17 | @override 18 | void onInit() { 19 | super.onInit(); 20 | totalUnreadMessageCountStream = VChatController 21 | .I.nativeApi.streams.totalUnreadMessageCountStream 22 | .listen((event) { 23 | txt = event.count; 24 | update(); 25 | print(event.toString()); 26 | }); 27 | } 28 | 29 | @override 30 | void onClose() { 31 | super.onClose(); 32 | totalUnreadMessageCountStream.cancel(); 33 | } 34 | 35 | void onCreateProduct() { 36 | Get.toNamed(Routes.CREATE_PRODUCT); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/home_tabs/explore_tab/views/product_item.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:v_chat_sdk_sample/app/core/models/product.model.dart'; 7 | 8 | class ProductItem extends StatelessWidget { 9 | final ProductModel model; 10 | 11 | const ProductItem(this.model, {Key? key}) : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/home_tabs/home/bindings/home_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../../chats_tab/controllers/chats_tab_controller.dart'; 8 | import '../../explore_tab/controllers/explore_tab_controller.dart'; 9 | import '../../settings_tab/controllers/settings_tab_controller.dart'; 10 | import '../../users_tab/controllers/users_tab_controller.dart'; 11 | import '../controllers/home_controller.dart'; 12 | 13 | class HomeBinding extends Bindings { 14 | @override 15 | void dependencies() { 16 | Get.put( 17 | UsersTabController(), 18 | ); 19 | Get.put( 20 | ChatsTabController(), 21 | ); 22 | Get.put( 23 | ExploreTabController(), 24 | ); 25 | Get.put( 26 | SettingsTabController(Get.find()), 27 | ); 28 | Get.put( 29 | HomeController(), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/home_tabs/settings_tab/models.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class AppLanguage { 8 | final String language; 9 | final Locale locale; 10 | 11 | AppLanguage(this.language, this.locale); 12 | 13 | @override 14 | String toString() { 15 | return language; 16 | } 17 | } 18 | 19 | class AppTheme { 20 | final String theme; 21 | final ThemeMode mode; 22 | 23 | AppTheme(this.theme, this.mode); 24 | 25 | @override 26 | String toString() { 27 | return theme; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/home_tabs/settings_tab/views/widgets/profile_item.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class ProfileItem extends StatelessWidget { 8 | final IconData iconData; 9 | final String title; 10 | final VoidCallback onPress; 11 | 12 | const ProfileItem({ 13 | Key? key, 14 | required this.iconData, 15 | required this.title, 16 | required this.onPress, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Card( 22 | child: ListTile( 23 | onTap: onPress, 24 | leading: Icon(iconData, size: 33), 25 | title: Text(title), 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/my_orders/bindings/my_orders_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/my_orders_controller.dart'; 8 | 9 | class MyOrdersBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | MyOrdersController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/my_orders/controllers/my_orders_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | class MyOrdersController extends GetxController { 8 | // final OrderRepository repository; 9 | // 10 | // MyOrdersController(this.repository); 11 | 12 | void chatNow() async {} 13 | } 14 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/on_boarding/bindings/on_boarding_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/on_boarding_controller.dart'; 8 | 9 | class OnBoardingBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.lazyPut( 13 | () => OnBoardingController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/on_boarding/controllers/on_boarding_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | class OnBoardingController extends GetxController {} 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/peer_profile/bindings/peer_profile_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/peer_profile_controller.dart'; 8 | 9 | class PeerProfileBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | PeerProfileController( 14 | Get.arguments as String, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/product_details/bindings/product_details_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/product_details_controller.dart'; 8 | 9 | class ProductDetailsBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | ProductDetailsController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/splash/bindings/splash_binding.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | 7 | import '../controllers/splash_controller.dart'; 8 | 9 | class SplashBinding extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.put( 13 | SplashController(), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/modules/splash/controllers/splash_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:get/get.dart'; 6 | import 'package:v_chat_sdk_sample/app/routes/app_pages.dart'; 7 | 8 | import '../../../core/enums.dart'; 9 | import '../../../core/utils/app_pref.dart'; 10 | 11 | class SplashController extends GetxController { 12 | @override 13 | void onReady() { 14 | super.onReady(); 15 | checkUser(); 16 | } 17 | 18 | void checkUser() async { 19 | await Future.delayed(const Duration(seconds: 1)); 20 | final myUser = AppPref.getMap(SStorageKeys.myProfile.name); 21 | if (myUser == null) { 22 | // Go to login 23 | Get.offAndToNamed(Routes.REGISTER); 24 | } else { 25 | Get.offAndToNamed(Routes.HOME); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/v_chat/conditional_builder.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class VConditionalBuilder extends StatelessWidget { 8 | final bool _condition; 9 | final Function _thenBuilder; 10 | final Function? _elseBuilder; 11 | 12 | const VConditionalBuilder({ 13 | super.key, 14 | required bool condition, 15 | required Function thenBuilder, 16 | Function? elseBuilder, 17 | }) : _condition = condition, 18 | _thenBuilder = thenBuilder, 19 | _elseBuilder = elseBuilder; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return _condition 24 | ? _thenBuilder.call() ?? const SizedBox.shrink() 25 | : _elseBuilder?.call() ?? const SizedBox.shrink(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/v_chat/extension.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | extension MediaQueryExt2 on BuildContext { 8 | bool get isDark => Theme.of(this).brightness == Brightness.dark; 9 | 10 | Future toPage(Widget page) => Navigator.push( 11 | this, 12 | MaterialPageRoute( 13 | builder: (context) => page, 14 | ), 15 | ); 16 | 17 | Future toPageAndRemoveAll(Widget page) { 18 | return Navigator.of(this).pushAndRemoveUntil( 19 | MaterialPageRoute(builder: (context) => page), 20 | (Route route) => false); 21 | } 22 | 23 | bool get isRtl => Directionality.of(this).name.toLowerCase() == "rtl"; 24 | } 25 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/v_chat/v_chat_avatar_image.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_advanced_avatar/flutter_advanced_avatar.dart'; 7 | import 'package:v_chat_message_page/src/v_chat/v_circle_avatar.dart'; 8 | 9 | class VChatAvatarImage extends StatelessWidget { 10 | final String imageUrl; 11 | final bool isOnline; 12 | final String chatTitle; 13 | final int size; 14 | 15 | const VChatAvatarImage({ 16 | Key? key, 17 | required this.imageUrl, 18 | required this.isOnline, 19 | required this.chatTitle, 20 | this.size = 60, 21 | }) : super(key: key); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return AdvancedAvatar( 26 | size: size.toDouble(), 27 | statusColor: isOnline ? Colors.green : null, 28 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(100)), 29 | foregroundDecoration: 30 | BoxDecoration(borderRadius: BorderRadius.circular(100)), 31 | name: chatTitle, 32 | child: VCircleAvatar( 33 | fullUrl: imageUrl, 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/v_chat/v_circle_avatar.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:cached_network_image/cached_network_image.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | class VCircleAvatar extends StatelessWidget { 9 | final int radius; 10 | final String fullUrl; 11 | 12 | const VCircleAvatar({ 13 | Key? key, 14 | this.radius = 28, 15 | required this.fullUrl, 16 | }) : super(key: key); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return CircleAvatar( 21 | foregroundColor: Theme.of(context).primaryColor, 22 | backgroundColor: Colors.transparent, 23 | radius: double.tryParse(radius.toString()), 24 | backgroundImage: CachedNetworkImageProvider( 25 | fullUrl, 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/lib/app/v_chat/v_enums.dart: -------------------------------------------------------------------------------- 1 | enum VLoadMoreStatus { loading, loaded, error, completed } 2 | 3 | enum VChatLoadingState { loading, success, error, ideal, empty } 4 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | dynamic_color 7 | emoji_picker_flutter 8 | file_saver 9 | local_notifier 10 | pasteboard 11 | record_linux 12 | sqlite3_flutter_libs 13 | url_launcher_linux 14 | ) 15 | 16 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 17 | ) 18 | 19 | set(PLUGIN_BUNDLED_LIBRARIES) 20 | 21 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 23 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 26 | endforeach(plugin) 27 | 28 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 29 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 30 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 31 | endforeach(ffi_plugin) 32 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/linux/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | #include "my_application.h" 6 | 7 | int main(int argc, char** argv) { 8 | g_autoptr(MyApplication) app = my_application_new(); 9 | return g_application_run(G_APPLICATION(app), argc, argv); 10 | } 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/linux/my_application.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023, the hatemragab project author. 3 | * All rights reserved. Use of this source code is governed by a 4 | * MIT license that can be found in the LICENSE file. 5 | */ 6 | 7 | #ifndef FLUTTER_MY_APPLICATION_H_ 8 | #define FLUTTER_MY_APPLICATION_H_ 9 | 10 | #include 11 | 12 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 13 | GtkApplication) 14 | 15 | /** 16 | * my_application_new: 17 | * 18 | * Creates a new Flutter-based application. 19 | * 20 | * Returns: a new #MyApplication. 21 | */ 22 | MyApplication* my_application_new(); 23 | 24 | #endif // FLUTTER_MY_APPLICATION_H_ 25 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = v_chat_sdk_sample 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.vchatsdk.app.v2; 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.vchatsdk.app. All rights reserved. 15 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | com.apple.security.network.client 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 706118575283-36suf2ucff8cdel98n6rpc9o81cqj1n4.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.706118575283-36suf2ucff8cdel98n6rpc9o81cqj1n4 9 | API_KEY 10 | AIzaSyAPF9x4otICpjEYAOdGeHJWyxiZHlSExpI 11 | GCM_SENDER_ID 12 | 706118575283 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.vchatsdk.app.v2 17 | PROJECT_ID 18 | v-chat-sdk-v2 19 | STORAGE_BUCKET 20 | v-chat-sdk-v2.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:706118575283:ios:17e133cae0c891d7b8bcc6 33 | 34 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/macos/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:706118575283:ios:17e133cae0c891d7b8bcc6", 5 | "FIREBASE_PROJECT_ID": "v-chat-sdk-v2", 6 | "GCM_SENDER_ID": "706118575283" 7 | } -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/pubspec_overrides.yaml: -------------------------------------------------------------------------------- 1 | # melos_managed_dependency_overrides: v_chat_firebase_fcm,v_chat_message_page,v_chat_receive_share,v_chat_room_page,v_chat_sdk_core,v_chat_web_rtc 2 | dependency_overrides: 3 | v_chat_firebase_fcm: 4 | path: ../../push_providers/v_chat_firebase_fcm 5 | v_chat_message_page: 6 | path: ../../v_ui_packages/v_chat_message_page 7 | v_chat_receive_share: 8 | path: ../v_chat_receive_share 9 | v_chat_room_page: 10 | path: ../../v_ui_packages/v_chat_room_page 11 | v_chat_sdk_core: 12 | path: ../v_chat_sdk_core 13 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/web/favicon.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/web/icons/Icon-192.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/web/icons/Icon-512.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "v_chat_sdk_sample", 3 | "short_name": "v_chat_sdk_sample", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | agora_rtc_engine 7 | dynamic_color 8 | emoji_picker_flutter 9 | file_saver 10 | firebase_core 11 | geolocator_windows 12 | local_notifier 13 | pasteboard 14 | permission_handler_windows 15 | quick_notify_2 16 | record_windows 17 | share_plus 18 | sqlite3_flutter_libs 19 | url_launcher_windows 20 | ) 21 | 22 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 23 | ) 24 | 25 | set(PLUGIN_BUNDLED_LIBRARIES) 26 | 27 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 28 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 29 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 30 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 31 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 32 | endforeach(plugin) 33 | 34 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 35 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 36 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 37 | endforeach(ffi_plugin) 38 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023, the hatemragab project author. 3 | * All rights reserved. Use of this source code is governed by a 4 | * MIT license that can be found in the LICENSE file. 5 | */ 6 | 7 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 8 | #define RUNNER_FLUTTER_WINDOW_H_ 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | #include "win32_window.h" 16 | 17 | // A window that does nothing but host a Flutter view. 18 | class FlutterWindow : public Win32Window { 19 | public: 20 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 21 | explicit FlutterWindow(const flutter::DartProject& project); 22 | virtual ~FlutterWindow(); 23 | 24 | protected: 25 | // Win32Window: 26 | bool OnCreate() override; 27 | void OnDestroy() override; 28 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 29 | LPARAM const lparam) noexcept override; 30 | 31 | private: 32 | // The project to run. 33 | flutter::DartProject project_; 34 | 35 | // The Flutter instance hosted by this window. 36 | std::unique_ptr flutter_controller_; 37 | }; 38 | 39 | #endif // RUNNER_FLUTTER_WINDOW_H_ 40 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023, the hatemragab project author. 3 | * All rights reserved. Use of this source code is governed by a 4 | * MIT license that can be found in the LICENSE file. 5 | */ 6 | 7 | //{{NO_DEPENDENCIES}} 8 | // Microsoft Visual C++ generated include file. 9 | // Used by Runner.rc 10 | // 11 | #define IDI_APP_ICON 101 12 | 13 | // Next default values for new objects 14 | // 15 | #ifdef APSTUDIO_INVOKED 16 | #ifndef APSTUDIO_READONLY_SYMBOLS 17 | #define _APS_NEXT_RESOURCE_VALUE 102 18 | #define _APS_NEXT_COMMAND_VALUE 40001 19 | #define _APS_NEXT_CONTROL_VALUE 1001 20 | #define _APS_NEXT_SYMED_VALUE 101 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hatemragab/v_chat_sdk/d8d86435f880a7aecfb90617e428536ab0df28d3/core_packages/v_chat_sdk_sample/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023, the hatemragab project author. 3 | * All rights reserved. Use of this source code is governed by a 4 | * MIT license that can be found in the LICENSE file. 5 | */ 6 | 7 | #ifndef RUNNER_UTILS_H_ 8 | #define RUNNER_UTILS_H_ 9 | 10 | #include 11 | #include 12 | 13 | // Creates a console for the process, and redirects stdout and stderr to 14 | // it for both the runner and the Flutter library. 15 | void CreateAndAttachConsole(); 16 | 17 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 18 | // encoded in UTF-8. Returns an empty std::string on failure. 19 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 20 | 21 | // Gets the command line arguments passed in as a std::vector, 22 | // encoded in UTF-8. Returns an empty std::vector on failure. 23 | std::vector GetCommandLineArguments(); 24 | 25 | #endif // RUNNER_UTILS_H_ 26 | -------------------------------------------------------------------------------- /core_packages/v_chat_sdk_sample/x.json: -------------------------------------------------------------------------------- 1 | { 2 | "maps": "test key" 3 | } -------------------------------------------------------------------------------- /header_template.txt: -------------------------------------------------------------------------------- 1 | Copyright {{.Year}}, the hatemragab project author. 2 | All rights reserved. Use of this source code is governed by a 3 | MIT license that can be found in the LICENSE file. -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: v_chat_sdk 2 | 3 | environment: 4 | sdk: '>=2.18.0 <3.0.0' 5 | dev_dependencies: 6 | melos: ^3.4.0 7 | -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * initial release. 4 | ## 0.1.0 5 | update v_chat_utils 6 | ## 0.4.0 7 | - full localization support 8 | ## 1.0.0 9 | - Support Dart 3 -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 hatemragab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish,and 9 | to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | You don't have right to re sell this Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | 4 | # You might want to exclude auto-generated files from dart analysis 5 | analyzer: 6 | exclude: 7 | - ./example 8 | - '**.g.dart' 9 | 10 | 11 | # You can customize the lint rules set to your own liking. A list of all rules 12 | # can be found at https://dart-lang.github.io/linter/lints/options/options.html 13 | linter: 14 | rules: 15 | # Util classes are awesome! 16 | # avoid_classes_with_only_static_members: false 17 | 18 | # Make constructors the first thing in every class 19 | # sort_constructors_first: true 20 | 21 | # Choose wisely, but you don't have to 22 | # prefer_double_quotes: true 23 | # prefer_single_quotes: true -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/example/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/lib/v_chat_firebase_fcm.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | library v_chat_firebase_fcm; 6 | 7 | export 'package:firebase_core/firebase_core.dart'; 8 | export 'package:firebase_messaging/firebase_messaging.dart'; 9 | 10 | export './src/v_chat_fcm_provider.dart'; 11 | -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: v_chat_firebase_fcm 2 | description: v chat firebase notifiactions push implementations for android and ios using firebase messaging 3 | version: 2.1.0 4 | homepage: https://v-chat-sdk.github.io/vchat-v2-docs/docs/intro 5 | issue_tracker: https://github.com/hatemragab/v_chat_sdk/issues 6 | repository: https://github.com/hatemragab/v_chat_sdk/tree/master/push_providers/v_chat_one_signal 7 | 8 | environment: 9 | sdk: '>=2.17.0 <4.0.0' 10 | flutter: ">=1.17.0" 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | v_chat_sdk_core: ^2.1.0 16 | firebase_core: ^3.0.0 17 | firebase_messaging: ^15.0.0 18 | eraser: ^2.0.2 19 | flutter_app_badger: ^1.5.0 20 | http: ^1.2.1 21 | v_platform: ^2.0.0 22 | shared_preferences: ^2.2.3 23 | encrypt: 5.0.1 24 | 25 | dev_dependencies: 26 | lints: ^4.0.0 27 | 28 | flutter: 29 | 30 | platforms: 31 | android: 32 | ios: 33 | web: 34 | windows: 35 | macos: 36 | -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/pubspec_overrides.yaml: -------------------------------------------------------------------------------- 1 | # melos_managed_dependency_overrides: v_chat_utils,v_chat_sdk_core 2 | {dependency_overrides: {v_chat_sdk_core: {path: ../../core_packages/v_chat_sdk_core}}} 3 | -------------------------------------------------------------------------------- /push_providers/v_chat_firebase_fcm/test/v_chat_firebase_fcm_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | initial release. 3 | ## 0.4.0 4 | - full localization support 5 | ## 1.0.0 6 | - Support Dart 3 -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 hatemragab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish,and 9 | to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | You don't have right to re sell this Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | 4 | # You might want to exclude auto-generated files from dart analysis 5 | analyzer: 6 | exclude: 7 | - ./example 8 | - '**.g.dart' 9 | 10 | 11 | # You can customize the lint rules set to your own liking. A list of all rules 12 | # can be found at https://dart-lang.github.io/linter/lints/options/options.html 13 | linter: 14 | rules: 15 | # Util classes are awesome! 16 | # avoid_classes_with_only_static_members: false 17 | 18 | # Make constructors the first thing in every class 19 | # sort_constructors_first: true 20 | 21 | # Choose wisely, but you don't have to 22 | # prefer_double_quotes: true 23 | # prefer_single_quotes: true -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/example/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/lib/v_chat_one_signal.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | library v_chat_one_signal; 6 | 7 | export './src/one_signal_push.dart'; 8 | export 'package:onesignal_flutter/onesignal_flutter.dart'; 9 | -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: v_chat_one_signal 2 | description: v chat one signal push notifications implementations for flutter apps for android and ios 3 | version: 2.1.0 4 | homepage: https://v-chat-sdk.github.io/vchat-v2-docs/docs/intro 5 | issue_tracker: https://github.com/hatemragab/v_chat_sdk/issues 6 | repository: https://github.com/hatemragab/v_chat_sdk 7 | 8 | environment: 9 | sdk: '>=2.17.0 <4.0.0' 10 | flutter: ">=1.17.0" 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | v_chat_sdk_core: ^2.1.0 16 | onesignal_flutter: ^3.5.1 17 | eraser: ^2.0.2 18 | flutter_app_badger: ^1.5.0 19 | http: ^1.2.1 20 | v_platform: ^2.0.0 21 | 22 | dev_dependencies: 23 | flutter_lints: ^4.0.0 24 | flutter_test: 25 | sdk: flutter 26 | lints: ^4.0.0 27 | 28 | flutter: 29 | 30 | platforms: 31 | android: 32 | ios: 33 | web: 34 | windows: 35 | macos: 36 | -------------------------------------------------------------------------------- /push_providers/v_chat_one_signal/pubspec_overrides.yaml: -------------------------------------------------------------------------------- 1 | # melos_managed_dependency_overrides: v_chat_sdk_core 2 | dependency_overrides: 3 | intl: 0.17.0 4 | v_chat_sdk_core: 5 | path: ../../core_packages/v_chat_sdk_core 6 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | initial release. 3 | ## 0.1.0 4 | add theming 5 | ## 0.3.0 6 | - add web support 7 | ## 0.4.0 8 | - full localization support 9 | - ## 0.5.0 10 | - support voice and video calls 11 | ## 1.0.0 12 | - Support Dart 3 13 | ## 1.1.0 14 | - update translation system 15 | ## 1.2.2 16 | - update we_assets_camera version 17 | ## 2.0.0+1 18 | - fix low voice recorder for android -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 hatemragab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish,and 9 | to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | You don't have right to re sell this Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | 4 | # You might want to exclude auto-generated files from dart analysis 5 | analyzer: 6 | exclude: 7 | - media_example/** 8 | - ./media_example 9 | - '**.g.dart' 10 | 11 | 12 | # You can customize the lint rules set to your own liking. A list of all rules 13 | # can be found at https://dart-lang.github.io/linter/lints/options/options.html 14 | linter: 15 | rules: 16 | # Util classes are awesome! 17 | use_build_context_synchronously: false 18 | 19 | # Make constructors the first thing in every class 20 | # sort_constructors_first: true 21 | 22 | # Choose wisely, but you don't have to 23 | # prefer_double_quotes: true 24 | # prefer_single_quotes: true 25 | 26 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/example/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/agora/core/agora_user.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/cupertino.dart'; 6 | 7 | class AgoraUser { 8 | final int uid; 9 | String? name; 10 | bool? isAudioEnabled; 11 | bool? isVideoEnabled; 12 | Widget? view; 13 | 14 | AgoraUser({ 15 | required this.uid, 16 | this.name, 17 | this.isAudioEnabled, 18 | this.isVideoEnabled, 19 | this.view, 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/agora/core/call_state.dart: -------------------------------------------------------------------------------- 1 | import '../../../v_chat_message_page.dart'; 2 | 3 | class CallState { 4 | CallStatus status = CallStatus.connecting; 5 | String? meetId; 6 | bool isMicEnabled = true; 7 | bool isSpeakerEnabled = false; 8 | bool isVideoEnabled = false; 9 | } 10 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/agora/core/v_caller_state.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | import '../../../v_chat_message_page.dart'; 8 | 9 | class VRtcState { 10 | Duration time; 11 | CallStatus status; 12 | VAgoraConnect? agoraConnect; 13 | VRtcState({ 14 | this.time = Duration.zero, 15 | this.status = CallStatus.connecting, 16 | }); 17 | 18 | @override 19 | String toString() { 20 | return '{time: $time, status: $status}'; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/agora/pages/call/call_page_without_agora.dart: -------------------------------------------------------------------------------- 1 | // // Copyright 2023, the hatemragab project author. 2 | // // All rights reserved. Use of this source code is governed by a 3 | // // MIT license that can be found in the LICENSE file. 4 | // 5 | // import 'package:flutter/cupertino.dart'; 6 | // import 'package:flutter/material.dart'; 7 | // import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 8 | // import '../../../../v_chat_message_page.dart'; 9 | // 10 | // class VCallPage extends StatefulWidget { 11 | // final VCallDto dto; 12 | // 13 | // const VCallPage({ 14 | // Key? key, 15 | // required this.dto, 16 | // }) : super(key: key); 17 | // 18 | // @override 19 | // State createState() => _VCallPageState(); 20 | // } 21 | // 22 | // class _VCallPageState extends State { 23 | // @override 24 | // Widget build(BuildContext context) { 25 | // // TODO: implement build 26 | // throw UnimplementedError(); 27 | // } 28 | // 29 | // } 30 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/agora/pages/widgets/call_actions_row.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class CallActionButton extends StatelessWidget { 8 | const CallActionButton({ 9 | super.key, 10 | this.onTap, 11 | required this.icon, 12 | this.isEnabled = true, 13 | this.backgroundColor, 14 | this.radius = 26, 15 | this.iconSize = 24, 16 | this.iconColor, 17 | }); 18 | 19 | final Function()? onTap; 20 | final IconData icon; 21 | final bool isEnabled; 22 | final Color? backgroundColor; 23 | final int radius; 24 | final int iconSize; 25 | final Color? iconColor; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return InkWell( 30 | onTap: isEnabled ? onTap : null, 31 | child: CircleAvatar( 32 | backgroundColor: backgroundColor ?? 33 | (isEnabled ? Colors.white : Colors.grey.shade800), 34 | radius: radius.toDouble(), 35 | child: Icon( 36 | icon, 37 | size: iconSize.toDouble(), 38 | color: iconColor ?? Colors.grey.shade600, 39 | ), 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/assets/data/local_rooms.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'local_messages.dart'; 6 | 7 | final fakeLocalRooms = [ 8 | { 9 | "tb_r_id": "rid1", 10 | "tb_r_room_type": "s", 11 | "tb_r_title": "user 2", 12 | "tb_r_img": "default_user_image.png", 13 | "tb_r_is_archived": false, 14 | "tb_r_is_muted": false, 15 | "tb_r_peer_id": "user2Id", 16 | "tb_r_peer_identifier": "user2@gmail.com", 17 | "tb_r_blocker_id": null, 18 | "tb_r_title_en": "user 2", 19 | "tb_r_un_counter": 0, 20 | "tb_r_nick_name": null, 21 | "tb_r_created_at": "2022-12-28T14:39:32Z", 22 | ...fakeLocalMessages.first 23 | } 24 | ]; 25 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/core/core.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './enums.dart'; 6 | export './message_nav.dart'; 7 | export './stream_mixin.dart'; 8 | export './v_message_localization.dart'; 9 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/core/enums.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | enum VMessageItemClickRes { 6 | forward, 7 | reply, 8 | share, 9 | info, 10 | delete, 11 | copy, 12 | download 13 | } 14 | 15 | enum LoadMoreStatus { loading, loaded, error, completed } 16 | 17 | enum CallStatus { 18 | //when init the stream 19 | connecting, 20 | busy, 21 | ring, 22 | //call started 23 | accepted, 24 | roomAlreadyInCall, 25 | timeout, 26 | //when any user close the chat 27 | callEnd, 28 | rejected, 29 | } 30 | 31 | extension CallStatusExt on CallStatus { 32 | bool get isConnecting => this == CallStatus.connecting; 33 | 34 | bool get busy => this == CallStatus.busy; 35 | 36 | bool get ring => this == CallStatus.ring; 37 | 38 | bool get accepted => this == CallStatus.accepted; 39 | 40 | bool get timeout => this == CallStatus.timeout; 41 | 42 | bool get callEnd => this == CallStatus.callEnd; 43 | 44 | bool get rejected => this == CallStatus.rejected; 45 | 46 | bool get roomAlreadyInCall => this == CallStatus.roomAlreadyInCall; 47 | } 48 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/core/extension.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | extension MediaQueryExt2 on BuildContext { 8 | bool get isDark => Theme.of(this).brightness == Brightness.dark; 9 | 10 | Future toPage(Widget page) => Navigator.push( 11 | this, 12 | MaterialPageRoute( 13 | builder: (context) => page, 14 | ), 15 | ); 16 | 17 | Future toPageAndRemoveAll(Widget page) { 18 | return Navigator.of(this).pushAndRemoveUntil( 19 | MaterialPageRoute(builder: (context) => page), 20 | (Route route) => false); 21 | } 22 | 23 | bool get isRtl => Directionality.of(this).name.toLowerCase() == "rtl"; 24 | } 25 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/core/extentions.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | // extension VSortMessagesById on List { 6 | // List sortById() { 7 | // sort((a, b) { 8 | // return b.id.compareTo(a.id); 9 | // }); 10 | // return this; 11 | // } 12 | // } 13 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/core/stream_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | mixin StreamMix { 4 | final streamsMix = []; 5 | 6 | void closeStreamMix() { 7 | for (final stream in streamsMix) { 8 | stream.cancel(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/core/types.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | typedef VMessageCallback = Function(VBaseMessage message); 8 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/models/app_bare_state_model.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | class MessageAppBarStateModel { 8 | DateTime? lastSeenAt; 9 | String roomTitle; 10 | String roomId; 11 | String? peerIdentifier; 12 | String roomImage; 13 | VSocketRoomTypingModel typingModel; 14 | VRoomType roomType; 15 | bool isOnline; 16 | bool isSearching; 17 | int? memberCount; 18 | int? totalOnline; 19 | 20 | MessageAppBarStateModel._({ 21 | required this.roomTitle, 22 | required this.roomId, 23 | required this.peerIdentifier, 24 | required this.roomImage, 25 | required this.typingModel, 26 | required this.roomType, 27 | required this.isOnline, 28 | required this.isSearching, 29 | }); 30 | 31 | factory MessageAppBarStateModel.fromVRoom(VRoom room) { 32 | return MessageAppBarStateModel._( 33 | roomId: room.id, 34 | typingModel: room.typingStatus, 35 | isOnline: room.isOnline, 36 | roomImage: room.thumbImage, 37 | roomTitle: room.title, 38 | roomType: room.roomType, 39 | isSearching: false, 40 | peerIdentifier: room.peerIdentifier, 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/models/input_state_model.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | class MessageInputModel { 8 | VBaseMessage? replyMsg; 9 | bool isCloseInput; 10 | bool isHidden; 11 | 12 | MessageInputModel({ 13 | this.replyMsg, 14 | this.isHidden = false, 15 | required this.isCloseInput, 16 | }); 17 | 18 | @override 19 | String toString() { 20 | return 'InputState{replyMsg: $replyMsg, isCloseInput: $isCloseInput}'; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | export './message_config.dart'; 2 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/page/message_pages/controllers/message_sender_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | class MessageSenderController { 6 | // final _vConfig = VChatController.I.vChatConfig; 7 | 8 | ///singleton 9 | MessageSenderController._(); 10 | 11 | static final _instance = MessageSenderController._(); 12 | 13 | static MessageSenderController get I { 14 | return _instance; 15 | } 16 | 17 | void onSubmitText(String message) { 18 | // final isEnable = _vConfig.enableEndToEndMessageEncryption; 19 | // final localMsg = VTextMessage.buildMessage( 20 | // content: isEnable ? VMessageEncryption.encryptMessage(message) : message, 21 | // isEncrypted: isEnable, 22 | // roomId: vRoom.id, 23 | // ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/page/message_pages/pasteboard/file_convertor.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | 3 | import 'package:universal_html/html.dart' as html; 4 | 5 | abstract class IFileConvertor { 6 | Future htmlFileToBytes(html.File file); 7 | } 8 | 9 | class FileConvertor implements IFileConvertor { 10 | @override 11 | Future htmlFileToBytes(html.File file) async { 12 | try { 13 | final reader = html.FileReader(); 14 | reader.readAsArrayBuffer(file); 15 | await reader.onLoad.first; 16 | return reader.result as Uint8List; 17 | } catch (e) { 18 | rethrow; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/page/message_status/single/message_single_status_controller.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | import 'package:v_chat_voice_player/v_chat_voice_player.dart'; 7 | 8 | class MessageSingleStatusController { 9 | VVoiceMessageController? voiceMessageController; 10 | 11 | void close() { 12 | voiceMessageController?.dispose(); 13 | } 14 | 15 | VVoiceMessageController? getVoiceController(VBaseMessage message) { 16 | if (message is VVoiceMessage && voiceMessageController == null) { 17 | voiceMessageController = VVoiceMessageController( 18 | id: message.localId, 19 | audioSrc: message.data.fileSource, 20 | maxDuration: message.data.durationObj, 21 | ); 22 | return voiceMessageController; 23 | } else if (message is VVoiceMessage && voiceMessageController != null) { 24 | return voiceMessageController; 25 | } 26 | return null; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/theme/theme.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './message_item_theme.dart'; 6 | export './v_message_theme.dart'; 7 | export './v_message_theme_exc.dart'; 8 | export './v_msg_status_theme.dart'; 9 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/theme/v_inherited_message_theme.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/widgets.dart'; 2 | // 3 | // import '../theme/v_message_theme.dart'; 4 | // 5 | // /// Used to make provided [MessageTheme] class available through the whole package. 6 | // class VInheritedMessageTheme extends InheritedWidget { 7 | // /// Creates [InheritedWidget] from a provided [VMessageTheme] class. 8 | // const VInheritedMessageTheme({ 9 | // super.key, 10 | // this.lightMessageTheme = const VLightMessageTheme(), 11 | // this.darkMessageTheme = const VDarkMessageTheme(), 12 | // required super.child, 13 | // }); 14 | // 15 | // /// Represents chat theme. 16 | // final VLightMessageTheme lightMessageTheme; 17 | // final VDarkMessageTheme darkMessageTheme; 18 | // 19 | // static VInheritedMessageTheme? of(BuildContext context) => 20 | // context.dependOnInheritedWidgetOfExactType(); 21 | // 22 | // @override 23 | // bool updateShouldNotify(VInheritedMessageTheme oldWidget) => 24 | // lightMessageTheme.hashCode != oldWidget.lightMessageTheme.hashCode || 25 | // darkMessageTheme.hashCode != oldWidget.darkMessageTheme.hashCode; 26 | // 27 | // VBaseMessageTheme currentTheme(bool isDark) { 28 | // if (isDark) { 29 | // return darkMessageTheme; 30 | // } 31 | // return lightMessageTheme; 32 | // } 33 | // } 34 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/v_chat/conditional_builder.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class VConditionalBuilder extends StatelessWidget { 8 | final bool _condition; 9 | final Function _thenBuilder; 10 | final Function? _elseBuilder; 11 | 12 | const VConditionalBuilder({ 13 | super.key, 14 | required bool condition, 15 | required Function thenBuilder, 16 | Function? elseBuilder, 17 | }) : _condition = condition, 18 | _thenBuilder = thenBuilder, 19 | _elseBuilder = elseBuilder; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return _condition 24 | ? _thenBuilder.call() ?? const SizedBox.shrink() 25 | : _elseBuilder?.call() ?? const SizedBox.shrink(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/v_chat/v_chat_avatar_image.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_advanced_avatar/flutter_advanced_avatar.dart'; 7 | import 'package:v_chat_message_page/src/v_chat/v_circle_avatar.dart'; 8 | 9 | class VChatAvatarImage extends StatelessWidget { 10 | final String imageUrl; 11 | final bool isOnline; 12 | final String chatTitle; 13 | final int size; 14 | 15 | const VChatAvatarImage({ 16 | super.key, 17 | required this.imageUrl, 18 | required this.isOnline, 19 | required this.chatTitle, 20 | this.size = 60, 21 | }); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return AdvancedAvatar( 26 | size: size.toDouble(), 27 | statusColor: isOnline ? Colors.green : null, 28 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(100)), 29 | foregroundDecoration: 30 | BoxDecoration(borderRadius: BorderRadius.circular(100)), 31 | name: chatTitle, 32 | child: VCircleAvatar( 33 | fullUrl: imageUrl, 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/v_chat/v_circle_avatar.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:cached_network_image/cached_network_image.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | class VCircleAvatar extends StatelessWidget { 9 | final int radius; 10 | final String fullUrl; 11 | 12 | const VCircleAvatar({ 13 | super.key, 14 | this.radius = 28, 15 | required this.fullUrl, 16 | }); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return CircleAvatar( 21 | foregroundColor: Theme.of(context).primaryColor, 22 | backgroundColor: Colors.transparent, 23 | radius: double.tryParse(radius.toString()), 24 | backgroundImage: CachedNetworkImageProvider( 25 | fullUrl, 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/v_chat/v_enums.dart: -------------------------------------------------------------------------------- 1 | enum VLoadMoreStatus { loading, loaded, error, completed } 2 | 3 | enum VChatLoadingState { loading, success, error, ideal, empty } 4 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/v_message.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './models/models.dart'; 6 | export './page/message_pages/controllers/v_base_message_controller.dart'; 7 | export './page/message_pages/pages/broadcast/v_broadcast_view.dart'; 8 | export './page/message_pages/pages/group/group_view.dart'; 9 | export './page/message_pages/pages/order/v_order_view.dart'; 10 | export './page/message_pages/pages/single/v_single_view.dart'; 11 | export './page/message_pages/v_message_page.dart'; 12 | export './theme/theme.dart'; 13 | export './widgets/widgets.dart'; 14 | export 'core/core.dart'; 15 | export './agora/v_agora.dart'; 16 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/bubble/bubble_normal.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BubbleNormal extends StatelessWidget { 4 | final double bubbleRadius; 5 | final bool isSender; 6 | final Color color; 7 | final bool tail; 8 | final Widget child; 9 | 10 | const BubbleNormal({ 11 | super.key, 12 | this.bubbleRadius = 16, 13 | required this.isSender, 14 | required this.child, 15 | required this.color, 16 | this.tail = true, 17 | }); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Container( 22 | decoration: BoxDecoration( 23 | color: color, 24 | borderRadius: BorderRadius.only( 25 | topLeft: Radius.circular(bubbleRadius), 26 | topRight: Radius.circular(bubbleRadius), 27 | bottomLeft: Radius.circular( 28 | tail 29 | ? isSender 30 | ? bubbleRadius 31 | : 0 32 | : 16, 33 | ), 34 | bottomRight: Radius.circular( 35 | tail 36 | ? isSender 37 | ? 0 38 | : bubbleRadius 39 | : 16, 40 | ), 41 | ), 42 | ), 43 | child: child, 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/center_item_holder.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:v_chat_message_page/src/core/extension.dart'; 7 | 8 | class CenterItemHolder extends StatelessWidget { 9 | const CenterItemHolder({super.key, required this.child}); 10 | final Widget child; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Center( 15 | child: Container( 16 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 1), 17 | decoration: BoxDecoration( 18 | color: context.isDark ? Colors.black : Colors.white, 19 | borderRadius: BorderRadius.circular(10), 20 | ), 21 | child: child, 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/direction_item_holder.dart: -------------------------------------------------------------------------------- 1 | // // Copyright 2023, the hatemragab project author. 2 | // // All rights reserved. Use of this source code is governed by a 3 | // // MIT license that can be found in the LICENSE file. 4 | // 5 | // import 'package:flutter/material.dart'; 6 | // import 'package:v_chat_message_page/src/theme/theme.dart'; 7 | // 8 | // class DirectionItemHolder extends StatelessWidget { 9 | // final Widget child; 10 | // final bool isMeSender; 11 | // 12 | // const DirectionItemHolder({ 13 | // Key? key, 14 | // required this.child, 15 | // required this.isMeSender, 16 | // }) : super(key: key); 17 | // 18 | // @override 19 | // Widget build(BuildContext context) { 20 | // return context.vMessageTheme.messageItemHolder( 21 | // context, 22 | // isMeSender, 23 | // child, 24 | // ); 25 | // } 26 | // } 27 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/forward_item_widget.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class ForwardItemWidget extends StatelessWidget { 8 | final bool isFroward; 9 | 10 | const ForwardItemWidget({ 11 | super.key, 12 | required this.isFroward, 13 | }); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | if (!isFroward) return const SizedBox.shrink(); 18 | return const Icon( 19 | Icons.forward, 20 | color: Colors.grey, 21 | size: 15, 22 | ); 23 | // return Padding( 24 | // padding: const EdgeInsets.only(bottom: 3), 25 | // child: Row( 26 | // mainAxisSize: MainAxisSize.min, 27 | // mainAxisAlignment: MainAxisAlignment.start, 28 | // children: [ 29 | // const Icon( 30 | // Icons.forward, 31 | // color: Colors.grey, 32 | // size: 18, 33 | // ), 34 | // const SizedBox( 35 | // width: 6, 36 | // ), 37 | // language.forwarded.cap.color(Colors.grey) 38 | // ], 39 | // ), 40 | // ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/message_broadcast_icon.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:phosphor_flutter/phosphor_flutter.dart'; 7 | 8 | class MessageBroadcastWidget extends StatelessWidget { 9 | final bool isFromBroadcast; 10 | 11 | const MessageBroadcastWidget({super.key, required this.isFromBroadcast}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | if (!isFromBroadcast) return const SizedBox.shrink(); 16 | return const Padding( 17 | padding: EdgeInsets.only(right: 5), 18 | child: Icon( 19 | PhosphorIcons.speakerHigh, 20 | size: 15, 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/message_time_widget.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:intl/intl.dart'; 7 | 8 | class MessageTimeWidget extends StatelessWidget { 9 | final DateTime dateTime; 10 | 11 | const MessageTimeWidget({ 12 | super.key, 13 | required this.dateTime, 14 | }); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Text( 19 | DateFormat.jm(Localizations.localeOf(context).languageCode) 20 | .format(dateTime.toLocal()), 21 | style: Theme.of(context).textTheme.bodySmall!.copyWith( 22 | fontWeight: FontWeight.w200, 23 | fontSize: 11, 24 | ), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/message_typing_widget.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class MessageTypingWidget extends StatelessWidget { 8 | final String text; 9 | const MessageTypingWidget({super.key, required this.text}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Text( 14 | text, 15 | style: const TextStyle(color: Colors.green), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/shared/rounded_container.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class RoundedContainer extends StatelessWidget { 8 | final Widget child; 9 | final double? height; 10 | final double? width; 11 | final EdgeInsetsGeometry? padding; 12 | final Color? color; 13 | final BorderRadiusGeometry? borderRadius; 14 | final Alignment alignment; 15 | final BoxShape boxShape; 16 | 17 | const RoundedContainer({ 18 | super.key, 19 | required this.child, 20 | this.height, 21 | this.width, 22 | this.padding, 23 | this.color = Colors.transparent, 24 | this.alignment = Alignment.center, 25 | this.borderRadius, 26 | this.boxShape = BoxShape.rectangle, 27 | }); 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return Container( 32 | alignment: alignment, 33 | decoration: BoxDecoration( 34 | color: color, 35 | borderRadius: borderRadius, 36 | shape: boxShape, 37 | ), 38 | height: height, 39 | width: width, 40 | padding: padding, 41 | child: child, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/widgets/all_deleted_item.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:v_chat_message_page/src/theme/theme.dart'; 7 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 8 | 9 | class AllDeletedItem extends StatelessWidget { 10 | final VBaseMessage message; 11 | final String messageHasBeenDeletedLabel; 12 | 13 | const AllDeletedItem({ 14 | super.key, 15 | required this.message, 16 | required this.messageHasBeenDeletedLabel, 17 | }); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Padding( 22 | padding: const EdgeInsets.all(10), 23 | child: Text( 24 | messageHasBeenDeletedLabel, 25 | style: message.isMeSender 26 | ? context.vMessageTheme.senderTextStyle 27 | .merge(const TextStyle(fontStyle: FontStyle.italic)) 28 | : context.vMessageTheme.receiverTextStyle 29 | .merge(const TextStyle(fontStyle: FontStyle.italic)), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/widgets/image_message_item.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | import '../shared/constraint_image.dart'; 9 | 10 | class ImageMessageItem extends StatelessWidget { 11 | final VImageMessage message; 12 | 13 | const ImageMessageItem({ 14 | super.key, 15 | required this.message, 16 | }); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return VConstraintImage( 21 | data: message.data, 22 | borderRadius: BorderRadius.circular(15), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/message_items/widgets/location_message_item.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:phosphor_flutter/phosphor_flutter.dart'; 7 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 8 | 9 | class LocationMessageItem extends StatelessWidget { 10 | final VLocationMessage message; 11 | 12 | const LocationMessageItem({ 13 | super.key, 14 | required this.message, 15 | }); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Row( 20 | mainAxisSize: MainAxisSize.min, 21 | children: [ 22 | const Icon( 23 | PhosphorIcons.mapPin, 24 | size: 44, 25 | ), 26 | Expanded( 27 | child: ListTile( 28 | visualDensity: const VisualDensity(horizontal: 0, vertical: -4), 29 | dense: true, 30 | title: Text(message.data.linkPreviewData.title.toString()), 31 | subtitle: Text( 32 | message.data.linkPreviewData.desc.toString(), 33 | maxLines: 2, 34 | overflow: TextOverflow.ellipsis, 35 | ), 36 | ), 37 | ) 38 | ], 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/src/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './message_items/shared/message_status_icon.dart'; 6 | export './message_items/shared/text_parser_widget.dart'; 7 | export '../theme/v_inherited_message_theme.dart'; 8 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/lib/v_chat_message_page.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | library v_chat_message_page; 6 | 7 | export 'package:v_chat_input_ui/v_chat_input_ui.dart'; 8 | export 'package:v_chat_voice_player/v_chat_voice_player.dart'; 9 | 10 | export './src/v_message.dart'; 11 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/pubspec_overrides.yaml: -------------------------------------------------------------------------------- 1 | # melos_managed_dependency_overrides: v_chat_sdk_core 2 | dependency_overrides: 3 | v_chat_sdk_core: 4 | path: ../../core_packages/v_chat_sdk_core 5 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_message_page/test/v_chat_message_page_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | initial release. 4 | 5 | ## 0.1.0 6 | 7 | add theming 8 | 9 | ## 0.3.0 10 | 11 | - add web support 12 | 13 | ## 0.4.0 14 | 15 | - full localization support 16 | - ## 0.5.0 17 | - support voice and video calls 18 | 19 | ## 1.0.0 20 | 21 | - Support Dart 3 22 | 23 | ## 1.1.0 24 | 25 | - update translation system 26 | 27 | ## 2.1.0 28 | - Support video and voice calls -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 hatemragab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish,and 9 | to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | You don't have right to re sell this Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | 4 | # You might want to exclude auto-generated files from dart analysis 5 | analyzer: 6 | exclude: 7 | - room_example/** 8 | - ./room_example 9 | - '**.g.dart' 10 | 11 | 12 | # You can customize the lint rules set to your own liking. A list of all rules 13 | # can be found at https://dart-lang.github.io/linter/lints/options/options.html 14 | linter: 15 | rules: 16 | # Util classes are awesome! 17 | # avoid_classes_with_only_static_members: false 18 | 19 | # Make constructors the first thing in every class 20 | # sort_constructors_first: true 21 | 22 | # Choose wisely, but you don't have to 23 | # prefer_double_quotes: true 24 | # prefer_single_quotes: true 25 | 26 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/example/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/assets/data/api_rooms.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'local_messages.dart'; 6 | 7 | final fakeApiRooms = [ 8 | { 9 | "_id": "rid1", 10 | "uId": "638a78804eada01ff9a7033f", 11 | "rId": "rid1", 12 | "lSMId": "63a9d86c5b1dd26b917b37bd", 13 | "rT": "s", 14 | "t": "user2", 15 | "tEn": "user2", 16 | "nTitle": null, 17 | "img": "default_user_chat_image.png", 18 | "isD": false, 19 | "isA": false, 20 | "isM": false, 21 | "pId": "638a78884eada01ff9a70348", 22 | "pIdentifier": "user2@gmail.com", 23 | "orderId": null, 24 | "bId": null, 25 | "createdAt": "2022-12-26T17:22:52.063Z", 26 | "updatedAt": "2022-12-26T17:23:29.304Z", 27 | "messages": [fakeLocalMessages[1]], 28 | "uC": 0 29 | } 30 | ]; 31 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/assets/data/local_rooms.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'local_messages.dart'; 6 | 7 | final fakeLocalRooms = [ 8 | { 9 | "tb_r_id": "rid1", 10 | "tb_r_room_type": "s", 11 | "tb_r_title": "user 2", 12 | "tb_r_img": "default_user_image.png", 13 | "tb_r_is_archived": 0, 14 | "tb_r_is_muted": 0, 15 | "tb_r_peer_id": "user2Id", 16 | "tb_r_peer_identifier": "user2@gmail.com", 17 | "tb_r_blocker_id": null, 18 | "tb_r_title_en": "user 2", 19 | "tb_r_un_counter": 0, 20 | "tb_r_nick_name": null, 21 | "tb_r_created_at": "2022-12-28T14:39:32Z", 22 | ...fakeLocalMessages.first 23 | } 24 | ]; 25 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/room.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export 'pages/choose_rooms/choose_rooms_page.dart'; 6 | export 'shared/shared.dart'; 7 | export 'widgets/widgets.dart'; 8 | export './pages/room_page/v_room_page.dart'; 9 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/colored_circle_container.dart: -------------------------------------------------------------------------------- 1 | // // Copyright 2023, the hatemragab project author. 2 | // // All rights reserved. Use of this source code is governed by a 3 | // // MIT license that can be found in the LICENSE file. 4 | // 5 | // import 'package:flutter/material.dart'; 6 | // import 'package:textless/textless.dart'; 7 | // 8 | // class ColoredCircleContainer extends StatelessWidget { 9 | // final Color backgroundColor; 10 | // final Color textColor; 11 | // final String text; 12 | // final EdgeInsets padding; 13 | // 14 | // const ColoredCircleContainer({ 15 | // super.key, 16 | // required this.backgroundColor, 17 | // required this.text, 18 | // this.padding = const EdgeInsets.all(8), 19 | // this.textColor = Colors.white, 20 | // }); 21 | // 22 | // @override 23 | // Widget build(BuildContext context) { 24 | // return Container( 25 | // decoration: BoxDecoration(color: backgroundColor, shape: BoxShape.circle), 26 | // padding: padding, 27 | // child: text.cap.color(textColor), 28 | // ); 29 | // } 30 | // } 31 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/enums.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | enum VRoomItemClickRes { mute, unMute, delete, report, leave } 6 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/extension.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | extension MediaQueryExt2 on BuildContext { 8 | bool get isDark => Theme.of(this).brightness == Brightness.dark; 9 | 10 | Future toPage(Widget page) => Navigator.push( 11 | this, 12 | MaterialPageRoute( 13 | builder: (context) => page, 14 | ), 15 | ); 16 | 17 | Future toPageAndRemoveAll(Widget page) { 18 | return Navigator.of(this).pushAndRemoveUntil( 19 | MaterialPageRoute(builder: (context) => page), 20 | (Route route) => false); 21 | } 22 | 23 | bool get isRtl => Directionality.of(this).name.toLowerCase() == "rtl"; 24 | } 25 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/extentions.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 6 | 7 | extension VSortRoomByMsgId on List { 8 | List sortByMsgId() { 9 | sort((a, b) { 10 | return b.lastMessage.id.compareTo(a.lastMessage.id); 11 | }); 12 | return this; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/room_nav.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:v_chat_room_page/src/room/shared/extension.dart'; 6 | import 'package:v_chat_sdk_core/v_chat_sdk_core.dart'; 7 | 8 | import '../../../v_chat_room_page.dart'; 9 | 10 | final vDefaultRoomNavigator = VRoomNavigator( 11 | toForwardPage: (context, currentRoomId) async { 12 | return await context.toPage(VChooseRoomsPage( 13 | currentRoomId: currentRoomId, 14 | )); 15 | }, 16 | ); 17 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/shared.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export './room_nav.dart'; 6 | export './v_room_trans.dart'; 7 | export 'enums.dart'; 8 | export 'theme/theme.dart'; 9 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/stream_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | mixin StreamMix { 4 | final streamsMix = []; 5 | 6 | void closeStreamMix() { 7 | for (final stream in streamsMix) { 8 | stream.cancel(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/theme/theme.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export 'v_room_theme.dart'; 6 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/v_chat_avatar_image.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_advanced_avatar/flutter_advanced_avatar.dart'; 7 | import 'package:v_chat_room_page/src/room/shared/v_circle_avatar.dart'; 8 | 9 | class VChatAvatarImage extends StatelessWidget { 10 | final String imageUrl; 11 | final bool isOnline; 12 | final String chatTitle; 13 | final int size; 14 | 15 | const VChatAvatarImage({ 16 | super.key, 17 | required this.imageUrl, 18 | required this.isOnline, 19 | required this.chatTitle, 20 | this.size = 60, 21 | }); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return AdvancedAvatar( 26 | size: size.toDouble(), 27 | statusColor: isOnline ? Colors.green : null, 28 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(100)), 29 | foregroundDecoration: 30 | BoxDecoration(borderRadius: BorderRadius.circular(100)), 31 | name: chatTitle, 32 | child: VCircleAvatar( 33 | fullUrl: imageUrl, 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/shared/v_circle_avatar.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:cached_network_image/cached_network_image.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | class VCircleAvatar extends StatelessWidget { 9 | final int radius; 10 | final String fullUrl; 11 | 12 | const VCircleAvatar({ 13 | super.key, 14 | this.radius = 28, 15 | required this.fullUrl, 16 | }); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return CircleAvatar( 21 | foregroundColor: Theme.of(context).primaryColor, 22 | backgroundColor: Colors.transparent, 23 | radius: double.tryParse(radius.toString()), 24 | backgroundImage: CachedNetworkImageProvider( 25 | fullUrl, 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/widgets/room_item_builder/chat_title.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:v_chat_room_page/src/room/shared/shared.dart'; 8 | 9 | import '../../../../v_chat_room_page.dart'; 10 | 11 | /// A widget that displays the title of a chat. /// /// This widget is created using the [StatelessWidget] class, which means it does not have any mutable state. /// The [title] parameter is required to display the title of the chat. class ChatTitle extends StatelessWidget { /// The title of the chat. final String title; 12 | /// Creates a [ChatTitle] widget. /// /// The [title] parameter is required to display the title of the chat. const ChatTitle({ Key? key, required this.title, }) : super(key: key); 13 | // ... } 14 | class ChatTitle extends StatelessWidget { 15 | /// The title of the chat. 16 | final String title; 17 | 18 | /// Creates a [ChatTitle] widget. 19 | const ChatTitle({ 20 | super.key, 21 | required this.title, 22 | }); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return context.vRoomTheme.getChatTitle(title); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/widgets/room_item_builder/chat_typing_widget.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | /// A widget that displays typing indicator in the chat. 8 | /// This widget receives a [text] parameter, which is a string that represents 9 | /// the text to be displayed along with the typing indicator. 10 | /// This widget is stateless, so any changes to the [text] property will cause 11 | /// a rebuild of the widget tree. */ class ChatTypingWidget extends StatelessWidget { final String text; const ChatTypingWidget({Key? key, required this.text}) : super(key: key); } 12 | class ChatTypingWidget extends StatelessWidget { 13 | /// The text to be displayed along with the typing indicator. 14 | final String text; 15 | 16 | /// Creates a [ChatTypingWidget] widget. 17 | const ChatTypingWidget({super.key, required this.text}); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Text( 22 | text.toLowerCase(), 23 | style: const TextStyle(color: Colors.green), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/src/room/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | export 'room_item/v_room_item.dart'; 6 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/lib/v_chat_room_page.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | 5 | library v_chat_room_page; 6 | 7 | export './src/room/room.dart'; 8 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: v_chat_room_page 2 | description: v chat rooms page ui package this package is part of v chat sdk and cant be used alone. 3 | version: 2.1.0 4 | homepage: https://v-chat-sdk.github.io/vchat-v2-docs/docs/intro 5 | issue_tracker: https://github.com/hatemragab/v_chat_sdk/issues 6 | repository: https://github.com/hatemragab/v_chat_sdk/tree/master/v_ui_packages/v_chat_web_rtc 7 | 8 | environment: 9 | sdk: '>=2.17.0 <4.0.0' 10 | flutter: ">=1.17.0" 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | v_chat_sdk_core: ^2.1.0 16 | cached_network_image: ^3.3.1 17 | flutter_advanced_avatar: ^1.5.0 18 | map_launcher: ^3.3.0 19 | flutter_cache_manager: ^3.3.2 20 | loadmore: ^2.1.0 21 | meta: ^1.12.0 22 | badges: ^3.1.2 23 | v_platform: ^2.0.0 24 | timeago: ^3.6.1 25 | collection: ^1.18.0 26 | intl: ^0.19.0 27 | adaptive_dialog: ^2.1.0 28 | 29 | dev_dependencies: 30 | 31 | flutter_lints: ^4.0.0 32 | lints: ^4.0.0 33 | 34 | flutter: 35 | 36 | platforms: 37 | android: 38 | ios: 39 | web: 40 | windows: 41 | macos: 42 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/pubspec_overrides.yaml: -------------------------------------------------------------------------------- 1 | # melos_managed_dependency_overrides: v_chat_sdk_core 2 | dependency_overrides: 3 | v_chat_sdk_core: 4 | path: ../../core_packages/v_chat_sdk_core 5 | -------------------------------------------------------------------------------- /v_ui_packages/v_chat_room_page/test/v_chat_room_page_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023, the hatemragab project author. 2 | // All rights reserved. Use of this source code is governed by a 3 | // MIT license that can be found in the LICENSE file. 4 | --------------------------------------------------------------------------------