├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── generated_plugin_registrant.cc └── my_application.h ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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-1024x1024@1x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ ├── AppDelegate.swift │ └── GoogleService-Info.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── firebase_app_id_file.json ├── RunnerTests │ └── RunnerTests.swift └── .gitignore ├── macos ├── Flutter │ ├── Flutter-Debug.xcconfig │ └── Flutter-Release.xcconfig ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ └── app_icon_1024.png │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── RunnerTests │ └── RunnerTests.swift ├── lib ├── product │ ├── cache │ │ ├── cache_enums.dart │ │ ├── application_properties.dart │ │ └── application_properties_manager.dart │ ├── constants │ │ ├── hive_constants.dart │ │ ├── defaultPhotos.dart │ │ ├── duration_constants.dart │ │ ├── edgeInsents_constants.dart │ │ ├── error_constants.dart │ │ ├── network_costants.dart │ │ ├── lottie_constants.dart │ │ ├── color_constants.dart │ │ └── project_colors.dart │ ├── models │ │ ├── base_response.dart │ │ ├── refresh_token │ │ │ ├── request │ │ │ │ ├── refresh_request.dart │ │ │ │ └── refresh_request.g.dart │ │ │ └── response │ │ │ │ ├── refresh_response.dart │ │ │ │ └── refresh_response.g.dart │ │ ├── response_data.g.dart │ │ ├── response_data.dart │ │ ├── core_models │ │ │ ├── city.dart │ │ │ ├── follower.dart │ │ │ ├── followee.dart │ │ │ ├── country.dart │ │ │ ├── country.g.dart │ │ │ ├── message.g.dart │ │ │ ├── message_room.dart │ │ │ ├── message.dart │ │ │ ├── city.g.dart │ │ │ ├── category.dart │ │ │ ├── category.g.dart │ │ │ ├── message_room.g.dart │ │ │ ├── followee.g.dart │ │ │ ├── follower.g.dart │ │ │ ├── user_groups.dart │ │ │ ├── group.dart │ │ │ ├── user_like_events.dart │ │ │ ├── user_groups.g.dart │ │ │ ├── user.dart │ │ │ ├── event_attendees.dart │ │ │ ├── event.dart │ │ │ ├── event_attendees.g.dart │ │ │ └── user_like_events.g.dart │ │ └── user │ │ │ ├── response │ │ │ ├── user_response.dart │ │ │ └── user_response.g.dart │ │ │ └── request │ │ │ ├── user_request.g.dart │ │ │ └── user_request.dart │ ├── helpers │ │ ├── string_extension.dart │ │ ├── auth_guard.dart │ │ ├── firebase_utilities.dart │ │ └── permisson_handler.dart │ ├── auth │ │ ├── domain │ │ │ └── models │ │ │ │ ├── request │ │ │ │ ├── login_request.dart │ │ │ │ └── login_request.g.dart │ │ │ │ └── response │ │ │ │ ├── login_response.dart │ │ │ │ └── login_response.g.dart │ │ └── data │ │ │ ├── data_access │ │ │ ├── user_service.dart │ │ │ └── login_service.dart │ │ │ ├── operations │ │ │ └── login_operations.dart │ │ │ └── repositories │ │ │ └── user_repository.dart │ └── widgets │ │ ├── title_text.dart │ │ ├── project_back_button.dart │ │ ├── skip_button.dart │ │ ├── lottie_animation.dart │ │ ├── global_progress_loading_bar.dart │ │ └── dropdown_form_field.dart ├── features │ ├── main │ │ └── presentation │ │ │ └── cubit │ │ │ ├── view_model │ │ │ ├── route_enums.dart │ │ │ └── main_view_model.dart │ │ │ └── main_cubit.dart │ ├── discover │ │ └── presentation │ │ │ └── discover_page.dart │ ├── location_picking │ │ └── domain │ │ │ └── models │ │ │ ├── event_location.dart │ │ │ └── event_location.g.dart │ ├── onboard │ │ └── presentation │ │ │ └── view_model │ │ │ ├── onboard_view_model.dart │ │ │ └── onboard_model.dart │ ├── following │ │ ├── domain │ │ │ └── models │ │ │ │ ├── request │ │ │ │ ├── following_request.dart │ │ │ │ └── following_request.g.dart │ │ │ │ └── response │ │ │ │ ├── following_response.dart │ │ │ │ └── following_response.g.dart │ │ └── data │ │ │ ├── data_access │ │ │ └── following_service.dart │ │ │ └── repository │ │ │ └── following_repository.dart │ ├── user_like_event │ │ ├── domain │ │ │ ├── request │ │ │ │ ├── user_like_event_request.dart │ │ │ │ └── user_like_event_request.g.dart │ │ │ └── response │ │ │ │ ├── user_like_event_response.dart │ │ │ │ └── user_like_event_response.g.dart │ │ └── data │ │ │ └── data_access │ │ │ └── user_like_event_service.dart │ ├── user_attend_event │ │ ├── domain │ │ │ ├── request │ │ │ │ ├── user_attend_event_request.dart │ │ │ │ └── user_attend_event_request.g.dart │ │ │ └── response │ │ │ │ ├── user_attend_event_response.dart │ │ │ │ └── user_attend_event_response.g.dart │ │ └── data │ │ │ └── data_access │ │ │ └── user_attend_event_service.dart │ ├── privacy_policy │ │ └── presentation │ │ │ └── privacy_policy_page.dart │ ├── login_with_email │ │ ├── domain │ │ │ └── models │ │ │ │ └── request │ │ │ │ ├── login_with_email_request.g.dart │ │ │ │ └── login_with_email_request.dart │ │ └── presentation │ │ │ └── pages │ │ │ └── login_with_email_wrapper.dart │ ├── notification │ │ ├── presentation │ │ │ └── pages │ │ │ │ └── notification_page.dart │ │ ├── data │ │ │ ├── data_access │ │ │ │ └── notification_service.dart │ │ │ └── repository │ │ │ │ └── notification_repository.dart │ │ └── domain │ │ │ └── models │ │ │ └── request │ │ │ ├── notification_request.g.dart │ │ │ └── notification_request.dart │ ├── weather │ │ ├── presentation │ │ │ └── cubit │ │ │ │ ├── view_model │ │ │ │ └── weather_view_model.dart │ │ │ │ └── weather_cubit.dart │ │ ├── data │ │ │ ├── data_access │ │ │ │ └── weather_service.dart │ │ │ └── repository │ │ │ │ └── weather_repository.dart │ │ └── domain │ │ │ └── weater.dart │ ├── donate │ │ ├── presentation │ │ │ ├── cubit │ │ │ │ ├── view_model │ │ │ │ │ └── donate_view_model.dart │ │ │ │ └── donate_cubit.dart │ │ │ └── widgets │ │ │ │ ├── donate_head.dart │ │ │ │ └── google_pay_donate_button.dart │ │ └── api │ │ │ └── pay_constants.dart │ ├── login_with_phone │ │ └── presentation │ │ │ └── pages │ │ │ └── login_with_phone_wrapper.dart │ ├── groups │ │ ├── presentation │ │ │ ├── widgets │ │ │ │ ├── group_form_image.dart │ │ │ │ ├── group_grid.dart │ │ │ │ ├── group_loading.dart │ │ │ │ └── group_detail_description.dart │ │ │ └── cubit │ │ │ │ └── view_model │ │ │ │ ├── groups_view_model.dart │ │ │ │ ├── add_group_view_model.dart │ │ │ │ ├── group_detail_view_model.dart │ │ │ │ └── edit_group_view_model.dart │ │ └── domain │ │ │ └── models │ │ │ └── request │ │ │ ├── group_request.g.dart │ │ │ ├── update_group_request.g.dart │ │ │ ├── group_request.dart │ │ │ └── update_group_request.dart │ ├── category │ │ ├── data │ │ │ ├── cache │ │ │ │ └── category_cache_manager.dart │ │ │ ├── dataAccess │ │ │ │ └── category_service.dart │ │ │ └── repository │ │ │ │ └── category_repository.dart │ │ ├── domain │ │ │ └── models │ │ │ │ └── response │ │ │ │ ├── category_response.dart │ │ │ │ ├── category_details_response.dart │ │ │ │ └── category_details_response.g.dart │ │ └── presentation │ │ │ ├── widgets │ │ │ ├── category_grid.dart │ │ │ └── categories_head.dart │ │ │ └── cubit │ │ │ └── view_model │ │ │ └── category_view_model.dart │ ├── search │ │ └── presentation │ │ │ ├── cubit │ │ │ ├── view_model │ │ │ │ └── search_view_model.dart │ │ │ └── search_cubit.dart │ │ │ └── widgets │ │ │ └── custom_search_bar.dart │ ├── user_group │ │ ├── domain │ │ │ └── models │ │ │ │ └── request │ │ │ │ ├── user_group_request.g.dart │ │ │ │ └── user_group_request.dart │ │ └── data │ │ │ ├── data_access │ │ │ └── user_group_service.dart │ │ │ └── repository │ │ │ └── user_group_repository.dart │ ├── register │ │ ├── data │ │ │ ├── data_access │ │ │ │ └── register_service.dart │ │ │ └── repository │ │ │ │ └── register_repository.dart │ │ ├── domain │ │ │ └── request │ │ │ │ ├── register_request.g.dart │ │ │ │ └── register_request.dart │ │ └── presentation │ │ │ └── cubit │ │ │ └── view_model │ │ │ └── register_view_model.dart │ ├── splash │ │ └── splash_page.dart │ ├── city │ │ └── data │ │ │ ├── data_access │ │ │ └── city_service.dart │ │ │ └── repository │ │ │ └── city_repository.dart │ ├── event │ │ ├── domain │ │ │ └── models │ │ │ │ └── request │ │ │ │ ├── event_request.g.dart │ │ │ │ └── update_event_request.g.dart │ │ └── presentation │ │ │ └── cubit │ │ │ └── view_model │ │ │ ├── add_event_view_model.dart │ │ │ ├── edit_event_view_model.dart │ │ │ └── event_card_view_model.dart │ ├── chat │ │ └── presentation │ │ │ ├── widgets │ │ │ └── chat_loader.dart │ │ │ └── cubit │ │ │ └── view_model │ │ │ └── chat_view_model.dart │ ├── home │ │ └── presentation │ │ │ └── widgets │ │ │ └── home_event_list.dart │ ├── profile │ │ ├── data │ │ │ └── dataAccess │ │ │ │ └── profile_service.dart │ │ └── presentation │ │ │ └── cubit │ │ │ └── view_model │ │ │ ├── profile_view_model.dart │ │ │ └── edit_profile_view_model.dart │ └── maps │ │ └── presentation │ │ └── extensions │ │ └── map_marker_extension.dart ├── core │ ├── helpers │ │ ├── globals.dart │ │ ├── properties_app.dart │ │ ├── image_crop.dart │ │ └── image_upload.dart │ ├── presentation │ │ └── base_view_model.dart │ ├── security │ │ └── secure_storage.dart │ ├── error │ │ ├── error_extension.dart │ │ ├── error_models │ │ │ ├── api_error_model.dart │ │ │ └── api_error_model.g.dart │ │ ├── error_factory.dart │ │ ├── error.dart │ │ ├── default_error_factory.dart │ │ └── error_separator.dart │ ├── cache │ │ ├── response_cache_manager.dart │ │ └── base_cache_manager.dart │ └── network │ │ ├── dio.dart │ │ └── auth_interceptor.dart ├── l10n │ └── l10n.dart ├── app │ ├── base_cubit.dart │ └── app_wrapper_page.dart └── main.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png └── manifest.json ├── l10n.yaml ├── assets └── images │ ├── google.png │ ├── logo.png │ ├── register.png │ ├── expanded_logo.png │ ├── login_with_email.png │ ├── login_with_phone.png │ ├── logo_foreground.png │ ├── onboard_helping.png │ ├── onboard_networking.png │ ├── default_group_photo.png │ ├── default_profile_photo.png │ └── onboard_announcement.png ├── android ├── gradle.properties ├── app │ └── src │ │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_launcher.png │ │ │ │ └── launch_background.xml │ │ │ ├── drawable-v21 │ │ │ │ ├── ic_launcher.png │ │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ └── ic_launcher.xml │ │ │ └── values-night │ │ │ │ └── styles.xml │ │ └── kotlin │ │ │ └── com │ │ │ └── example │ │ │ └── connectopia │ │ │ └── MainActivity.kt │ │ ├── debug │ │ └── AndroidManifest.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ └── main.cpp ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── .gitignore └── test └── widget_test.dart /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /lib/product/cache/cache_enums.dart: -------------------------------------------------------------------------------- 1 | enum CacheEnums { applicationProperties, categories } 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/web/favicon.png -------------------------------------------------------------------------------- /l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: lib/l10n 2 | template-arb-file: app_en.arb 3 | output-localization-file: app_localizations.dart -------------------------------------------------------------------------------- /assets/images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/google.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/logo.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/images/register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/register.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/images/expanded_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/expanded_logo.png -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/images/login_with_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/login_with_email.png -------------------------------------------------------------------------------- /assets/images/login_with_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/login_with_phone.png -------------------------------------------------------------------------------- /assets/images/logo_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/logo_foreground.png -------------------------------------------------------------------------------- /assets/images/onboard_helping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/onboard_helping.png -------------------------------------------------------------------------------- /assets/images/onboard_networking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/onboard_networking.png -------------------------------------------------------------------------------- /lib/features/main/presentation/cubit/view_model/route_enums.dart: -------------------------------------------------------------------------------- 1 | enum RouteEnums{ 2 | maps, 3 | home, 4 | discover, 5 | profile 6 | } -------------------------------------------------------------------------------- /assets/images/default_group_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/default_group_photo.png -------------------------------------------------------------------------------- /assets/images/default_profile_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/default_profile_photo.png -------------------------------------------------------------------------------- /assets/images/onboard_announcement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/assets/images/onboard_announcement.png -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /lib/product/constants/hive_constants.dart: -------------------------------------------------------------------------------- 1 | class HiveConstants { 2 | static const applicationPropertiesHiveId = 0; 3 | static const categoryHiveId = 1; 4 | } 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/drawable-v21/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ffffff 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/core/helpers/globals.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | final GlobalKey snackbarKey = 4 | GlobalKey(); 5 | -------------------------------------------------------------------------------- /lib/product/constants/defaultPhotos.dart: -------------------------------------------------------------------------------- 1 | class DefaultPhotoPaths{ 2 | static String defaultPp = "https://www.pngall.com/wp-content/uploads/12/Avatar-Profile-Vector-PNG-File.png"; 3 | } -------------------------------------------------------------------------------- /lib/product/models/base_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive/hive.dart'; 2 | 3 | class BaseResponse { 4 | @HiveField(0) 5 | String? id; 6 | 7 | BaseResponse({this.id}); 8 | } 9 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /lib/l10n/l10n.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class L10n { 4 | static final all = [ 5 | const Locale('en', 'US'), 6 | const Locale('tr', 'TR'), 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/connectopia_flutter_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/core/helpers/properties_app.dart: -------------------------------------------------------------------------------- 1 | class PropertiesApp { 2 | PropertiesApp({this.isFirstTime = true}); 3 | late bool isFirstTime; 4 | 5 | void changeFirst() { 6 | isFirstTime = false; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/connectopia/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.connectopia 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/app/base_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import '../core/presentation/base_view_model.dart'; 3 | 4 | class BaseCubit extends Cubit { 5 | BaseCubit(super.initialState); 6 | } 7 | -------------------------------------------------------------------------------- /lib/product/constants/duration_constants.dart: -------------------------------------------------------------------------------- 1 | class DurationConstants { 2 | static Duration get defaultDuration => const Duration(seconds: 1); 3 | static Duration get verifyPhoneDuration => const Duration(seconds: 60); 4 | } 5 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/product/constants/edgeInsents_constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class EdgeInsetsConstants { 4 | static EdgeInsets eventDetailGeneralPadding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 10); 5 | } 6 | -------------------------------------------------------------------------------- /lib/product/helpers/string_extension.dart: -------------------------------------------------------------------------------- 1 | extension StringExtension on String { 2 | String get toNumberFormat { 3 | return replaceAllMapped( 4 | RegExp(r'(\d{3})(\d{3})(\d+)'), (Match m) => "${m[1]} ${m[2]} ${m[3]}"); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /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.5-all.zip 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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:875664835580:ios:93984e1517cb4f85f82879", 5 | "FIREBASE_PROJECT_ID": "f41-flutterfire", 6 | "GCM_SENDER_ID": "875664835580" 7 | } -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/product/constants/error_constants.dart: -------------------------------------------------------------------------------- 1 | enum ErrorConstants { 2 | userAlreadyExists, 3 | } 4 | 5 | extension ErrorConstantsExtension on ErrorConstants { 6 | String get value { 7 | switch (this) { 8 | case ErrorConstants.userAlreadyExists: 9 | return 'user already exists'; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/core/presentation/base_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @immutable 5 | class BaseViewModel extends Equatable { 6 | BaseViewModel({this.isLoading = false}); 7 | 8 | bool isLoading; 9 | 10 | @override 11 | List get props => []; 12 | } 13 | -------------------------------------------------------------------------------- /lib/core/security/secure_storage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | @module 5 | abstract class SecureStorageModule { 6 | @singleton 7 | FlutterSecureStorage secureStorage() { 8 | return const FlutterSecureStorage(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/product/auth/domain/models/request/login_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'login_request.g.dart'; 3 | 4 | @JsonSerializable(createFactory: false) 5 | class LoginRequest { 6 | String? id; 7 | 8 | LoginRequest({this.id}); 9 | 10 | Map toJson() => _$LoginRequestToJson(this); 11 | } 12 | -------------------------------------------------------------------------------- /lib/product/constants/network_costants.dart: -------------------------------------------------------------------------------- 1 | class NetworkConstants { 2 | ///base url 3 | static const BASE_URL = 4 | "https://f41-api-w1xc-git-master-erhangocen.vercel.app/api/"; 5 | 6 | /// receive timeout 7 | static const RECIEVE_TIMEOUT = 5000; 8 | 9 | /// connection timeout 10 | static const CONNECTION_TIMEOUT = 5000; 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/features/discover/presentation/discover_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @RoutePage() 5 | class DiscoverPage extends StatelessWidget { 6 | const DiscoverPage({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return const AutoRouter(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 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 | -------------------------------------------------------------------------------- /lib/core/error/error_extension.dart: -------------------------------------------------------------------------------- 1 | import 'error.dart'; 2 | 3 | extension ErrorHandle on DefaultError { 4 | String handle() => when( 5 | apiError: ((error, stackTrace, errorModel) => 6 | errorModel.error.toString()), 7 | businessError: ((error, stackTrace) => error.toString()), 8 | unknownError: ((error, stackTrace) => error.toString())); 9 | } 10 | -------------------------------------------------------------------------------- /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 | app/connectopia.jks 13 | **/*.keystore 14 | **/*.jks 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/core/error/error_models/api_error_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'api_error_model.g.dart'; 3 | 4 | @JsonSerializable() 5 | class ApiErrorModel { 6 | String? error; 7 | ApiErrorModel({ 8 | this.error, 9 | }); 10 | 11 | factory ApiErrorModel.fromJson(Map json) => 12 | _$ApiErrorModelFromJson(json); 13 | } 14 | -------------------------------------------------------------------------------- /lib/product/models/refresh_token/request/refresh_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'refresh_request.g.dart'; 3 | 4 | @JsonSerializable(createFactory: false) 5 | class RefreshRequest { 6 | String? refresh; 7 | 8 | RefreshRequest({ 9 | this.refresh, 10 | }); 11 | 12 | Map toJson() => _$RefreshRequestToJson(this); 13 | } 14 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/features/location_picking/domain/models/event_location.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'event_location.g.dart'; 4 | 5 | @JsonSerializable() 6 | class EventLocation { 7 | String? city; 8 | String? address; 9 | double? latitude; 10 | double? longitude; 11 | 12 | EventLocation({this.city, this.address, this.latitude, this.longitude}); 13 | } 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/features/onboard/presentation/view_model/onboard_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../pages/onboard_page.dart'; 4 | 5 | abstract class OnboardViewModel extends State { 6 | late PageController controller; 7 | 8 | @override 9 | void initState() { 10 | controller = PageController(); 11 | super.initState(); 12 | } 13 | 14 | int currentPage = 0; 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/product/models/refresh_token/response/refresh_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'refresh_response.g.dart'; 3 | 4 | @JsonSerializable(createToJson: false) 5 | class RefreshResponse { 6 | String? token; 7 | 8 | RefreshResponse({ 9 | this.token, 10 | }); 11 | 12 | factory RefreshResponse.fromJson(Map json) => 13 | _$RefreshResponseFromJson(json); 14 | } 15 | -------------------------------------------------------------------------------- /lib/product/auth/domain/models/response/login_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'login_response.g.dart'; 3 | 4 | @JsonSerializable(createToJson: false) 5 | class LoginResponse { 6 | String? token; 7 | String? refresh; 8 | 9 | LoginResponse({this.token, this.refresh}); 10 | 11 | factory LoginResponse.fromJson(Map json) => 12 | _$LoginResponseFromJson(json); 13 | } 14 | -------------------------------------------------------------------------------- /lib/core/error/error_factory.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/error/error_models/api_error_model.dart'; 2 | 3 | import 'error.dart'; 4 | 5 | abstract class ErrorFactory { 6 | DefaultError createApiError( 7 | dynamic error, StackTrace stackTrace, ApiErrorModel errorModel); 8 | DefaultError createBusinessError(dynamic error, StackTrace stackTrace); 9 | DefaultError createUnknownError(dynamic error, StackTrace stackTrace); 10 | } 11 | -------------------------------------------------------------------------------- /lib/features/following/domain/models/request/following_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'following_request.g.dart'; 4 | 5 | @JsonSerializable(createFactory: false) 6 | class FollowingRequest { 7 | String? followeeId; 8 | String? followerId; 9 | 10 | FollowingRequest({this.followeeId, this.followerId}); 11 | 12 | Map toJson() => _$FollowingRequestToJson(this); 13 | } 14 | -------------------------------------------------------------------------------- /lib/features/user_like_event/domain/request/user_like_event_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'user_like_event_request.g.dart'; 3 | 4 | @JsonSerializable(createFactory: false) 5 | class UserLikeEventRequest { 6 | String? eventId; 7 | String? userId; 8 | 9 | UserLikeEventRequest({this.eventId, this.userId}); 10 | 11 | Map toJson() => _$UserLikeEventRequestToJson(this); 12 | } 13 | -------------------------------------------------------------------------------- /lib/product/models/response_data.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'response_data.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ResponseData _$ResponseDataFromJson(Map json) => ResponseData( 10 | message: json['message'] as String?, 11 | ); 12 | -------------------------------------------------------------------------------- /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 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/product/widgets/title_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TitleText extends StatelessWidget { 4 | const TitleText({super.key, required this.text}); 5 | 6 | final String text; 7 | @override 8 | Widget build(BuildContext context) { 9 | return Text(text, 10 | style: Theme.of(context) 11 | .textTheme 12 | .headlineSmall 13 | ?.copyWith(fontSize: 25, fontWeight: FontWeight.bold)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/features/user_attend_event/domain/request/user_attend_event_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'user_attend_event_request.g.dart'; 3 | 4 | @JsonSerializable(createFactory: false) 5 | class UserAttendEventRequest { 6 | UserAttendEventRequest({ 7 | this.eventId, 8 | this.userId, 9 | }); 10 | 11 | String? eventId; 12 | String? userId; 13 | 14 | Map toJson() => _$UserAttendEventRequestToJson(this); 15 | } 16 | -------------------------------------------------------------------------------- /lib/product/auth/domain/models/request/login_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'login_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$LoginRequestToJson(LoginRequest instance) => 10 | { 11 | 'id': instance.id, 12 | }; 13 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 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 | -------------------------------------------------------------------------------- /lib/core/cache/response_cache_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/cache/base_cache_manager.dart'; 2 | import '../../product/models/base_response.dart'; 3 | 4 | abstract class ResponseCacheManager 5 | extends IBaseCacheService { 6 | ResponseCacheManager(String key) : super(key); 7 | 8 | @override 9 | Future putItems(List items) async { 10 | await box?.putAll(Map.fromEntries(items.map((e) => MapEntry(e.id, e)))); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/product/constants/lottie_constants.dart: -------------------------------------------------------------------------------- 1 | enum LottieConstants { mainLoginAnimation, loadingProgress } 2 | 3 | extension LottieItemsExtention on LottieConstants { 4 | String _path() { 5 | switch (this) { 6 | case LottieConstants.mainLoginAnimation: 7 | return "main_login_animation"; 8 | case LottieConstants.loadingProgress: 9 | return "loading_progress"; 10 | } 11 | } 12 | 13 | String get lottiePath => "assets/lottie/${_path()}.json"; 14 | } 15 | -------------------------------------------------------------------------------- /lib/core/helpers/image_crop.dart: -------------------------------------------------------------------------------- 1 | import 'package:image_cropper/image_cropper.dart'; 2 | import 'package:image_picker/image_picker.dart'; 3 | 4 | class ImageCropManager { 5 | final ImageCropper imageCropper = ImageCropper(); 6 | 7 | Future crop( 8 | {required XFile file, 9 | CropStyle cropStyle = CropStyle.rectangle}) async => 10 | await imageCropper.cropImage( 11 | cropStyle: cropStyle, 12 | sourcePath: file.path, 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /lib/product/models/refresh_token/request/refresh_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'refresh_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$RefreshRequestToJson(RefreshRequest instance) => 10 | { 11 | 'refresh': instance.refresh, 12 | }; 13 | -------------------------------------------------------------------------------- /lib/product/helpers/auth_guard.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:connectopia/app/app_router.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | 5 | class AuthGuard extends AutoRouteGuard { 6 | @override 7 | void onNavigation(NavigationResolver resolver, StackRouter router) { 8 | if (FirebaseAuth.instance.currentUser != null) { 9 | resolver.next(true); 10 | } else { 11 | router.replace(const MainLoginRoute()); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/product/models/refresh_token/response/refresh_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'refresh_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RefreshResponse _$RefreshResponseFromJson(Map json) => 10 | RefreshResponse( 11 | token: json['token'] as String?, 12 | ); 13 | -------------------------------------------------------------------------------- /lib/product/models/response_data.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'response_data.g.dart'; 4 | 5 | @JsonSerializable(createToJson: false) 6 | class ResponseData { 7 | String? message; 8 | ResponseData({this.message}); 9 | 10 | factory ResponseData.fromJson(Map json) => 11 | _$ResponseDataFromJson(json); 12 | 13 | ResponseData copyWith({String? message}) { 14 | return ResponseData(message: message ?? this.message); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/features/following/domain/models/response/following_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'following_response.g.dart'; 4 | 5 | @JsonSerializable(createToJson: false) 6 | class FollowingResponse { 7 | String? id; 8 | String? followeeId; 9 | String? followerId; 10 | 11 | FollowingResponse({this.id, this.followeeId, this.followerId}); 12 | 13 | factory FollowingResponse.fromJson(Map json) => 14 | _$FollowingResponseFromJson(json); 15 | } 16 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/product/auth/domain/models/response/login_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'login_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | LoginResponse _$LoginResponseFromJson(Map json) => 10 | LoginResponse( 11 | token: json['token'] as String?, 12 | refresh: json['refresh'] as String?, 13 | ); 14 | -------------------------------------------------------------------------------- /lib/product/helpers/firebase_utilities.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | class FirebaseUtilities { 4 | 5 | static String firebaseStoragePath = 6 | "https://firebasestorage.googleapis.com/v0/b/f41-flutterfire.appspot.com/o/"; 7 | 8 | static String convertFireStorePath(String path) { 9 | return "$firebaseStoragePath$path?alt=media"; 10 | } 11 | 12 | static String convertFireStoreName(String? a) { 13 | var b = a?.split(firebaseStoragePath)[1]; 14 | var c = b?.split("?alt=media")[0]; 15 | return c ?? ""; 16 | } 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /lib/product/models/core_models/city.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/core_models/country.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | part 'city.g.dart'; 4 | 5 | @JsonSerializable() 6 | class City { 7 | String? id; 8 | String? name; 9 | String? countryId; 10 | Country? country; 11 | 12 | City({this.id, this.name, this.countryId, this.country}); 13 | 14 | factory City.fromJson(Map json) => _$CityFromJson(json); 15 | 16 | Map toJson() => _$CityToJson(this); 17 | } 18 | -------------------------------------------------------------------------------- /lib/product/widgets/project_back_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../constants/color_constants.dart'; 4 | 5 | class ProjectBackButton extends StatelessWidget { 6 | const ProjectBackButton({super.key, required this.onPressed}); 7 | 8 | final VoidCallback onPressed; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return IconButton( 13 | icon: const Icon(Icons.arrow_back_ios_new_rounded), 14 | onPressed: () {onPressed();}, 15 | color: ColorConstants.darkGrey, 16 | ); 17 | } 18 | } -------------------------------------------------------------------------------- /lib/features/following/domain/models/request/following_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'following_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$FollowingRequestToJson(FollowingRequest instance) => 10 | { 11 | 'followeeId': instance.followeeId, 12 | 'followerId': instance.followerId, 13 | }; 14 | -------------------------------------------------------------------------------- /lib/features/privacy_policy/presentation/privacy_policy_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @RoutePage() 5 | class PrivacyPolicyPage extends StatelessWidget { 6 | const PrivacyPolicyPage({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | appBar: AppBar( 12 | title: const Text("Privacy Policy"), 13 | ), 14 | body: const SingleChildScrollView( 15 | child: Text(""), 16 | ) 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/product/models/user/response/user_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive_flutter/adapters.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | import '../../base_response.dart'; 4 | 5 | part 'user_response.g.dart'; 6 | 7 | @JsonSerializable() 8 | class UserResponse extends BaseResponse { 9 | @HiveField(1) 10 | String? name; 11 | 12 | @HiveField(2) 13 | String? email; 14 | 15 | UserResponse({this.name, this.email, super.id}); 16 | 17 | factory UserResponse.fromJson(Map json) => 18 | _$UserResponseFromJson(json); 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/user_like_event/domain/request/user_like_event_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_like_event_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$UserLikeEventRequestToJson( 10 | UserLikeEventRequest instance) => 11 | { 12 | 'eventId': instance.eventId, 13 | 'userId': instance.userId, 14 | }; 15 | -------------------------------------------------------------------------------- /lib/features/login_with_email/domain/models/request/login_with_email_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'login_with_email_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$LoginWithEmailRequestToJson( 10 | LoginWithEmailRequest instance) => 11 | { 12 | 'email': instance.email, 13 | 'password': instance.password, 14 | }; 15 | -------------------------------------------------------------------------------- /lib/features/user_attend_event/domain/request/user_attend_event_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_attend_event_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$UserAttendEventRequestToJson( 10 | UserAttendEventRequest instance) => 11 | { 12 | 'eventId': instance.eventId, 13 | 'userId': instance.userId, 14 | }; 15 | -------------------------------------------------------------------------------- /lib/features/user_like_event/domain/response/user_like_event_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/base_response.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | part 'user_like_event_response.g.dart'; 4 | 5 | @JsonSerializable(createToJson: false) 6 | class UserLikeEventResponse extends BaseResponse { 7 | String? eventId; 8 | String? userId; 9 | 10 | UserLikeEventResponse({super.id, this.eventId, this.userId}); 11 | 12 | factory UserLikeEventResponse.fromJson(Map json) => 13 | _$UserLikeEventResponseFromJson(json); 14 | } 15 | -------------------------------------------------------------------------------- /lib/features/notification/presentation/pages/notification_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/annotations.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | 5 | @RoutePage() 6 | class NotificationPage extends StatelessWidget { 7 | const NotificationPage({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | appBar: AppBar(), 13 | body: Center( 14 | child: Text("You have no notifications.", 15 | style: context.textTheme.titleLarge), 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/product/models/core_models/follower.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'user.dart'; 4 | part 'follower.g.dart'; 5 | 6 | @JsonSerializable() 7 | class Follower { 8 | String? id; 9 | String? followerId; 10 | String? followeeId; 11 | User? follower; 12 | 13 | Follower({ 14 | this.id, 15 | this.followerId, 16 | this.followeeId, 17 | this.follower, 18 | }); 19 | 20 | factory Follower.fromJson(Map json) => 21 | _$FollowerFromJson(json); 22 | 23 | Map toJson() => _$FollowerToJson(this); 24 | } 25 | -------------------------------------------------------------------------------- /lib/product/models/core_models/followee.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'user.dart'; 4 | 5 | part 'followee.g.dart'; 6 | 7 | @JsonSerializable() 8 | class Followee { 9 | String? id; 10 | String? followerId; 11 | String? followeeId; 12 | User? followee; 13 | 14 | Followee({ 15 | this.id, 16 | this.followerId, 17 | this.followeeId, 18 | this.followee, 19 | }); 20 | 21 | factory Followee.fromJson(Map json) => 22 | _$FolloweeFromJson(json); 23 | 24 | Map toJson() => _$FolloweeToJson(this); 25 | } 26 | -------------------------------------------------------------------------------- /lib/features/following/domain/models/response/following_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'following_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FollowingResponse _$FollowingResponseFromJson(Map json) => 10 | FollowingResponse( 11 | id: json['id'] as String?, 12 | followeeId: json['followeeId'] as String?, 13 | followerId: json['followerId'] as String?, 14 | ); 15 | -------------------------------------------------------------------------------- /lib/product/models/core_models/country.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'country.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Country { 6 | String? id; 7 | String? name; 8 | 9 | Country({this.id, this.name}); 10 | 11 | Country copyWith({ 12 | String? id, 13 | String? name, 14 | }) { 15 | return Country( 16 | id: id ?? this.id, 17 | name: name ?? this.name, 18 | ); 19 | } 20 | 21 | factory Country.fromJson(Map json) => 22 | _$CountryFromJson(json); 23 | 24 | Map toJson() => _$CountryToJson(this); 25 | } 26 | -------------------------------------------------------------------------------- /lib/product/constants/color_constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColorConstants { 4 | static Color transparent = Colors.transparent; 5 | static Color darkGrey = const Color.fromARGB(255, 92, 92, 92); 6 | static Color lightGrey = const Color.fromARGB(255, 135, 135, 135); 7 | static Color whiteGrey = const Color.fromARGB(255, 226, 226, 226); 8 | 9 | static Color appBlue = const Color(0xff418CF5); 10 | static Color appGreen = const Color(0xff31AB5C); 11 | static Color appYellow = const Color(0xffFABD07); 12 | static Color denemeColor = const Color.fromARGB(255, 250, 7, 205); 13 | } 14 | -------------------------------------------------------------------------------- /lib/core/error/error.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | import 'package:connectopia/core/error/error_models/api_error_model.dart'; 3 | 4 | part 'error.freezed.dart'; 5 | 6 | @freezed 7 | class DefaultError with _$DefaultError { 8 | const factory DefaultError.apiError( 9 | dynamic error, StackTrace stackTrace, ApiErrorModel errorModel) = 10 | _ApiError; 11 | const factory DefaultError.businessError( 12 | dynamic error, StackTrace stackTrace) = _BusinessError; 13 | const factory DefaultError.unknownError( 14 | dynamic error, StackTrace stackTrace) = _UnknownError; 15 | } 16 | -------------------------------------------------------------------------------- /lib/core/error/error_models/api_error_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'api_error_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ApiErrorModel _$ApiErrorModelFromJson(Map json) => 10 | ApiErrorModel( 11 | error: json['error'] as String?, 12 | ); 13 | 14 | Map _$ApiErrorModelToJson(ApiErrorModel instance) => 15 | { 16 | 'error': instance.error, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/features/user_attend_event/domain/response/user_attend_event_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/base_response.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | part 'user_attend_event_response.g.dart'; 4 | 5 | @JsonSerializable(createToJson: false) 6 | class UserAttendEventResponse extends BaseResponse { 7 | UserAttendEventResponse({ 8 | super.id, 9 | this.eventId, 10 | this.userId, 11 | }); 12 | 13 | String? eventId; 14 | String? userId; 15 | 16 | factory UserAttendEventResponse.fromJson(Map json) => 17 | _$UserAttendEventResponseFromJson(json); 18 | } 19 | -------------------------------------------------------------------------------- /lib/features/user_like_event/domain/response/user_like_event_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_like_event_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserLikeEventResponse _$UserLikeEventResponseFromJson( 10 | Map json) => 11 | UserLikeEventResponse( 12 | id: json['id'] as String?, 13 | eventId: json['eventId'] as String?, 14 | userId: json['userId'] as String?, 15 | ); 16 | -------------------------------------------------------------------------------- /lib/product/models/core_models/country.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'country.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Country _$CountryFromJson(Map json) => Country( 10 | id: json['id'] as String?, 11 | name: json['name'] as String?, 12 | ); 13 | 14 | Map _$CountryToJson(Country instance) => { 15 | 'id': instance.id, 16 | 'name': instance.name, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/features/user_attend_event/domain/response/user_attend_event_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_attend_event_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserAttendEventResponse _$UserAttendEventResponseFromJson( 10 | Map json) => 11 | UserAttendEventResponse( 12 | id: json['id'] as String?, 13 | eventId: json['eventId'] as String?, 14 | userId: json['userId'] as String?, 15 | ); 16 | -------------------------------------------------------------------------------- /lib/features/weather/presentation/cubit/view_model/weather_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/presentation/base_view_model.dart'; 2 | 3 | import '../../../domain/weater.dart'; 4 | 5 | class WeatherViewModel extends BaseViewModel { 6 | Weather? weather; 7 | 8 | WeatherViewModel({super.isLoading, this.weather}); 9 | 10 | WeatherViewModel copyWith({ 11 | bool? isLoading, 12 | Weather? weather, 13 | }) { 14 | return WeatherViewModel( 15 | isLoading: isLoading ?? this.isLoading, 16 | weather: weather ?? this.weather, 17 | ); 18 | } 19 | 20 | @override 21 | List get props => [isLoading, weather]; 22 | } 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/product/widgets/skip_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../constants/color_constants.dart'; 4 | 5 | class SkipButton extends StatelessWidget { 6 | const SkipButton({super.key, required this.onPressed}); 7 | 8 | final VoidCallback onPressed; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return TextButton( 13 | onPressed: () { 14 | onPressed(); 15 | }, 16 | child: Text("Skip", 17 | style: Theme.of(context) 18 | .textTheme 19 | .titleMedium 20 | ?.copyWith(color: ColorConstants.darkGrey))); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/features/donate/presentation/cubit/view_model/donate_view_model.dart: -------------------------------------------------------------------------------- 1 | import '../../../../../core/presentation/base_view_model.dart'; 2 | 3 | class DonateViewModel extends BaseViewModel{ 4 | List amounts; 5 | int? selectedAmount; 6 | 7 | DonateViewModel({this.amounts = const [10, 20, 30, 40, 50, 100], this.selectedAmount}); 8 | 9 | DonateViewModel copyWith({ 10 | List? amounts, 11 | int? selectedAmount, 12 | }) { 13 | return DonateViewModel( 14 | amounts: amounts ?? this.amounts, 15 | selectedAmount: selectedAmount ?? this.selectedAmount, 16 | ); 17 | } 18 | 19 | @override 20 | List get props => [amounts, selectedAmount]; 21 | } -------------------------------------------------------------------------------- /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 = Connectopia; 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.erhangocen.connectopia; 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /lib/product/widgets/lottie_animation.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:flutter/material.dart'; 3 | import 'package:lottie/lottie.dart'; 4 | 5 | import '../constants/lottie_constants.dart'; 6 | 7 | class LottieAnimation extends StatelessWidget { 8 | const LottieAnimation({ 9 | Key? key, 10 | required this.asset, 11 | this.height, 12 | this.width, 13 | }) : super(key: key); 14 | 15 | final LottieConstants asset; 16 | final double? height; 17 | final double? width; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Lottie.asset(asset.lottiePath, height: height, width: width); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/features/login_with_email/presentation/pages/login_with_email_wrapper.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | 5 | import '../cubit/login_with_email_cubit.dart'; 6 | 7 | @RoutePage() 8 | class LoginWithEmailWrapperPage extends StatelessWidget 9 | implements AutoRouteWrapper { 10 | const LoginWithEmailWrapperPage({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return const AutoRouter(); 15 | } 16 | 17 | @override 18 | Widget wrappedRoute(BuildContext context) { 19 | return BlocProvider(create: (ctx) => LoginWithEmailCubit(), child: this); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/features/login_with_phone/presentation/pages/login_with_phone_wrapper.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | 5 | import '../cubit/login_with_phone_cubit.dart'; 6 | 7 | @RoutePage() 8 | class LoginWithPhoneWrapperPage extends StatelessWidget 9 | implements AutoRouteWrapper { 10 | const LoginWithPhoneWrapperPage({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return const AutoRouter(); 15 | } 16 | 17 | @override 18 | Widget wrappedRoute(BuildContext context) { 19 | return BlocProvider(create: (ctx) => LoginWithPhoneCubit(), child: this); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/core/error/default_error_factory.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/error/error_models/api_error_model.dart'; 2 | 3 | import 'error.dart'; 4 | import 'error_factory.dart'; 5 | 6 | class DefaultErrorFactory extends ErrorFactory { 7 | @override 8 | DefaultError createApiError( 9 | error, StackTrace stackTrace, ApiErrorModel errorModel) => 10 | DefaultError.apiError(error, stackTrace, errorModel); 11 | 12 | @override 13 | DefaultError createBusinessError(error, StackTrace stackTrace) => 14 | DefaultError.businessError(error, stackTrace); 15 | 16 | @override 17 | DefaultError createUnknownError(error, StackTrace stackTrace) => 18 | DefaultError.unknownError(error, stackTrace); 19 | } 20 | -------------------------------------------------------------------------------- /lib/product/models/user/request/user_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$UserRequestToJson(UserRequest instance) => 10 | { 11 | 'id': instance.id, 12 | 'userName': instance.userName, 13 | 'fullName': instance.fullName, 14 | 'email': instance.email, 15 | 'phoneNumber': instance.phoneNumber, 16 | 'profilePhotoUrl': instance.profilePhotoUrl, 17 | 'about': instance.about, 18 | }; 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/features/login_with_email/domain/models/request/login_with_email_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'login_with_email_request.g.dart'; 3 | 4 | @JsonSerializable(createFactory: false) 5 | class LoginWithEmailRequest { 6 | String? email; 7 | String? password; 8 | 9 | LoginWithEmailRequest({ 10 | this.email, 11 | this.password, 12 | }); 13 | 14 | LoginWithEmailRequest copyWith({ 15 | String? email, 16 | String? password, 17 | }) { 18 | return LoginWithEmailRequest( 19 | email: email ?? this.email, 20 | password: password ?? this.password, 21 | ); 22 | } 23 | 24 | Map toJson() => _$LoginWithEmailRequestToJson(this); 25 | } 26 | -------------------------------------------------------------------------------- /lib/features/groups/presentation/widgets/group_form_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | 4 | import '../../../../product/constants/image_constants.dart'; 5 | 6 | class GroupFormImage extends StatelessWidget { 7 | const GroupFormImage({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | padding: context.paddingMedium, 13 | child: AnimatedContainer( 14 | duration: context.durationLow, 15 | height: 16 | context.general.isKeyBoardOpen ? 0 : context.dynamicHeight(0.2), 17 | child: Image.asset( 18 | ImageConstants.logo.imagePath, 19 | ) , 20 | ), 21 | ); 22 | } 23 | } -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /lib/features/category/data/cache/category_cache_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/cache/response_cache_manager.dart'; 2 | import 'package:connectopia/features/category/domain/models/response/category_response.dart'; 3 | import 'package:connectopia/product/cache/cache_enums.dart'; 4 | import 'package:hive_flutter/hive_flutter.dart'; 5 | 6 | import '../../../../product/constants/hive_constants.dart'; 7 | 8 | class CategoryCacheManager extends ResponseCacheManager { 9 | CategoryCacheManager() : super(CacheEnums.categories.name); 10 | 11 | @override 12 | void registerAdapters() { 13 | if (!Hive.isAdapterRegistered(HiveConstants.categoryHiveId)) { 14 | Hive.registerAdapter(CategoryResponseAdapter()); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/features/main/presentation/cubit/view_model/main_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | 3 | import '../../../../../core/presentation/base_view_model.dart'; 4 | import '../../../../../product/models/core_models/event.dart'; 5 | 6 | class MainViewModel extends BaseViewModel { 7 | TabsRouter? tabsRouter; 8 | 9 | MainViewModel({ 10 | super.isLoading, 11 | this.tabsRouter, 12 | }); 13 | 14 | MainViewModel copyWith({ 15 | bool? isLoading, 16 | TabsRouter? tabsRouter, 17 | }) { 18 | return MainViewModel( 19 | isLoading: isLoading ?? this.isLoading, 20 | tabsRouter: tabsRouter ?? this.tabsRouter, 21 | ); 22 | } 23 | 24 | @override 25 | List get props => [isLoading, tabsRouter]; 26 | } 27 | -------------------------------------------------------------------------------- /lib/features/search/presentation/cubit/view_model/search_view_model.dart: -------------------------------------------------------------------------------- 1 | import '../../../../../core/presentation/base_view_model.dart'; 2 | import '../../../../groups/domain/models/response/group_response.dart'; 3 | 4 | class SearchViewModel extends BaseViewModel { 5 | List? allGroups; 6 | List? searchResult; 7 | 8 | SearchViewModel({this.allGroups, this.searchResult}); 9 | 10 | SearchViewModel copyWith( 11 | {List? allGroups, List? searchResult}) { 12 | return SearchViewModel( 13 | allGroups: allGroups ?? this.allGroups, 14 | searchResult: searchResult ?? this.searchResult); 15 | } 16 | 17 | @override 18 | List get props => [allGroups, searchResult]; 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/user_group/domain/models/request/user_group_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_group_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserGroupRequest _$UserGroupRequestFromJson(Map json) => 10 | UserGroupRequest( 11 | userId: json['userId'] as String?, 12 | groupId: json['groupId'] as String?, 13 | ); 14 | 15 | Map _$UserGroupRequestToJson(UserGroupRequest instance) => 16 | { 17 | 'userId': instance.userId, 18 | 'groupId': instance.groupId, 19 | }; 20 | -------------------------------------------------------------------------------- /lib/product/models/user/response/user_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserResponse _$UserResponseFromJson(Map json) => UserResponse( 10 | name: json['name'] as String?, 11 | email: json['email'] as String?, 12 | id: json['id'] as String?, 13 | ); 14 | 15 | Map _$UserResponseToJson(UserResponse instance) => 16 | { 17 | 'id': instance.id, 18 | 'name': instance.name, 19 | 'email': instance.email, 20 | }; 21 | -------------------------------------------------------------------------------- /lib/features/register/data/data_access/register_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/request/register_request.dart'; 7 | 8 | part 'register_service.g.dart'; 9 | 10 | abstract class IRegisterService { 11 | Future register(RegisterRequest registerRequest); 12 | } 13 | 14 | @RestApi() 15 | @Injectable(as: IRegisterService) 16 | abstract class RegisterManager implements IRegisterService { 17 | @factoryMethod 18 | factory RegisterManager(Dio dio) => _RegisterManager(dio); 19 | 20 | @override 21 | @POST("/users/update") 22 | Future register(@Body() RegisterRequest registerRequest); 23 | } 24 | -------------------------------------------------------------------------------- /lib/features/weather/data/data_access/weather_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../domain/weater.dart'; 6 | 7 | part 'weather_service.g.dart'; 8 | 9 | abstract class IWeatherService { 10 | Future getWeatherByCity( 11 | @Query("key") String key, @Query("q") String cityName); 12 | } 13 | 14 | @RestApi() 15 | @Injectable(as: IWeatherService) 16 | abstract class WeatherManager implements IWeatherService { 17 | @factoryMethod 18 | factory WeatherManager(Dio dio) => _WeatherManager(dio); 19 | 20 | @override 21 | @GET("https://api.weatherapi.com/v1/current.json") 22 | Future getWeatherByCity( 23 | @Query("key") String key, @Query("q") String cityName); 24 | } 25 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | } 13 | } 14 | 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | mavenCentral() 20 | } 21 | } 22 | 23 | rootProject.buildDir = '../build' 24 | subprojects { 25 | project.buildDir = "${rootProject.buildDir}/${project.name}" 26 | } 27 | subprojects { 28 | project.evaluationDependsOn(':app') 29 | } 30 | 31 | tasks.register("clean", Delete) { 32 | delete rootProject.buildDir 33 | } 34 | -------------------------------------------------------------------------------- /lib/features/category/domain/models/response/category_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive_flutter/adapters.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | import '../../../../../product/constants/hive_constants.dart'; 5 | import '../../../../../product/models/base_response.dart'; 6 | part 'category_response.g.dart'; 7 | 8 | @JsonSerializable() 9 | @HiveType(typeId: HiveConstants.categoryHiveId) 10 | class CategoryResponse extends BaseResponse { 11 | @HiveField(1) 12 | String? name; 13 | @HiveField(2) 14 | String? photoUrl; 15 | 16 | CategoryResponse({super.id, this.name, this.photoUrl}); 17 | 18 | factory CategoryResponse.fromJson(Map json) => 19 | _$CategoryResponseFromJson(json); 20 | 21 | Map toJson() => _$CategoryResponseToJson(this); 22 | } 23 | -------------------------------------------------------------------------------- /lib/features/register/domain/request/register_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'register_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RegisterRequest _$RegisterRequestFromJson(Map json) => 10 | RegisterRequest( 11 | id: json['id'] as String?, 12 | fullName: json['fullName'] as String?, 13 | userName: json['userName'] as String?, 14 | ); 15 | 16 | Map _$RegisterRequestToJson(RegisterRequest instance) => 17 | { 18 | 'id': instance.id, 19 | 'fullName': instance.fullName, 20 | 'userName': instance.userName, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/features/splash/splash_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:connectopia/product/constants/image_constants.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | 6 | import 'splash_view_model.dart'; 7 | 8 | @RoutePage() 9 | class SplashPage extends StatefulWidget { 10 | const SplashPage({super.key}); 11 | 12 | @override 13 | State createState() => _SplashPageState(); 14 | } 15 | 16 | class _SplashPageState extends SplashViewModel { 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | backgroundColor: Colors.black, 21 | body: Center( 22 | child: Image.asset(ImageConstants.logo.imagePath, 23 | width: context.dynamicWidth(0.55))), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/features/city/data/data_access/city_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../../../product/models/core_models/city.dart'; 6 | 7 | part 'city_service.g.dart'; 8 | 9 | abstract class ICityService { 10 | Future?> getAll(); 11 | Future getByCityName(@Query("cityName") String cityName); 12 | } 13 | 14 | @RestApi() 15 | @Injectable(as: ICityService) 16 | abstract class CityManager implements ICityService { 17 | @factoryMethod 18 | factory CityManager(Dio dio) => _CityManager(dio); 19 | 20 | @override 21 | @GET("/cities/getAll") 22 | Future?> getAll(); 23 | 24 | @override 25 | @GET("/cities/getByName") 26 | Future getByCityName(@Query("cityName") String cityName); 27 | } 28 | -------------------------------------------------------------------------------- /lib/features/event/domain/models/request/event_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'event_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$EventRequestToJson(EventRequest instance) => 10 | { 11 | 'name': instance.name, 12 | 'description': instance.description, 13 | 'groupId': instance.groupId, 14 | 'cityId': instance.cityId, 15 | 'eventDate': instance.eventDate, 16 | 'eventLat': instance.eventLat, 17 | 'eventLng': instance.eventLng, 18 | 'eventAddress': instance.eventAddress, 19 | 'eventPhotoUrl': instance.eventPhotoUrl, 20 | }; 21 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/di/injection.dart'; 2 | import 'package:connectopia/product/helpers/firebase_notification.dart'; 3 | import 'package:firebase_core/firebase_core.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'app/connectopia_app.dart'; 7 | import 'firebase_options.dart'; 8 | 9 | void main() async { 10 | WidgetsFlutterBinding.ensureInitialized(); 11 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 12 | await configureDependencies(); 13 | await Firebase.initializeApp( 14 | options: DefaultFirebaseOptions.currentPlatform, 15 | ); 16 | await getIt.get().initNotifications(); 17 | await getIt.get().initLocalNotifications(); 18 | runApp(const ConnectopiaApp()); 19 | } 20 | -------------------------------------------------------------------------------- /lib/product/models/core_models/message.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'message.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Message _$MessageFromJson(Map json) => Message( 10 | id: json['id'] as String?, 11 | senderId: json['senderId'] as String?, 12 | content: json['content'] as String?, 13 | createdAt: json['createdAt'] as String?, 14 | ); 15 | 16 | Map _$MessageToJson(Message instance) => { 17 | 'id': instance.id, 18 | 'senderId': instance.senderId, 19 | 'content': instance.content, 20 | 'createdAt': instance.createdAt, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/product/models/core_models/message_room.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'message.dart'; 4 | part 'message_room.g.dart'; 5 | 6 | @JsonSerializable() 7 | class MessageRoom { 8 | String? id; 9 | List? users; 10 | List? messages; 11 | 12 | MessageRoom({this.users, this.messages, this.id}); 13 | 14 | Map toJson() => _$MessageRoomToJson(this); 15 | 16 | factory MessageRoom.fromJson(Map json) => 17 | _$MessageRoomFromJson(json); 18 | 19 | MessageRoom copyWith({ 20 | String? id, 21 | List? users, 22 | List? messages, 23 | }) { 24 | return MessageRoom( 25 | id: id ?? this.id, 26 | users: users ?? this.users, 27 | messages: messages ?? this.messages, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/features/category/domain/models/response/category_details_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/core_models/group.dart'; 2 | import 'package:connectopia/product/models/core_models/user.dart'; 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | part 'category_details_response.g.dart'; 6 | 7 | @JsonSerializable() 8 | class CategoryDetailsResponse { 9 | String? id; 10 | String? name; 11 | String? photoUrl; 12 | List? groups; 13 | User? owner; 14 | 15 | CategoryDetailsResponse( 16 | {this.id, this.name, this.photoUrl, this.groups, this.owner}); 17 | 18 | factory CategoryDetailsResponse.fromJson(Map json) => 19 | _$CategoryDetailsResponseFromJson(json); 20 | 21 | @override 22 | Map toJson() => _$CategoryDetailsResponseToJson(this); 23 | } 24 | -------------------------------------------------------------------------------- /lib/features/register/domain/request/register_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'register_request.g.dart'; 4 | 5 | @JsonSerializable() 6 | class RegisterRequest { 7 | String? id; 8 | String? fullName; 9 | String? userName; 10 | 11 | RegisterRequest({this.id, this.fullName, this.userName}); 12 | 13 | RegisterRequest copyWith({ 14 | String? id, 15 | String? fullName, 16 | String? userName, 17 | }) { 18 | return RegisterRequest( 19 | id: id ?? this.id, 20 | fullName: fullName ?? this.fullName, 21 | userName: userName ?? this.userName, 22 | ); 23 | } 24 | 25 | Map toJson() => _$RegisterRequestToJson(this); 26 | 27 | factory RegisterRequest.fromJson(Map json) => 28 | _$RegisterRequestFromJson(json); 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/user_group/domain/models/request/user_group_request.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | 3 | import 'package:json_annotation/json_annotation.dart'; 4 | part 'user_group_request.g.dart'; 5 | 6 | @JsonSerializable() 7 | class UserGroupRequest { 8 | String? userId; 9 | String? groupId; 10 | 11 | UserGroupRequest({this.userId, this.groupId}); 12 | 13 | factory UserGroupRequest.fromJson(Map json) => 14 | _$UserGroupRequestFromJson(json); 15 | 16 | Map toJson() => _$UserGroupRequestToJson(this); 17 | 18 | UserGroupRequest copyWith({ 19 | String? userId, 20 | String? groupId, 21 | }) { 22 | return UserGroupRequest( 23 | userId: userId ?? this.userId, 24 | groupId: groupId ?? this.groupId, 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/features/donate/presentation/widgets/donate_head.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | 5 | import '../cubit/donate_cubit.dart'; 6 | import '../cubit/view_model/donate_view_model.dart'; 7 | 8 | class DonateHead extends StatelessWidget { 9 | const DonateHead({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return BlocBuilder( 14 | builder: (context, state) { 15 | return Container( 16 | padding: context.paddingMedium, 17 | child: Text( 18 | state.selectedAmount != null ? "${state.selectedAmount.toString()}₺": "__ ₺", 19 | style: context.textTheme.displayMedium, 20 | )); 21 | }, 22 | ); 23 | } 24 | } -------------------------------------------------------------------------------- /lib/core/error/error_separator.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:connectopia/core/error/error_models/api_error_model.dart'; 3 | 4 | import 'default_error_factory.dart'; 5 | import 'error.dart'; 6 | 7 | class ErrorSeparator { 8 | final DefaultErrorFactory errorFactory; 9 | 10 | ErrorSeparator(this.errorFactory); 11 | 12 | DefaultError createError(Object exception, StackTrace stackTrace) { 13 | try { 14 | if (exception is DioError) { 15 | return errorFactory.createApiError(exception, stackTrace, 16 | ApiErrorModel.fromJson(exception.response?.data)); 17 | } else { 18 | return errorFactory.createBusinessError(exception, stackTrace); 19 | } 20 | } catch (e, stackTrace) { 21 | return errorFactory.createUnknownError(e.toString(), stackTrace); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/product/cache/application_properties.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/constants/hive_constants.dart'; 2 | import 'package:hive/hive.dart'; 3 | 4 | part 'application_properties.g.dart'; 5 | 6 | @HiveType(typeId: HiveConstants.applicationPropertiesHiveId) 7 | class ApplicationProperties { 8 | @HiveField(0) 9 | bool? isNewUser; 10 | 11 | @HiveField(1) 12 | bool? isDarkMode; 13 | 14 | @HiveField(2) 15 | String? locale; 16 | 17 | ApplicationProperties({this.isNewUser, this.isDarkMode, this.locale}); 18 | 19 | ApplicationProperties copyWith({ 20 | bool? isNewUser, 21 | bool? isDarkMode, 22 | String? locale, 23 | }) { 24 | return ApplicationProperties( 25 | isNewUser: isNewUser ?? this.isNewUser, 26 | isDarkMode: isDarkMode ?? this.isDarkMode, 27 | locale: locale ?? this.locale, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/product/models/core_models/message.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'message.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Message { 6 | String? id; 7 | String? senderId; 8 | String? content; 9 | String? createdAt; 10 | 11 | Message({this.id, this.senderId, this.content, this.createdAt}); 12 | 13 | Map toJson() => _$MessageToJson(this); 14 | 15 | factory Message.fromJson(Map json) => 16 | _$MessageFromJson(json); 17 | 18 | Message copyWith({ 19 | String? id, 20 | String? senderId, 21 | String? content, 22 | String? createdAt, 23 | }) { 24 | return Message( 25 | id: id ?? this.id, 26 | senderId: senderId ?? this.senderId, 27 | content: content ?? this.content, 28 | createdAt: createdAt ?? this.createdAt, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/donate/presentation/cubit/donate_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/helpers/globals.dart'; 2 | import 'package:connectopia/features/donate/presentation/cubit/view_model/donate_view_model.dart'; 3 | import 'package:connectopia/product/widgets/info_snack_bar.dart'; 4 | 5 | import '../../../../app/base_cubit.dart'; 6 | import 'package:flutter_gen/gen_l10n/app_localizations.dart'; 7 | 8 | class DonateCubit extends BaseCubit { 9 | DonateCubit() : super(DonateViewModel()); 10 | 11 | void selectAmount(int amount) { 12 | emit(state.copyWith(selectedAmount: amount)); 13 | } 14 | 15 | void tryPay(paymentResult) { 16 | snackbarKey.currentState!.showSnackBar( 17 | InfoSnackBar( 18 | contentText: 19 | AppLocalizations.of(snackbarKey.currentContext!)!.donateCubitCard, 20 | ), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/product/widgets/global_progress_loading_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/constants/lottie_constants.dart'; 2 | import 'package:connectopia/product/widgets/lottie_animation.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | 6 | class GlobalProgressLoadingBar extends StatelessWidget { 7 | const GlobalProgressLoadingBar({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Center( 12 | child: Container( 13 | decoration: BoxDecoration( 14 | borderRadius: context.normalBorderRadius, 15 | color: context.colorScheme.outlineVariant, 16 | ), 17 | child: LottieAnimation( 18 | asset: LottieConstants.loadingProgress, 19 | height: context.dynamicHeight(0.1), 20 | ))); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/features/event/domain/models/request/update_event_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'update_event_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Map _$UpdateEventRequestToJson(UpdateEventRequest instance) => 10 | { 11 | 'id': instance.id, 12 | 'name': instance.name, 13 | 'description': instance.description, 14 | 'groupId': instance.groupId, 15 | 'cityId': instance.cityId, 16 | 'eventDate': instance.eventDate, 17 | 'eventLat': instance.eventLat, 18 | 'eventLng': instance.eventLng, 19 | 'eventAddress': instance.eventAddress, 20 | 'eventPhotoUrl': instance.eventPhotoUrl, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/product/cache/application_properties_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/cache/base_cache_manager.dart'; 2 | import 'package:connectopia/product/cache/cache_enums.dart'; 3 | import 'package:hive/hive.dart'; 4 | 5 | import '../constants/hive_constants.dart'; 6 | import 'application_properties.dart'; 7 | 8 | class ApplicationPropertiesManager 9 | extends IBaseCacheService { 10 | ApplicationPropertiesManager() : super(CacheEnums.applicationProperties.name); 11 | 12 | @override 13 | Future putItems(List items) { 14 | // TODO: implement putItems 15 | throw UnimplementedError(); 16 | } 17 | 18 | @override 19 | void registerAdapters() { 20 | if (!Hive.isAdapterRegistered(HiveConstants.applicationPropertiesHiveId)) { 21 | Hive.registerAdapter(ApplicationPropertiesAdapter()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/product/models/core_models/city.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'city.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | City _$CityFromJson(Map json) => City( 10 | id: json['id'] as String?, 11 | name: json['name'] as String?, 12 | countryId: json['countryId'] as String?, 13 | country: json['country'] == null 14 | ? null 15 | : Country.fromJson(json['country'] as Map), 16 | ); 17 | 18 | Map _$CityToJson(City instance) => { 19 | 'id': instance.id, 20 | 'name': instance.name, 21 | 'countryId': instance.countryId, 22 | 'country': instance.country, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/features/groups/presentation/widgets/group_grid.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | 4 | import '../../../../product/models/core_models/group.dart'; 5 | import 'group_card.dart'; 6 | 7 | class GroupGrid extends StatelessWidget { 8 | const GroupGrid({super.key, this.groups}); 9 | 10 | final List? groups; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return GridView.builder( 15 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 16 | mainAxisExtent: context.dynamicHeight(0.28), 17 | crossAxisCount: 2, 18 | crossAxisSpacing: 10, 19 | mainAxisSpacing: 10, 20 | ), 21 | itemCount: groups?.length ?? 0, 22 | itemBuilder: (context, index) => GroupCard( 23 | group: groups?[index], 24 | )); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/features/notification/data/data_access/notification_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/models/request/notification_request.dart'; 7 | 8 | part 'notification_service.g.dart'; 9 | 10 | abstract class INotificationService { 11 | Future sendMessage( 12 | @Body() NotificationRequest notificationRequest); 13 | } 14 | 15 | @RestApi() 16 | @Injectable(as: INotificationService) 17 | abstract class NotificationManager implements INotificationService { 18 | @factoryMethod 19 | factory NotificationManager(Dio dio) => _NotificationManager(dio); 20 | 21 | @override 22 | @POST("/notification/sendMessage") 23 | Future sendMessage( 24 | @Body() NotificationRequest notificationRequest); 25 | } 26 | -------------------------------------------------------------------------------- /lib/product/models/core_models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/core_models/group.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | part 'category.g.dart'; 4 | 5 | @JsonSerializable() 6 | class Category { 7 | String? id; 8 | String? name; 9 | String? photoUrl; 10 | List? groups; 11 | 12 | Category({this.id, this.name, this.photoUrl, this.groups}); 13 | 14 | Category copyWith({ 15 | String? id, 16 | String? name, 17 | String? photoUrl, 18 | List? groups, 19 | }) { 20 | return Category( 21 | id: id ?? this.id, 22 | name: name ?? this.name, 23 | photoUrl: photoUrl ?? this.photoUrl, 24 | groups: groups ?? this.groups, 25 | ); 26 | } 27 | 28 | factory Category.fromJson(Map json) => 29 | _$CategoryFromJson(json); 30 | 31 | Map toJson() => _$CategoryToJson(this); 32 | } 33 | -------------------------------------------------------------------------------- /lib/product/models/core_models/category.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'category.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Category _$CategoryFromJson(Map json) => Category( 10 | id: json['id'] as String?, 11 | name: json['name'] as String?, 12 | photoUrl: json['photoUrl'] as String?, 13 | groups: (json['groups'] as List?) 14 | ?.map((e) => Group.fromJson(e as Map)) 15 | .toList(), 16 | ); 17 | 18 | Map _$CategoryToJson(Category instance) => { 19 | 'id': instance.id, 20 | 'name': instance.name, 21 | 'photoUrl': instance.photoUrl, 22 | 'groups': instance.groups, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/features/notification/domain/models/request/notification_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'notification_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | NotificationRequest _$NotificationRequestFromJson(Map json) => 10 | NotificationRequest( 11 | body: json['body'] as String?, 12 | title: json['title'] as String?, 13 | id: json['id'] as String?, 14 | topic: json['topic'] as String?, 15 | ); 16 | 17 | Map _$NotificationRequestToJson( 18 | NotificationRequest instance) => 19 | { 20 | 'body': instance.body, 21 | 'title': instance.title, 22 | 'id': instance.id, 23 | 'topic': instance.topic, 24 | }; 25 | -------------------------------------------------------------------------------- /lib/product/models/core_models/message_room.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'message_room.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | MessageRoom _$MessageRoomFromJson(Map json) => MessageRoom( 10 | users: 11 | (json['users'] as List?)?.map((e) => e as String).toList(), 12 | messages: (json['messages'] as List?) 13 | ?.map((e) => Message.fromJson(e as Map)) 14 | .toList(), 15 | id: json['id'] as String?, 16 | ); 17 | 18 | Map _$MessageRoomToJson(MessageRoom instance) => 19 | { 20 | 'id': instance.id, 21 | 'users': instance.users, 22 | 'messages': instance.messages, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/features/location_picking/domain/models/event_location.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'event_location.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | EventLocation _$EventLocationFromJson(Map json) => 10 | EventLocation( 11 | city: json['city'] as String?, 12 | address: json['address'] as String?, 13 | latitude: (json['latitude'] as num?)?.toDouble(), 14 | longitude: (json['longitude'] as num?)?.toDouble(), 15 | ); 16 | 17 | Map _$EventLocationToJson(EventLocation instance) => 18 | { 19 | 'city': instance.city, 20 | 'address': instance.address, 21 | 'latitude': instance.latitude, 22 | 'longitude': instance.longitude, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/features/notification/domain/models/request/notification_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'notification_request.g.dart'; 3 | 4 | @JsonSerializable() 5 | class NotificationRequest { 6 | String? body; 7 | String? title; 8 | String? id; 9 | String? topic; 10 | 11 | NotificationRequest({this.body, this.title, this.id, this.topic}); 12 | 13 | factory NotificationRequest.fromJson(Map json) => 14 | _$NotificationRequestFromJson(json); 15 | 16 | Map toJson() => _$NotificationRequestToJson(this); 17 | 18 | NotificationRequest copyWith({ 19 | String? topic, 20 | String? body, 21 | String? title, 22 | String? id, 23 | }) { 24 | return NotificationRequest( 25 | body: body ?? this.body, 26 | title: title ?? this.title, 27 | id: id ?? this.id, 28 | topic: topic ?? this.topic, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/chat/presentation/widgets/chat_loader.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:skeletons/skeletons.dart'; 4 | 5 | class ChatLoader extends StatelessWidget { 6 | const ChatLoader({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | child: ListView.builder( 12 | itemBuilder: (context, index) => Align( 13 | alignment: 14 | index % 2 == 0 ? Alignment.centerLeft : Alignment.centerRight, 15 | child: SizedBox( 16 | width: context.dynamicWidth(0.45), 17 | height: context.dynamicHeight(0.09), 18 | child: Container( 19 | margin: context.verticalPaddingLow, 20 | child: const SkeletonAvatar(), 21 | ), 22 | ), 23 | ), 24 | itemCount: 10, 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/product/models/core_models/followee.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'followee.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Followee _$FolloweeFromJson(Map json) => Followee( 10 | id: json['id'] as String?, 11 | followerId: json['followerId'] as String?, 12 | followeeId: json['followeeId'] as String?, 13 | followee: json['followee'] == null 14 | ? null 15 | : User.fromJson(json['followee'] as Map), 16 | ); 17 | 18 | Map _$FolloweeToJson(Followee instance) => { 19 | 'id': instance.id, 20 | 'followerId': instance.followerId, 21 | 'followeeId': instance.followeeId, 22 | 'followee': instance.followee, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/product/models/core_models/follower.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'follower.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Follower _$FollowerFromJson(Map json) => Follower( 10 | id: json['id'] as String?, 11 | followerId: json['followerId'] as String?, 12 | followeeId: json['followeeId'] as String?, 13 | follower: json['follower'] == null 14 | ? null 15 | : User.fromJson(json['follower'] as Map), 16 | ); 17 | 18 | Map _$FollowerToJson(Follower instance) => { 19 | 'id': instance.id, 20 | 'followerId': instance.followerId, 21 | 'followeeId': instance.followeeId, 22 | 'follower': instance.follower, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/features/groups/presentation/widgets/group_loading.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:skeletons/skeletons.dart'; 4 | 5 | class GroupLoading extends StatelessWidget { 6 | const GroupLoading({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return GridView.builder( 11 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 12 | mainAxisExtent: context.dynamicHeight(0.27), 13 | crossAxisCount: 2, 14 | crossAxisSpacing: 15, 15 | mainAxisSpacing: 10, 16 | ), 17 | itemCount: 10, 18 | itemBuilder: (context, index) => SkeletonAvatar( 19 | style: SkeletonAvatarStyle( 20 | width: context.dynamicWidth(0.35), 21 | height: context.dynamicHeight(0.2), 22 | borderRadius: BorderRadius.circular(25), 23 | ))); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.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 | 46 | # firebase settings 47 | /lib/firebase_options.dart 48 | 49 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | file_selector_linux 7 | flutter_secure_storage_linux 8 | smart_auth 9 | url_launcher_linux 10 | ) 11 | 12 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 13 | ) 14 | 15 | set(PLUGIN_BUNDLED_LIBRARIES) 16 | 17 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 18 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 19 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 22 | endforeach(plugin) 23 | 24 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 25 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 26 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 27 | endforeach(ffi_plugin) 28 | -------------------------------------------------------------------------------- /lib/features/category/data/dataAccess/category_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../domain/models/response/category_details_response.dart'; 6 | import '../../domain/models/response/category_response.dart'; 7 | 8 | part 'category_service.g.dart'; 9 | 10 | abstract class ICategoryService { 11 | Future?> getAll(); 12 | Future> getAllWithDetails(); 13 | } 14 | 15 | @RestApi() 16 | @Injectable(as: ICategoryService) 17 | abstract class CategoryManager implements ICategoryService { 18 | @factoryMethod 19 | factory CategoryManager(Dio dio) => _CategoryManager(dio); 20 | 21 | @override 22 | @GET("/categories/getAll") 23 | Future?> getAll(); 24 | 25 | @override 26 | @GET("/categories/getAllWithDetails") 27 | Future> getAllWithDetails(); 28 | } 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/features/groups/presentation/cubit/view_model/groups_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/presentation/base_view_model.dart'; 2 | import 'package:connectopia/features/category/domain/models/response/category_details_response.dart'; 3 | import 'package:connectopia/product/models/core_models/group.dart'; 4 | 5 | class GroupsViewModel extends BaseViewModel { 6 | CategoryDetailsResponse? currentCategory; 7 | List? groups; 8 | 9 | GroupsViewModel({this.currentCategory, this.groups, super.isLoading}); 10 | 11 | GroupsViewModel copyWith( 12 | {CategoryDetailsResponse? currentCategory, 13 | List? groups, 14 | bool? isLoading}) { 15 | return GroupsViewModel( 16 | currentCategory: currentCategory ?? this.currentCategory, 17 | groups: groups ?? this.groups, 18 | isLoading: isLoading ?? this.isLoading); 19 | } 20 | 21 | @override 22 | List get props => [currentCategory, groups, isLoading]; 23 | } 24 | -------------------------------------------------------------------------------- /lib/features/event/presentation/cubit/view_model/add_event_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:connectopia/core/presentation/base_view_model.dart'; 4 | import 'package:connectopia/features/event/domain/models/request/event_request.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class AddEventViewModel extends BaseViewModel { 8 | EventRequest eventRequest; 9 | GlobalKey formKey; 10 | File? image; 11 | 12 | AddEventViewModel( 13 | {required this.eventRequest, required this.formKey, this.image}); 14 | 15 | AddEventViewModel copyWith({ 16 | EventRequest? eventRequest, 17 | GlobalKey? formKey, 18 | File? image, 19 | }) { 20 | return AddEventViewModel( 21 | eventRequest: eventRequest ?? this.eventRequest, 22 | formKey: formKey ?? this.formKey, 23 | image: image ?? this.image, 24 | ); 25 | } 26 | 27 | @override 28 | List get props => [eventRequest, formKey, image]; 29 | } 30 | -------------------------------------------------------------------------------- /lib/product/auth/data/data_access/user_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:dio/dio.dart'; 3 | import 'package:injectable/injectable.dart'; 4 | import 'package:retrofit/http.dart'; 5 | import '../../../models/user/request/user_request.dart'; 6 | import '../../../models/user/response/user_response.dart'; 7 | 8 | part 'user_service.g.dart'; 9 | 10 | abstract class IUserService { 11 | Future addUser(@Body() UserRequest userRequest); 12 | Future getByUserId(@Query("userId") String userId); 13 | } 14 | 15 | @RestApi() 16 | @Injectable(as: IUserService) 17 | abstract class UserManager implements IUserService { 18 | @factoryMethod 19 | factory UserManager(Dio dio) => _UserManager(dio); 20 | 21 | @override 22 | @POST("/users/add") 23 | Future addUser(@Body() userRequest); 24 | 25 | @override 26 | @GET("/users/getById") 27 | Future getByUserId(@Query("userId") String userId); 28 | } 29 | -------------------------------------------------------------------------------- /lib/features/groups/domain/models/request/group_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'group_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GroupRequest _$GroupRequestFromJson(Map json) => GroupRequest( 10 | name: json['name'] as String?, 11 | description: json['description'] as String?, 12 | iconUrl: json['iconUrl'] as String?, 13 | categoryId: json['categoryId'] as String?, 14 | userId: json['userId'] as String?, 15 | ); 16 | 17 | Map _$GroupRequestToJson(GroupRequest instance) => 18 | { 19 | 'name': instance.name, 20 | 'description': instance.description, 21 | 'iconUrl': instance.iconUrl, 22 | 'categoryId': instance.categoryId, 23 | 'userId': instance.userId, 24 | }; 25 | -------------------------------------------------------------------------------- /lib/features/category/presentation/widgets/category_grid.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../cubit/view_model/category_view_model.dart'; 4 | import 'category_card.dart'; 5 | 6 | class CategoryGrid extends StatelessWidget { 7 | const CategoryGrid(this.state, {super.key}); 8 | 9 | final CategoryViewModel state; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return GridView.builder( 14 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 15 | mainAxisExtent: 150, 16 | crossAxisCount: 2, 17 | crossAxisSpacing: 15, 18 | mainAxisSpacing: 15, 19 | ), 20 | shrinkWrap: true, 21 | physics: const NeverScrollableScrollPhysics(), 22 | itemCount: state.categories?.length ?? 0, 23 | itemBuilder: (context, index) { 24 | return CategoryCard( 25 | category: state.categoriesWithDetails?[index], 26 | ); 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/product/models/core_models/user_groups.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'group.dart'; 4 | import 'user.dart'; 5 | 6 | part 'user_groups.g.dart'; 7 | 8 | @JsonSerializable() 9 | class UserGroups { 10 | String? id; 11 | String? userId; 12 | String? groupId; 13 | Group? group; 14 | User? user; 15 | 16 | UserGroups({this.id, this.userId, this.groupId, this.group, this.user}); 17 | 18 | factory UserGroups.fromJson(Map json) => 19 | _$UserGroupsFromJson(json); 20 | 21 | Map toJson() => _$UserGroupsToJson(this); 22 | 23 | UserGroups copyWith({ 24 | String? id, 25 | String? userId, 26 | String? groupId, 27 | Group? group, 28 | User? user, 29 | }) { 30 | return UserGroups( 31 | id: id ?? this.id, 32 | userId: userId ?? this.userId, 33 | groupId: groupId ?? this.groupId, 34 | group: group ?? this.group, 35 | user: user ?? this.user, 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/features/home/presentation/widgets/home_event_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../../product/models/core_models/event.dart'; 4 | import '../../../event/presentation/widgets/event_card.dart'; 5 | import '../../../event/presentation/widgets/event_card_loading.dart'; 6 | 7 | class HomeEventList extends StatelessWidget { 8 | const HomeEventList( 9 | {super.key, required this.events, required this.loadinger}); 10 | 11 | final List? events; 12 | final bool loadinger; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | physics: const NeverScrollableScrollPhysics(), 18 | shrinkWrap: true, 19 | itemCount: loadinger ? 2 : events?.length ?? 0, 20 | itemBuilder: (context, index) { 21 | return loadinger 22 | ? const EventCardLoading() 23 | : EventCard( 24 | event: events![index], 25 | ); 26 | }, 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/weather/data/repository/weather_repository.dart: -------------------------------------------------------------------------------- 1 | import '../../../../core/error/error_extension.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import '../../../../core/error/error_separator.dart'; 5 | import '../../domain/weater.dart'; 6 | import '../data_access/weather_service.dart'; 7 | 8 | abstract class IWeatherRepository { 9 | Future getWeatherByCity(String key, String cityName); 10 | } 11 | 12 | @Injectable(as: IWeatherRepository) 13 | class WeatherRepository implements IWeatherRepository { 14 | final IWeatherService _weatherService; 15 | final ErrorSeparator _errorSeparator; 16 | 17 | WeatherRepository(this._weatherService, this._errorSeparator); 18 | 19 | @override 20 | Future getWeatherByCity(String key, String cityName) async { 21 | return await _weatherService.getWeatherByCity(key, cityName).catchError( 22 | (error) => throw _errorSeparator 23 | .createError(error, StackTrace.current) 24 | .handle()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/core/network/dio.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import '../../product/constants/network_costants.dart'; 5 | import 'auth_interceptor.dart'; 6 | 7 | @module 8 | abstract class DioModule { 9 | @singleton 10 | Dio dio() { 11 | BaseOptions options = BaseOptions( 12 | baseUrl: NetworkConstants.BASE_URL, 13 | connectTimeout: 14 | const Duration(seconds: NetworkConstants.CONNECTION_TIMEOUT), 15 | receiveTimeout: const Duration(seconds: NetworkConstants.RECIEVE_TIMEOUT), 16 | headers: { 17 | "Content-Type": "application/json; charset=utf-8", 18 | "Access-Control-Allow-Origin": "*", 19 | }, 20 | ); 21 | 22 | final dio = Dio(BaseOptions(baseUrl: NetworkConstants.BASE_URL)); 23 | dio.options = options; 24 | dio.interceptors.add( 25 | LogInterceptor(error: true, requestBody: true, responseBody: true)); 26 | dio.interceptors.add(AuthInterceptor()); 27 | return dio; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/groups/domain/models/request/update_group_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'update_group_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UpdateGroupRequest _$UpdateGroupRequestFromJson(Map json) => 10 | UpdateGroupRequest( 11 | id: json['id'] as String?, 12 | name: json['name'] as String?, 13 | description: json['description'] as String?, 14 | iconUrl: json['iconUrl'] as String?, 15 | categoryId: json['categoryId'] as String?, 16 | ); 17 | 18 | Map _$UpdateGroupRequestToJson(UpdateGroupRequest instance) => 19 | { 20 | 'id': instance.id, 21 | 'name': instance.name, 22 | 'description': instance.description, 23 | 'iconUrl': instance.iconUrl, 24 | 'categoryId': instance.categoryId, 25 | }; 26 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | file_selector_windows 7 | firebase_core 8 | flutter_secure_storage_windows 9 | geolocator_windows 10 | share_plus 11 | smart_auth 12 | url_launcher_windows 13 | ) 14 | 15 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 16 | ) 17 | 18 | set(PLUGIN_BUNDLED_LIBRARIES) 19 | 20 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 22 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 25 | endforeach(plugin) 26 | 27 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 28 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 29 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 30 | endforeach(ffi_plugin) 31 | -------------------------------------------------------------------------------- /lib/features/register/presentation/cubit/view_model/register_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | import '../../../../../core/presentation/base_view_model.dart'; 4 | import '../../../../../product/models/user/request/user_request.dart'; 5 | 6 | class RegisterViewModel extends BaseViewModel { 7 | UserRequest? userRequest; 8 | GlobalKey registerFormKey; 9 | bool? isExistUserName; 10 | 11 | RegisterViewModel( 12 | {this.userRequest, required this.registerFormKey, this.isExistUserName}); 13 | 14 | RegisterViewModel copyWith({ 15 | UserRequest? userRequest, 16 | GlobalKey? registerFormKey, 17 | bool? isExistUserName, 18 | }) { 19 | return RegisterViewModel( 20 | registerFormKey: registerFormKey ?? this.registerFormKey, 21 | userRequest: userRequest ?? this.userRequest, 22 | isExistUserName: isExistUserName ?? this.isExistUserName, 23 | ); 24 | } 25 | 26 | @override 27 | List get props => [userRequest, registerFormKey, isExistUserName]; 28 | } 29 | -------------------------------------------------------------------------------- /lib/product/models/core_models/group.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/core_models/user.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | import 'category.dart'; 5 | import 'event.dart'; 6 | import 'user_groups.dart'; 7 | 8 | part 'group.g.dart'; 9 | 10 | @JsonSerializable() 11 | class Group { 12 | String? id; 13 | String? name; 14 | String? description; 15 | String? categoryId; 16 | String? iconUrl; 17 | String? userId; 18 | DateTime? createdAt; 19 | User? owner; 20 | Category? category; 21 | List? events; 22 | List? userGroups; 23 | 24 | Group( 25 | {this.id, 26 | this.name, 27 | this.description, 28 | this.iconUrl, 29 | this.categoryId, 30 | this.userId, 31 | this.category, 32 | this.owner, 33 | this.events, 34 | this.userGroups, 35 | this.createdAt}); 36 | 37 | factory Group.fromJson(Map json) => _$GroupFromJson(json); 38 | 39 | Map toJson() => _$GroupToJson(this); 40 | } 41 | -------------------------------------------------------------------------------- /lib/core/cache/base_cache_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive_flutter/hive_flutter.dart'; 2 | 3 | abstract class IBaseCacheService { 4 | final String key; 5 | Box? _box; 6 | 7 | Box? get box => _box; 8 | 9 | IBaseCacheService(this.key); 10 | 11 | Future init() async { 12 | registerAdapters(); 13 | if (!(_box?.isOpen ?? false)) { 14 | _box = await Hive.openBox(key); 15 | } 16 | } 17 | 18 | void registerAdapters(); 19 | 20 | Future clearAll() async { 21 | await _box?.clear(); 22 | } 23 | 24 | Future addItems(List items) async { 25 | await _box?.addAll(items); 26 | } 27 | 28 | Future putItems(List items); 29 | 30 | T? getItem(String key) { 31 | return _box?.get(key); 32 | } 33 | 34 | List? getValues() { 35 | return _box?.values.toList(); 36 | } 37 | 38 | Future putItem(String key, T item) async { 39 | await _box?.put(key, item); 40 | } 41 | 42 | Future removeItem(String key) async { 43 | await _box?.delete(key); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/features/event/presentation/cubit/view_model/edit_event_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:connectopia/core/presentation/base_view_model.dart'; 4 | import 'package:connectopia/features/event/domain/models/request/update_event_request.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class EditEventViewModel extends BaseViewModel { 8 | UpdateEventRequest eventRequest; 9 | GlobalKey formKey; 10 | File? image; 11 | 12 | EditEventViewModel( 13 | {required this.eventRequest, required this.formKey, this.image}); 14 | 15 | EditEventViewModel copyWith({ 16 | UpdateEventRequest? eventRequest, 17 | GlobalKey? formKey, 18 | File? image, 19 | }) { 20 | return EditEventViewModel( 21 | eventRequest: eventRequest ?? this.eventRequest, 22 | formKey: formKey ?? this.formKey, 23 | image: image ?? this.image, 24 | ); 25 | } 26 | 27 | @override 28 | List get props => [eventRequest, formKey, image]; 29 | } 30 | 31 | enum EditEventActions { update, delete } 32 | -------------------------------------------------------------------------------- /lib/product/models/core_models/user_like_events.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'event.dart'; 4 | import 'user.dart'; 5 | 6 | part 'user_like_events.g.dart'; 7 | 8 | @JsonSerializable() 9 | class UserLikeEvents { 10 | String? id; 11 | String? userId; 12 | String? eventId; 13 | DateTime? createdAt; 14 | Event? event; 15 | User? user; 16 | 17 | UserLikeEvents({this.id, this.userId, this.eventId, this.createdAt}); 18 | 19 | factory UserLikeEvents.fromJson(Map json) => 20 | _$UserLikeEventsFromJson(json); 21 | 22 | Map toJson() => _$UserLikeEventsToJson(this); 23 | 24 | UserLikeEvents copyWith({ 25 | String? id, 26 | String? userId, 27 | String? eventId, 28 | DateTime? createdAt, 29 | Event? event, 30 | User? user, 31 | }) { 32 | return UserLikeEvents( 33 | id: id ?? this.id, 34 | userId: userId ?? this.userId, 35 | eventId: eventId ?? this.eventId, 36 | createdAt: createdAt ?? this.createdAt, 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/features/following/data/data_access/following_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/models/request/following_request.dart'; 7 | import '../../domain/models/response/following_response.dart'; 8 | 9 | part 'following_service.g.dart'; 10 | 11 | abstract class IFollowingService { 12 | Future add(@Body() FollowingRequest followingRequest); 13 | Future delete(@Query("id") String id); 14 | } 15 | 16 | @RestApi() 17 | @Injectable(as: IFollowingService) 18 | abstract class FollowingManager implements IFollowingService { 19 | @factoryMethod 20 | factory FollowingManager(Dio dio) => _FollowingManager(dio); 21 | 22 | @override 23 | @POST("/follows/add") 24 | Future add(@Body() FollowingRequest followingRequest); 25 | 26 | @override 27 | @DELETE("/follows/delete") 28 | Future delete(@Query("id") String id); 29 | } 30 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "connectopia", 3 | "short_name": "connectopia", 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 | -------------------------------------------------------------------------------- /lib/features/profile/data/dataAccess/profile_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:connectopia/product/models/user/request/user_request.dart'; 3 | import 'package:injectable/injectable.dart'; 4 | import 'package:retrofit/http.dart'; 5 | 6 | import '../../../../product/models/response_data.dart'; 7 | import '../../domain/models/response/profile_response.dart'; 8 | 9 | part 'profile_service.g.dart'; 10 | 11 | abstract class IProfileService { 12 | Future getByUserId(@Query("userId") String userId); 13 | Future updateProfile(UserRequest userRequest); 14 | } 15 | 16 | @RestApi() 17 | @Injectable(as: IProfileService) 18 | abstract class ProfileManager implements IProfileService { 19 | @factoryMethod 20 | factory ProfileManager(Dio dio) => _ProfileManager(dio); 21 | 22 | @override 23 | @GET("/users/getById") 24 | Future getByUserId(@Query("userId") String userId); 25 | 26 | @override 27 | @POST("/users/update") 28 | Future updateProfile(@Body() UserRequest userRequest); 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/category/presentation/widgets/categories_head.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | 5 | import '../../../../app/app_router.dart'; 6 | import '../../../../product/widgets/title_text.dart'; 7 | import 'package:flutter_gen/gen_l10n/app_localizations.dart'; 8 | 9 | class CategoriesHead extends StatelessWidget { 10 | const CategoriesHead({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Row( 15 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 16 | children: [ 17 | Container( 18 | padding: context.paddingNormal, 19 | alignment: Alignment.topLeft, 20 | child: TitleText( 21 | text: "${AppLocalizations.of(context)!.categories};")), 22 | TextButton( 23 | onPressed: () { 24 | context.router.push(GroupsRoute()); 25 | }, 26 | child: Text(AppLocalizations.of(context)!.seeAll)) 27 | ], 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/product/models/core_models/user_groups.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_groups.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserGroups _$UserGroupsFromJson(Map json) => UserGroups( 10 | id: json['id'] as String?, 11 | userId: json['userId'] as String?, 12 | groupId: json['groupId'] as String?, 13 | group: json['group'] == null 14 | ? null 15 | : Group.fromJson(json['group'] as Map), 16 | user: json['user'] == null 17 | ? null 18 | : User.fromJson(json['user'] as Map), 19 | ); 20 | 21 | Map _$UserGroupsToJson(UserGroups instance) => 22 | { 23 | 'id': instance.id, 24 | 'userId': instance.userId, 25 | 'groupId': instance.groupId, 26 | 'group': instance.group, 27 | 'user': instance.user, 28 | }; 29 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/core/network/auth_interceptor.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:dio/dio.dart'; 3 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | 6 | import '../../product/di/injection.dart'; 7 | import '../../product/helpers/setup_token.dart'; 8 | 9 | class AuthInterceptor extends Interceptor { 10 | @override 11 | Future onRequest( 12 | /* Check JWT token */ 13 | RequestOptions options, 14 | RequestInterceptorHandler handler) async { 15 | final token = await getIt.get().read(key: "token"); 16 | if (token.isNotNullOrNoEmpty) { 17 | options.headers["Authorization"] = "Bearer $token"; 18 | } 19 | super.onRequest(options, handler); 20 | } 21 | 22 | @override 23 | void onError(DioError err, ErrorInterceptorHandler handler) async { 24 | /* Refresh token imp */ 25 | if (err.response?.statusCode == 401) { 26 | SetupToken.refreshToken(); 27 | } 28 | super.onError(err, handler); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/product/auth/data/data_access/login_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | import '../../../models/refresh_token/request/refresh_request.dart'; 5 | import '../../../models/refresh_token/response/refresh_response.dart'; 6 | import '../../domain/models/request/login_request.dart'; 7 | import '../../domain/models/response/login_response.dart'; 8 | 9 | part 'login_service.g.dart'; 10 | 11 | abstract class ILoginService { 12 | Future login(LoginRequest loginRequest); 13 | Future refresh(RefreshRequest refreshRequest); 14 | } 15 | 16 | @RestApi() 17 | @Injectable(as: ILoginService) 18 | abstract class LoginManager implements ILoginService { 19 | @factoryMethod 20 | factory LoginManager(Dio dio) => _LoginManager(dio); 21 | 22 | @override 23 | @POST("/auth/login") 24 | Future login(@Body() LoginRequest loginRequest); 25 | 26 | @override 27 | @POST("/auth/token") 28 | Future refresh(@Body() RefreshRequest refreshRequest); 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/register/data/repository/register_repository.dart: -------------------------------------------------------------------------------- 1 | import '../../../../core/error/error_extension.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import '../../../../core/error/error_separator.dart'; 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/request/register_request.dart'; 7 | import '../data_access/register_service.dart'; 8 | 9 | abstract class IRegisterRepository { 10 | Future register(RegisterRequest registerRequest); 11 | } 12 | 13 | @Injectable(as: IRegisterRepository) 14 | class RegisterRepository implements IRegisterRepository { 15 | final IRegisterService _registerService; 16 | final ErrorSeparator _errorSeparator; 17 | 18 | RegisterRepository(this._registerService, this._errorSeparator); 19 | 20 | @override 21 | Future register(RegisterRequest registerRequest) async { 22 | return await _registerService.register(registerRequest).catchError( 23 | (error) => throw _errorSeparator 24 | .createError(error, StackTrace.current) 25 | .handle()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/features/chat/presentation/cubit/view_model/chat_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/presentation/base_view_model.dart'; 2 | 3 | import '../../../../profile/domain/models/response/profile_response.dart'; 4 | 5 | class ChatViewModel extends BaseViewModel { 6 | String? message; 7 | String? roomId; 8 | ProfileResponse? ownUser; 9 | ProfileResponse? otherUser; 10 | 11 | ChatViewModel( 12 | {super.isLoading = false, 13 | this.message, 14 | this.roomId, 15 | this.ownUser, 16 | this.otherUser}); 17 | 18 | ChatViewModel copyWith({ 19 | bool? isLoading, 20 | String? message, 21 | String? roomId, 22 | ProfileResponse? ownUser, 23 | ProfileResponse? otherUser, 24 | }) { 25 | return ChatViewModel( 26 | isLoading: isLoading ?? this.isLoading, 27 | message: message ?? this.message, 28 | roomId: roomId ?? this.roomId, 29 | ownUser: ownUser ?? this.ownUser, 30 | otherUser: otherUser ?? this.otherUser, 31 | ); 32 | } 33 | 34 | @override 35 | List get props => [isLoading, message, roomId, ownUser, otherUser]; 36 | } 37 | -------------------------------------------------------------------------------- /lib/features/maps/presentation/extensions/map_marker_extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 5 | 6 | import '../../../../product/models/core_models/event.dart'; 7 | import '../cubit/maps_cubit.dart'; 8 | 9 | extension MapMarkerExtension on List? { 10 | Set toMapMarkers(BuildContext context) { 11 | return this 12 | ?.map((e) => Marker( 13 | onTap: () => context.read().selectEvent(e), 14 | markerId: MarkerId(e.id ?? ""), 15 | position: LatLng(double.parse(e.eventLat ?? "0.0"), 16 | double.parse(e.eventLng ?? "0.0")), 17 | icon: e.group?.userId == FirebaseAuth.instance.currentUser?.uid 18 | ? BitmapDescriptor.defaultMarkerWithHue( 19 | BitmapDescriptor.hueGreen) 20 | : BitmapDescriptor.defaultMarker)) 21 | .toSet() ?? 22 | {}; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/product/models/core_models/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/core_models/followee.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | import 'event_attendees.dart'; 5 | import 'follower.dart'; 6 | import 'group.dart'; 7 | import 'user_groups.dart'; 8 | import 'user_like_events.dart'; 9 | 10 | part 'user.g.dart'; 11 | 12 | @JsonSerializable() 13 | class User { 14 | String? id; 15 | String? userName; 16 | String? fullName; 17 | String? email; 18 | String? phoneNumber; 19 | String? profilePhotoUrl; 20 | String? about; 21 | List? groups; 22 | List? userGroups; 23 | List? eventAttendees; 24 | List? userLikeEvents; 25 | List? followers; 26 | List? followees; 27 | 28 | User({ 29 | this.id, 30 | this.userName, 31 | this.fullName, 32 | this.email, 33 | this.phoneNumber, 34 | this.profilePhotoUrl, 35 | this.about, 36 | }); 37 | 38 | factory User.fromJson(Map json) => _$UserFromJson(json); 39 | 40 | Map toJson() => _$UserToJson(this); 41 | } 42 | -------------------------------------------------------------------------------- /lib/features/category/presentation/cubit/view_model/category_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/presentation/base_view_model.dart'; 2 | import 'package:connectopia/features/category/domain/models/response/category_details_response.dart'; 3 | import 'package:connectopia/features/category/domain/models/response/category_response.dart'; 4 | 5 | class CategoryViewModel extends BaseViewModel { 6 | List? categories; 7 | List? categoriesWithDetails; 8 | 9 | CategoryViewModel( 10 | {this.categories, this.categoriesWithDetails, super.isLoading}); 11 | 12 | CategoryViewModel copyWith( 13 | {List? categories, 14 | List? categoriesWithDetails, 15 | bool? isLoading}) { 16 | return CategoryViewModel( 17 | categories: categories ?? this.categories, 18 | categoriesWithDetails: 19 | categoriesWithDetails ?? this.categoriesWithDetails, 20 | isLoading: isLoading ?? this.isLoading); 21 | } 22 | 23 | @override 24 | List get props => [categories, categoriesWithDetails, isLoading]; 25 | } 26 | -------------------------------------------------------------------------------- /lib/features/groups/presentation/cubit/view_model/add_group_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/presentation/base_view_model.dart'; 2 | import 'package:connectopia/features/groups/domain/models/request/group_request.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | import '../../../../category/domain/models/response/category_response.dart'; 6 | 7 | class AddGroupViewModel extends BaseViewModel { 8 | GroupRequest groupRequest; 9 | GlobalKey formKey; 10 | CategoryResponse? selectedCategory; 11 | 12 | AddGroupViewModel( 13 | {required this.groupRequest, 14 | required this.formKey, 15 | this.selectedCategory}); 16 | 17 | AddGroupViewModel copyWith({ 18 | GroupRequest? groupRequest, 19 | GlobalKey? formKey, 20 | CategoryResponse? selectedCategory, 21 | }) { 22 | return AddGroupViewModel( 23 | groupRequest: groupRequest ?? this.groupRequest, 24 | formKey: formKey ?? this.formKey, 25 | selectedCategory: selectedCategory ?? this.selectedCategory, 26 | ); 27 | } 28 | 29 | @override 30 | List get props => [groupRequest, formKey, selectedCategory]; 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/user_group/data/data_access/user_group_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:dio/dio.dart'; 3 | import 'package:connectopia/features/user_group/domain/models/request/user_group_request.dart'; 4 | import 'package:connectopia/product/models/user/request/user_request.dart'; 5 | import 'package:injectable/injectable.dart'; 6 | import 'package:retrofit/http.dart'; 7 | 8 | import '../../../../product/models/response_data.dart'; 9 | 10 | part 'user_group_service.g.dart'; 11 | 12 | abstract class IUserGroupService { 13 | Future add(@Body() UserGroupRequest userGroupRequest); 14 | Future delete(@Query("id") String id); 15 | } 16 | 17 | @RestApi() 18 | @Injectable(as: IUserGroupService) 19 | abstract class UserGroupManager implements IUserGroupService { 20 | @factoryMethod 21 | factory UserGroupManager(Dio dio) => _UserGroupManager(dio); 22 | 23 | @override 24 | @POST("/userGroups/add") 25 | Future add(@Body() UserGroupRequest userGroupRequest); 26 | 27 | @override 28 | @DELETE("/userGroups/delete") 29 | Future delete(@Query("id") String id); 30 | } 31 | -------------------------------------------------------------------------------- /lib/features/user_like_event/data/data_access/user_like_event_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/request/user_like_event_request.dart'; 7 | import '../../domain/response/user_like_event_response.dart'; 8 | 9 | part 'user_like_event_service.g.dart'; 10 | 11 | abstract class IUserLikeEventService { 12 | Future add( 13 | @Body() UserLikeEventRequest userLikeEventRequest); 14 | Future delete(@Query("id") String id); 15 | } 16 | 17 | @RestApi() 18 | @Injectable(as: IUserLikeEventService) 19 | abstract class UserLikeEventManager implements IUserLikeEventService { 20 | @factoryMethod 21 | factory UserLikeEventManager(Dio dio) => _UserLikeEventManager(dio); 22 | 23 | @override 24 | @POST("/userLikeEvents/add") 25 | Future add( 26 | @Body() UserLikeEventRequest userLikeEventRequest); 27 | 28 | @override 29 | @DELETE("/userLikeEvents/delete") 30 | Future delete(@Query("id") String id); 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/weather/presentation/cubit/weather_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/app/base_cubit.dart'; 2 | import 'package:connectopia/app/connectopia_app_cubit.dart'; 3 | import 'package:connectopia/product/di/injection.dart'; 4 | 5 | import '../../data/repository/weather_repository.dart'; 6 | import '../../domain/weater.dart'; 7 | import 'view_model/weather_view_model.dart'; 8 | 9 | class WeatherCubit extends BaseCubit { 10 | WeatherCubit() : super(WeatherViewModel()); 11 | 12 | late final IWeatherRepository _weatherRepository; 13 | final key = "22d34fea1d05422b8eb220702230407"; 14 | 15 | void init() async { 16 | _weatherRepository = getIt.get(); 17 | await getWeather( 18 | getIt.get().state.currentCity?.name ?? ""); 19 | } 20 | 21 | Future getWeather(String city) async { 22 | emit(state.copyWith(isLoading: true)); 23 | try { 24 | Weather? weather = await _weatherRepository.getWeatherByCity(key, city); 25 | emit(state.copyWith(weather: weather)); 26 | } catch (e) { 27 | print(e); 28 | } 29 | emit(state.copyWith(isLoading: false)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/city/data/repository/city_repository.dart: -------------------------------------------------------------------------------- 1 | import '../../../../core/error/error_extension.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import '../../../../core/error/error_separator.dart'; 5 | import '../../../../product/models/core_models/city.dart'; 6 | import '../data_access/city_service.dart'; 7 | 8 | abstract class ICityRepository { 9 | Future?> getAll(); 10 | Future getByCityName(String cityName); 11 | } 12 | 13 | @Injectable(as: ICityRepository) 14 | class CityRepository implements ICityRepository { 15 | final ICityService _cityService; 16 | final ErrorSeparator _errorSeparator; 17 | 18 | CityRepository(this._cityService, this._errorSeparator); 19 | 20 | @override 21 | Future?> getAll() async { 22 | return await _cityService.getAll().catchError((error) => 23 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 24 | } 25 | 26 | @override 27 | Future getByCityName(String cityName) async { 28 | return await _cityService.getByCityName(cityName).catchError((error) => 29 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/groups/domain/models/request/group_request.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:json_annotation/json_annotation.dart'; 3 | part 'group_request.g.dart'; 4 | 5 | @JsonSerializable() 6 | class GroupRequest { 7 | String? name; 8 | String? description; 9 | String? iconUrl; 10 | String? categoryId; 11 | String? userId; 12 | 13 | GroupRequest( 14 | {this.name, 15 | this.description, 16 | this.iconUrl, 17 | this.categoryId, 18 | this.userId}); 19 | 20 | factory GroupRequest.fromJson(Map json) => 21 | _$GroupRequestFromJson(json); 22 | 23 | Map toJson() => _$GroupRequestToJson(this); 24 | 25 | GroupRequest copyWith({ 26 | String? name, 27 | String? description, 28 | String? iconUrl, 29 | String? categoryId, 30 | String? userId, 31 | }) { 32 | return GroupRequest( 33 | name: name ?? this.name, 34 | description: description ?? this.description, 35 | iconUrl: iconUrl ?? this.iconUrl, 36 | categoryId: categoryId ?? this.categoryId, 37 | userId: userId ?? this.userId, 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/product/constants/project_colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProjectColors { 4 | static Color primaryColor = const Color(0xff53e78b); 5 | static Color primaryColorLight = const Color(0xffd2f9e1); 6 | static Color primaryColorDark = const Color(0xff13863e); 7 | static Color canvasColor = const Color(0xfffafafa); 8 | static Color scaffoldBackgroundColor = 9 | const Color.fromARGB(250, 250, 250, 250); 10 | static Color cardColor = const Color(0xffffffff); 11 | static Color dividerColor = const Color(0x1f000000); 12 | static Color highlightColor = const Color(0x66bcbcbc); 13 | static Color splashColor = const Color(0x66c8c8c8); 14 | static Color unselectedWidgetColor = const Color(0x8a000000); 15 | static Color disabledColor = const Color(0x61000000); 16 | static Color secondaryHeaderColor = const Color(0xffe9fcf0); 17 | static Color dialogBackgroundColor = const Color(0xffffffff); 18 | static Color indicatorColor = const Color(0xff1fe068); 19 | static Color hintColor = const Color(0x8a000000); 20 | static Color weakShadowColor = const Color.fromARGB(40, 90, 90, 90); 21 | static Color errorColor = const Color(0xffd32f2f); 22 | } 23 | -------------------------------------------------------------------------------- /lib/features/groups/presentation/cubit/view_model/group_detail_view_model.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:connectopia/core/presentation/base_view_model.dart'; 3 | 4 | import '../../../domain/models/response/group_response.dart'; 5 | 6 | class GroupDetailViewModel extends BaseViewModel { 7 | GroupResponse? groupResponse; 8 | bool? isAttended; 9 | bool attendingLoading; 10 | 11 | GroupDetailViewModel( 12 | {this.groupResponse, 13 | this.isAttended, 14 | this.attendingLoading = false, 15 | super.isLoading}); 16 | 17 | GroupDetailViewModel copyWith({ 18 | GroupResponse? groupResponse, 19 | bool? isAttended, 20 | bool? attendingLoading, 21 | bool? isLoading, 22 | }) { 23 | return GroupDetailViewModel( 24 | groupResponse: groupResponse ?? this.groupResponse, 25 | isAttended: isAttended ?? this.isAttended, 26 | attendingLoading: attendingLoading ?? this.attendingLoading, 27 | isLoading: isLoading ?? this.isLoading, 28 | ); 29 | } 30 | 31 | @override 32 | List get props => 33 | [groupResponse, isAttended, attendingLoading, isLoading]; 34 | } 35 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | /* // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:connectopia/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | */ -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /lib/features/user_attend_event/data/data_access/user_attend_event_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:retrofit/http.dart'; 4 | 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/request/user_attend_event_request.dart'; 7 | import '../../domain/response/user_attend_event_response.dart'; 8 | 9 | part 'user_attend_event_service.g.dart'; 10 | 11 | abstract class IUserAttendEventService { 12 | Future add( 13 | @Body() UserAttendEventRequest userLikeEventRequest); 14 | Future delete(@Query("id") String id); 15 | } 16 | 17 | @RestApi() 18 | @Injectable(as: IUserAttendEventService) 19 | abstract class UserAttendEventManager implements IUserAttendEventService { 20 | @factoryMethod 21 | factory UserAttendEventManager(Dio dio) => _UserAttendEventManager(dio); 22 | 23 | @override 24 | @POST("/userAttendEvents/add") 25 | Future add( 26 | @Body() UserAttendEventRequest userAttendEventRequest); 27 | 28 | @override 29 | @DELETE("/userAttendEvents/delete") 30 | Future delete(@Query("id") String id); 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/weather/domain/weater.dart: -------------------------------------------------------------------------------- 1 | class Weather { 2 | Location? location; 3 | Current? current; 4 | 5 | Weather({this.location, this.current}); 6 | 7 | Weather.fromJson(Map json) { 8 | location = 9 | json['location'] != null ? Location.fromJson(json['location']) : null; 10 | current = 11 | json['current'] != null ? Current.fromJson(json['current']) : null; 12 | } 13 | } 14 | 15 | class Location { 16 | String? region; 17 | 18 | Location({ 19 | this.region, 20 | }); 21 | 22 | Location.fromJson(Map json) { 23 | region = json['region']; 24 | } 25 | } 26 | 27 | class Current { 28 | double? tempC; 29 | Condition? condition; 30 | 31 | Current({ 32 | this.tempC, 33 | this.condition, 34 | }); 35 | 36 | Current.fromJson(Map json) { 37 | tempC = json['temp_c']; 38 | 39 | condition = json['condition'] != null 40 | ? Condition.fromJson(json['condition']) 41 | : null; 42 | } 43 | } 44 | 45 | class Condition { 46 | String? icon; 47 | 48 | Condition({this.icon}); 49 | 50 | Condition.fromJson(Map json) { 51 | icon = json['icon']; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/features/donate/api/pay_constants.dart: -------------------------------------------------------------------------------- 1 | class PayConstants { 2 | static const String defaultGooglePay = '''{ 3 | "provider": "google_pay", 4 | "data": { 5 | "environment": "TEST", 6 | "apiVersion": 2, 7 | "apiVersionMinor": 0, 8 | "allowedPaymentMethods": [ 9 | { 10 | "type": "CARD", 11 | "tokenizationSpecification": { 12 | "type": "PAYMENT_GATEWAY", 13 | "parameters": { 14 | "gateway": "example", 15 | "gatewayMerchantId": "gatewayMerchantId" 16 | } 17 | }, 18 | "parameters": { 19 | "allowedCardNetworks": ["VISA", "MASTERCARD"], 20 | "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"], 21 | "billingAddressRequired": true, 22 | "billingAddressParameters": { 23 | "format": "FULL", 24 | "phoneNumberRequired": true 25 | } 26 | } 27 | } 28 | ], 29 | "merchantInfo": { 30 | "merchantId": "01234567890123456789", 31 | "merchantName": "Example Merchant Name" 32 | }, 33 | "transactionInfo": { 34 | "countryCode": "US", 35 | "currencyCode": "USD" 36 | } 37 | } 38 | }'''; 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/features/profile/presentation/cubit/view_model/profile_view_model.dart: -------------------------------------------------------------------------------- 1 | // ignore: must_be_immutable 2 | import '../../../../../core/presentation/base_view_model.dart'; 3 | import '../../../../../product/models/core_models/user.dart'; 4 | import '../../../domain/models/response/profile_response.dart'; 5 | 6 | class ProfileViewModel extends BaseViewModel { 7 | ProfileResponse? profileResponse; 8 | User? defaultUser; 9 | bool followingLoading; 10 | 11 | ProfileViewModel( 12 | {this.profileResponse, 13 | this.defaultUser, 14 | super.isLoading, 15 | this.followingLoading = false}); 16 | 17 | ProfileViewModel copyWith({ 18 | ProfileResponse? profileResponse, 19 | User? defaultUser, 20 | bool? isLoading, 21 | bool? followingLoading, 22 | }) { 23 | return ProfileViewModel( 24 | profileResponse: profileResponse ?? this.profileResponse, 25 | defaultUser: defaultUser ?? this.defaultUser, 26 | isLoading: isLoading ?? this.isLoading, 27 | followingLoading: followingLoading ?? this.followingLoading, 28 | ); 29 | } 30 | 31 | @override 32 | List get props => 33 | [profileResponse, defaultUser, isLoading, followingLoading]; 34 | } 35 | -------------------------------------------------------------------------------- /lib/features/groups/domain/models/request/update_group_request.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | 3 | import 'package:json_annotation/json_annotation.dart'; 4 | part 'update_group_request.g.dart'; 5 | 6 | @JsonSerializable() 7 | class UpdateGroupRequest { 8 | String? id; 9 | String? name; 10 | String? description; 11 | String? iconUrl; 12 | String? categoryId; 13 | 14 | UpdateGroupRequest({ 15 | this.id, 16 | this.name, 17 | this.description, 18 | this.iconUrl, 19 | this.categoryId, 20 | }); 21 | 22 | factory UpdateGroupRequest.fromJson(Map json) => 23 | _$UpdateGroupRequestFromJson(json); 24 | 25 | Map toJson() => _$UpdateGroupRequestToJson(this); 26 | 27 | UpdateGroupRequest copyWith({ 28 | String? id, 29 | String? name, 30 | String? description, 31 | String? iconUrl, 32 | String? categoryId, 33 | }) { 34 | return UpdateGroupRequest( 35 | id: id ?? this.id, 36 | name: name ?? this.name, 37 | description: description ?? this.description, 38 | iconUrl: iconUrl ?? this.iconUrl, 39 | categoryId: categoryId ?? this.categoryId, 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/product/models/core_models/event_attendees.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'event.dart'; 4 | import 'user.dart'; 5 | 6 | part 'event_attendees.g.dart'; 7 | 8 | @JsonSerializable() 9 | class EventAttendees { 10 | String? id; 11 | String? eventId; 12 | String? userId; 13 | DateTime? createdAt; 14 | Event? event; 15 | User? user; 16 | 17 | EventAttendees( 18 | {this.id, 19 | this.eventId, 20 | this.userId, 21 | this.createdAt, 22 | this.event, 23 | this.user}); 24 | 25 | factory EventAttendees.fromJson(Map json) => 26 | _$EventAttendeesFromJson(json); 27 | 28 | Map toJson() => _$EventAttendeesToJson(this); 29 | 30 | EventAttendees copyWith({ 31 | String? id, 32 | String? eventId, 33 | String? userId, 34 | DateTime? createdAt, 35 | Event? event, 36 | User? user, 37 | }) { 38 | return EventAttendees( 39 | id: id ?? this.id, 40 | eventId: eventId ?? this.eventId, 41 | userId: userId ?? this.userId, 42 | createdAt: createdAt ?? this.createdAt, 43 | event: event ?? this.event, 44 | user: user ?? this.user, 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/features/category/domain/models/response/category_details_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'category_details_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CategoryDetailsResponse _$CategoryDetailsResponseFromJson( 10 | Map json) => 11 | CategoryDetailsResponse( 12 | id: json['id'] as String?, 13 | name: json['name'] as String?, 14 | photoUrl: json['photoUrl'] as String?, 15 | groups: (json['groups'] as List?) 16 | ?.map((e) => Group.fromJson(e as Map)) 17 | .toList(), 18 | owner: json['owner'] == null 19 | ? null 20 | : User.fromJson(json['owner'] as Map), 21 | ); 22 | 23 | Map _$CategoryDetailsResponseToJson( 24 | CategoryDetailsResponse instance) => 25 | { 26 | 'id': instance.id, 27 | 'name': instance.name, 28 | 'photoUrl': instance.photoUrl, 29 | 'groups': instance.groups, 30 | 'owner': instance.owner, 31 | }; 32 | -------------------------------------------------------------------------------- /lib/features/donate/presentation/widgets/google_pay_donate_button.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | import 'package:pay/pay.dart'; 6 | 7 | import '../../api/pay_constants.dart'; 8 | import '../cubit/donate_cubit.dart'; 9 | import '../cubit/view_model/donate_view_model.dart'; 10 | 11 | class GooglePayDonateButton extends StatelessWidget { 12 | const GooglePayDonateButton({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return BlocBuilder( 17 | builder: (context, state) { 18 | return GooglePayButton( 19 | paymentConfiguration: PaymentConfiguration.fromJsonString(PayConstants.defaultGooglePay), 20 | paymentItems: [ 21 | PaymentItem( 22 | label: 'Total', 23 | amount: state.selectedAmount.toString(), 24 | status: PaymentItemStatus.final_price, 25 | ), 26 | ], 27 | type: GooglePayButtonType.pay, 28 | margin: context.paddingMedium, 29 | onPaymentResult: context.read().tryPay, 30 | ); 31 | }, 32 | ); 33 | } 34 | } -------------------------------------------------------------------------------- /lib/features/groups/presentation/cubit/view_model/edit_group_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/core/presentation/base_view_model.dart'; 2 | import 'package:connectopia/features/groups/domain/models/request/update_group_request.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | import '../../../../category/domain/models/response/category_response.dart'; 6 | 7 | class EditGroupViewModel extends BaseViewModel { 8 | UpdateGroupRequest? updateGroupRequest; 9 | GlobalKey formKey; 10 | CategoryResponse? selectedCategory; 11 | 12 | EditGroupViewModel( 13 | {this.updateGroupRequest, required this.formKey, this.selectedCategory}); 14 | 15 | EditGroupViewModel copyWith({ 16 | UpdateGroupRequest? updateGroupRequest, 17 | GlobalKey? formKey, 18 | CategoryResponse? selectedCategory, 19 | }) { 20 | return EditGroupViewModel( 21 | updateGroupRequest: updateGroupRequest ?? this.updateGroupRequest, 22 | formKey: formKey ?? this.formKey, 23 | selectedCategory: selectedCategory ?? this.selectedCategory, 24 | ); 25 | } 26 | 27 | @override 28 | List get props => [updateGroupRequest, formKey, selectedCategory]; 29 | } 30 | 31 | enum EditGroupActions { update, delete } 32 | -------------------------------------------------------------------------------- /lib/features/notification/data/repository/notification_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/features/notification/domain/models/request/notification_request.dart'; 2 | 3 | import '../../../../core/error/error_extension.dart'; 4 | import 'package:injectable/injectable.dart'; 5 | 6 | import '../../../../core/error/error_separator.dart'; 7 | import '../../../../product/models/response_data.dart'; 8 | import '../data_access/notification_service.dart'; 9 | 10 | abstract class INotificationRepository { 11 | Future sendMessage(NotificationRequest notificationRequest); 12 | } 13 | 14 | @Injectable(as: INotificationRepository) 15 | class NotificationRepository implements INotificationRepository { 16 | final INotificationService _notificationService; 17 | final ErrorSeparator _errorSeparator; 18 | 19 | NotificationRepository(this._notificationService, this._errorSeparator); 20 | 21 | @override 22 | Future sendMessage( 23 | NotificationRequest notificationRequest) async { 24 | return await _notificationService 25 | .sendMessage(notificationRequest) 26 | .catchError((error) => throw _errorSeparator 27 | .createError(error, StackTrace.current) 28 | .handle()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/product/widgets/dropdown_form_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DropdownFormField extends StatelessWidget { 4 | const DropdownFormField( 5 | {super.key, required this.onTap, this.value, required this.label}); 6 | 7 | final Function() onTap; 8 | final String? value; 9 | final String label; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return TextButton( 14 | style: ButtonStyle( 15 | padding: 16 | MaterialStateProperty.all(const EdgeInsets.all(0.0)), 17 | backgroundColor: MaterialStateProperty.all(Colors.transparent), 18 | shape: MaterialStateProperty.all( 19 | RoundedRectangleBorder( 20 | borderRadius: BorderRadius.circular(12), 21 | side: const BorderSide(color: Colors.transparent)))), 22 | onPressed: () { 23 | onTap(); 24 | }, 25 | child: TextFormField( 26 | enabled: false, 27 | decoration: InputDecoration( 28 | suffixIcon: const Icon(Icons.arrow_drop_down), 29 | label: Text(value ?? label), 30 | ), 31 | onChanged: (value) {}, 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/features/event/presentation/cubit/view_model/event_card_view_model.dart: -------------------------------------------------------------------------------- 1 | import '../../../../../core/presentation/base_view_model.dart'; 2 | import '../../../../../product/models/core_models/event.dart'; 3 | 4 | class EventCardViewModel extends BaseViewModel { 5 | Event? event; 6 | bool likeLoading; 7 | bool? isLiked; 8 | int? likeCount; 9 | String? eventLikeId; 10 | 11 | EventCardViewModel( 12 | {this.event, 13 | this.likeLoading = false, 14 | this.isLiked, 15 | bool? isLoading, 16 | this.likeCount, 17 | this.eventLikeId}); 18 | 19 | EventCardViewModel copyWith({ 20 | Event? event, 21 | bool? likeLoading, 22 | bool? isLiked, 23 | bool? isLoading, 24 | int? likeCount, 25 | String? eventLikeId, 26 | }) { 27 | return EventCardViewModel( 28 | event: event ?? this.event, 29 | likeLoading: likeLoading ?? this.likeLoading, 30 | isLiked: isLiked ?? this.isLiked, 31 | isLoading: isLoading ?? this.isLoading, 32 | likeCount: likeCount ?? this.likeCount, 33 | eventLikeId: eventLikeId ?? this.eventLikeId, 34 | ); 35 | } 36 | 37 | @override 38 | List get props => 39 | [event, likeLoading, isLiked, isLoading, likeCount, eventLikeId]; 40 | } 41 | -------------------------------------------------------------------------------- /lib/features/groups/presentation/widgets/group_detail_description.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/features/groups/presentation/cubit/group_detail_cubit.dart'; 2 | import 'package:connectopia/features/groups/presentation/cubit/view_model/group_detail_view_model.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:kartal/kartal.dart'; 6 | 7 | import '../../../../product/models/core_models/group.dart'; 8 | 9 | class GroupDetailDescription extends StatelessWidget { 10 | const GroupDetailDescription({ 11 | super.key, 12 | required this.group, 13 | }); 14 | 15 | final Group? group; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return BlocBuilder( 20 | builder: (context, state) { 21 | return Container( 22 | padding: context.horizontalPaddingNormal, 23 | child: Text( 24 | state.groupResponse?.description ?? group?.description ?? "", 25 | textAlign: TextAlign.center, 26 | maxLines: 3, 27 | style: context.textTheme.titleSmall! 28 | .copyWith(fontWeight: FontWeight.w500), 29 | ), 30 | ); 31 | }, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/features/search/presentation/widgets/custom_search_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | 6 | import '../../../../app/app_router.dart'; 7 | import '../cubit/search_cubit.dart'; 8 | import 'package:flutter_gen/gen_l10n/app_localizations.dart'; 9 | 10 | class CustomSearchBar extends StatelessWidget { 11 | const CustomSearchBar({ 12 | super.key, 13 | this.isButton = false, 14 | }); 15 | 16 | final bool isButton; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Container( 21 | padding: context.paddingLow, 22 | child: TextField( 23 | onChanged: (value) { 24 | context.read().changeSearchKey(value); 25 | }, 26 | canRequestFocus: isButton ? false : true, 27 | autofocus: isButton ? false : true, 28 | onTap: isButton ? () => context.router.push(const SearchRoute()) : null, 29 | decoration: InputDecoration( 30 | hintStyle: const TextStyle(fontWeight: FontWeight.bold), 31 | hintText: AppLocalizations.of(context)!.search, 32 | prefixIcon: const Icon(Icons.search)), 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/product/models/core_models/event.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/models/core_models/user_like_events.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | import 'city.dart'; 5 | import 'event_attendees.dart'; 6 | import 'group.dart'; 7 | 8 | part 'event.g.dart'; 9 | 10 | @JsonSerializable() 11 | class Event { 12 | String? id; 13 | String? name; 14 | String? description; 15 | String? groupId; 16 | String? cityId; 17 | DateTime? createdAt; 18 | DateTime? eventDate; 19 | String? eventLat; 20 | String? eventLng; 21 | String? eventPhotoUrl; 22 | String? eventAddress; 23 | City? city; 24 | Group? group; 25 | List? eventAttendees; 26 | List? userLikeEvents; 27 | 28 | Event( 29 | {this.id, 30 | this.name, 31 | this.description, 32 | this.groupId, 33 | this.cityId, 34 | this.createdAt, 35 | this.eventDate, 36 | this.eventLat, 37 | this.eventLng, 38 | this.eventAddress, 39 | this.eventPhotoUrl, 40 | this.city, 41 | this.group, 42 | this.eventAttendees, 43 | this.userLikeEvents}); 44 | 45 | factory Event.fromJson(Map json) => _$EventFromJson(json); 46 | 47 | Map toJson() => _$EventToJson(this); 48 | } 49 | -------------------------------------------------------------------------------- /lib/product/auth/data/operations/login_operations.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/auth/data/repositories/user_repository.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import '../../../helpers/setup_token.dart'; 5 | import '../../../models/user/request/user_request.dart'; 6 | import '../../../models/user/response/user_response.dart'; 7 | 8 | abstract class ILoginOperations { 9 | Future login(UserRequest userRequest); 10 | } 11 | 12 | @Injectable(as: ILoginOperations) 13 | class LoginOperations implements ILoginOperations { 14 | final IUserRepository _userRepository; 15 | LoginOperations(this._userRepository); 16 | 17 | @override 18 | Future login(UserRequest userRequest) async { 19 | bool isNewUser = false; 20 | 21 | UserResponse? userResponse = await _userRepository 22 | .getByUserId(userRequest.id ?? "") 23 | .catchError((onError) { 24 | return null; 25 | }); 26 | if (userResponse is! UserResponse) { 27 | await _userRepository.addUser(userRequest).catchError((onError) { 28 | print(onError); 29 | return null; 30 | }); 31 | isNewUser = true; 32 | } 33 | await SetupToken.registerToken( 34 | userResponse ?? UserResponse(id: userRequest.id)); 35 | return isNewUser; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/product/auth/data/repositories/user_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:injectable/injectable.dart'; 2 | 3 | import '../../../../core/error/error_extension.dart'; 4 | import '../../../../core/error/error_separator.dart'; 5 | import '../../../models/user/request/user_request.dart'; 6 | import '../../../models/user/response/user_response.dart'; 7 | import '../data_access/user_service.dart'; 8 | 9 | abstract class IUserRepository { 10 | Future addUser(UserRequest userRequest); 11 | Future getByUserId(String userId); 12 | } 13 | 14 | @Injectable(as: IUserRepository) 15 | class UserRepository implements IUserRepository { 16 | final IUserService _userService; 17 | final ErrorSeparator _errorSeparator; 18 | 19 | UserRepository(this._userService, this._errorSeparator); 20 | 21 | @override 22 | Future addUser(UserRequest userRequest) async { 23 | return await _userService.addUser(userRequest).catchError((error) => 24 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 25 | } 26 | 27 | @override 28 | Future getByUserId(String userId) async { 29 | return await _userService.getByUserId(userId).catchError((error) => 30 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/product/models/core_models/event_attendees.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'event_attendees.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | EventAttendees _$EventAttendeesFromJson(Map json) => 10 | EventAttendees( 11 | id: json['id'] as String?, 12 | eventId: json['eventId'] as String?, 13 | userId: json['userId'] as String?, 14 | createdAt: json['createdAt'] == null 15 | ? null 16 | : DateTime.parse(json['createdAt'] as String), 17 | event: json['event'] == null 18 | ? null 19 | : Event.fromJson(json['event'] as Map), 20 | user: json['user'] == null 21 | ? null 22 | : User.fromJson(json['user'] as Map), 23 | ); 24 | 25 | Map _$EventAttendeesToJson(EventAttendees instance) => 26 | { 27 | 'id': instance.id, 28 | 'eventId': instance.eventId, 29 | 'userId': instance.userId, 30 | 'createdAt': instance.createdAt?.toIso8601String(), 31 | 'event': instance.event, 32 | 'user': instance.user, 33 | }; 34 | -------------------------------------------------------------------------------- /lib/product/models/core_models/user_like_events.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_like_events.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserLikeEvents _$UserLikeEventsFromJson(Map json) => 10 | UserLikeEvents( 11 | id: json['id'] as String?, 12 | userId: json['userId'] as String?, 13 | eventId: json['eventId'] as String?, 14 | createdAt: json['createdAt'] == null 15 | ? null 16 | : DateTime.parse(json['createdAt'] as String), 17 | ) 18 | ..event = json['event'] == null 19 | ? null 20 | : Event.fromJson(json['event'] as Map) 21 | ..user = json['user'] == null 22 | ? null 23 | : User.fromJson(json['user'] as Map); 24 | 25 | Map _$UserLikeEventsToJson(UserLikeEvents instance) => 26 | { 27 | 'id': instance.id, 28 | 'userId': instance.userId, 29 | 'eventId': instance.eventId, 30 | 'createdAt': instance.createdAt?.toIso8601String(), 31 | 'event': instance.event, 32 | 'user': instance.user, 33 | }; 34 | -------------------------------------------------------------------------------- /lib/product/models/user/request/user_request.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | part 'user_request.g.dart'; 5 | 6 | @JsonSerializable(createFactory: false) 7 | class UserRequest { 8 | String? id; 9 | String? userName; 10 | String? fullName; 11 | String? email; 12 | String? phoneNumber; 13 | String? profilePhotoUrl; 14 | String? about; 15 | 16 | UserRequest( 17 | {this.id, 18 | this.userName, 19 | this.email, 20 | this.phoneNumber, 21 | this.fullName, 22 | this.profilePhotoUrl, 23 | this.about}); 24 | 25 | Map toJson() => _$UserRequestToJson(this); 26 | 27 | UserRequest copyWith({ 28 | String? id, 29 | String? userName, 30 | String? fullName, 31 | String? email, 32 | String? phoneNumber, 33 | String? profilePhotoUrl, 34 | String? about, 35 | }) { 36 | return UserRequest( 37 | id: id ?? this.id, 38 | userName: userName ?? this.userName, 39 | fullName: fullName ?? this.fullName, 40 | email: email ?? this.email, 41 | phoneNumber: phoneNumber ?? this.phoneNumber, 42 | profilePhotoUrl: profilePhotoUrl ?? this.profilePhotoUrl, 43 | about: about ?? this.about, 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/core/helpers/image_upload.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:image_cropper/image_cropper.dart'; 3 | import 'package:image_picker/image_picker.dart'; 4 | 5 | import 'image_crop.dart'; 6 | 7 | abstract class ImageUploadService { 8 | final ImagePicker picker = ImagePicker(); 9 | Future fetchPhoto(); 10 | } 11 | 12 | class ImageUploadManager { 13 | final ImageUploadService imageUploadService; 14 | final ImageCropManager imageCropManager = ImageCropManager(); 15 | 16 | ImageUploadManager(this.imageUploadService); 17 | 18 | Future cropWithFetch() async { 19 | XFile? selectFile = await imageUploadService.fetchPhoto(); 20 | if (selectFile != null) { 21 | return await imageCropManager.crop(file: selectFile); 22 | } 23 | return null; 24 | } 25 | } 26 | 27 | class ImageUploadFromLibary extends ImageUploadService { 28 | @override 29 | Future fetchPhoto() async { 30 | final XFile? image = await picker.pickImage(source: ImageSource.gallery); 31 | return image; 32 | } 33 | } 34 | 35 | class ImageUploadFromCamera extends ImageUploadService { 36 | @override 37 | Future fetchPhoto() async { 38 | final XFile? image = await picker.pickImage(source: ImageSource.camera); 39 | return image; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/features/onboard/presentation/view_model/onboard_model.dart: -------------------------------------------------------------------------------- 1 | import '../../../../product/constants/image_constants.dart'; 2 | 3 | class OnboardModel { 4 | final String title; 5 | final String image; 6 | final String desc; 7 | 8 | OnboardModel({ 9 | required this.title, 10 | required this.image, 11 | required this.desc, 12 | }); 13 | } 14 | 15 | List contents = [ 16 | OnboardModel( 17 | title: "Toplulukları Keşfet, Etkinlikleri Kaçırma!", 18 | image: ImageConstants.onBoardNetworking.imagePath, 19 | desc: 20 | "Connectopia'da sosyal sorumluluk projeleri, kariyer veya kişisel gelişim için etkinlikler bulabilir, topluluklarda, sizin alanınızdaki insanlarla yeni bağlantılar kurabilirsiniz.", 21 | ), 22 | OnboardModel( 23 | title: "Kendi topluluğunu kur, etkinliğini duyur!", 24 | image: ImageConstants.onBoardAnnouncement.imagePath, 25 | desc: 26 | "Connectopia'da kendi topluluğunu oluşturabilir ve etkinlikler düzenleyip paylaşabilirsin.", 27 | ), 28 | OnboardModel( 29 | title: "Toplulukları Destekle, Gelişimlerine Katkıda Bulun!", 30 | image: ImageConstants.onBoardHelping.imagePath, 31 | desc: 32 | "Connectopia'da topluluklara bağış yapabilir veya kendi topluluğuna bağış alabilirsin. Unutma, bağışlar, toplulukların büyümesine yardımcı olacaktır.", 33 | ), 34 | ]; 35 | -------------------------------------------------------------------------------- /lib/features/profile/presentation/cubit/view_model/edit_profile_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | import '../../../../../core/presentation/base_view_model.dart'; 6 | import '../../../../../product/models/user/request/user_request.dart'; 7 | 8 | class EditProfileViewModel extends BaseViewModel { 9 | UserRequest? userRequest; 10 | GlobalKey updateProfileFormKey; 11 | bool? isExistUserName; 12 | File? profilePhoto; 13 | 14 | EditProfileViewModel( 15 | {this.userRequest, 16 | required this.updateProfileFormKey, 17 | this.isExistUserName, 18 | this.profilePhoto}); 19 | 20 | EditProfileViewModel copyWith({ 21 | UserRequest? userRequest, 22 | GlobalKey? updateProfileFormKey, 23 | bool? isExistUserName, 24 | File? profilePhoto, 25 | }) { 26 | return EditProfileViewModel( 27 | updateProfileFormKey: updateProfileFormKey ?? this.updateProfileFormKey, 28 | userRequest: userRequest ?? this.userRequest, 29 | isExistUserName: isExistUserName ?? this.isExistUserName, 30 | profilePhoto: profilePhoto ?? this.profilePhoto, 31 | ); 32 | } 33 | 34 | @override 35 | List get props => [ 36 | userRequest, 37 | updateProfileFormKey, 38 | isExistUserName, 39 | profilePhoto, 40 | ]; 41 | } 42 | -------------------------------------------------------------------------------- /lib/features/user_group/data/repository/user_group_repository.dart: -------------------------------------------------------------------------------- 1 | import '../../../../core/error/error_extension.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import '../../../../core/error/error_separator.dart'; 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/models/request/user_group_request.dart'; 7 | import '../data_access/user_group_service.dart'; 8 | 9 | abstract class IUserGroupRepository { 10 | Future add(UserGroupRequest userGroupRequest); 11 | Future delete(String id); 12 | } 13 | 14 | @Injectable(as: IUserGroupRepository) 15 | class UserGroupRepository implements IUserGroupRepository { 16 | final IUserGroupService _userGroupService; 17 | final ErrorSeparator _errorSeparator; 18 | 19 | UserGroupRepository(this._userGroupService, this._errorSeparator); 20 | 21 | @override 22 | Future add(UserGroupRequest userGroupRequest) async { 23 | return await _userGroupService.add(userGroupRequest).catchError((error) => 24 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 25 | } 26 | 27 | @override 28 | Future delete(String id) async { 29 | return await _userGroupService.delete(id).catchError((error) => 30 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/features/category/data/repository/category_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/features/category/domain/models/response/category_details_response.dart'; 2 | 3 | import '../../../../core/error/error_extension.dart'; 4 | import 'package:injectable/injectable.dart'; 5 | 6 | import '../../../../core/error/error_separator.dart'; 7 | import '../../domain/models/response/category_response.dart'; 8 | import '../dataAccess/category_service.dart'; 9 | 10 | abstract class ICategoryRepository { 11 | Future?> getAll(); 12 | Future> getAllWithDetails(); 13 | } 14 | 15 | @Injectable(as: ICategoryRepository) 16 | class CategoryRepository implements ICategoryRepository { 17 | final ICategoryService _categoryService; 18 | final ErrorSeparator _errorSeparator; 19 | 20 | CategoryRepository(this._categoryService, this._errorSeparator); 21 | 22 | @override 23 | Future?> getAll() async { 24 | return await _categoryService.getAll().catchError((error) => 25 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 26 | } 27 | 28 | @override 29 | Future> getAllWithDetails() async { 30 | return await _categoryService.getAllWithDetails().catchError((error) => 31 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 875664835580-rt5gun4t30tn9qs2c1nd83hskhp76om0.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.875664835580-rt5gun4t30tn9qs2c1nd83hskhp76om0 9 | ANDROID_CLIENT_ID 10 | 875664835580-lp8ulecm21ll0sm03072vi3k984jja9t.apps.googleusercontent.com 11 | API_KEY 12 | AIzaSyCGjvSeoEQzsc2SVF7A3UJFlvHl_ODtZUw 13 | GCM_SENDER_ID 14 | 875664835580 15 | PLIST_VERSION 16 | 1 17 | BUNDLE_ID 18 | com.example.connectopia 19 | PROJECT_ID 20 | f41-flutterfire 21 | STORAGE_BUCKET 22 | f41-flutterfire.appspot.com 23 | IS_ADS_ENABLED 24 | 25 | IS_ANALYTICS_ENABLED 26 | 27 | IS_APPINVITE_ENABLED 28 | 29 | IS_GCM_ENABLED 30 | 31 | IS_SIGNIN_ENABLED 32 | 33 | GOOGLE_APP_ID 34 | 1:875664835580:ios:e4766c9fac058f13f82879 35 | 36 | -------------------------------------------------------------------------------- /lib/product/helpers/permisson_handler.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/product/widgets/info_snack_bar.dart'; 2 | import 'package:geolocator/geolocator.dart'; 3 | 4 | import '../../core/helpers/globals.dart'; 5 | 6 | class PermissonHandler { 7 | static Future handleLocationPermission() async { 8 | bool serviceEnabled; 9 | LocationPermission permission; 10 | 11 | serviceEnabled = await Geolocator.isLocationServiceEnabled(); 12 | if (!serviceEnabled) { 13 | snackbarKey.currentState?.showSnackBar(InfoSnackBar( 14 | contentText: 15 | 'Location services are disabled. Please enable the services')); 16 | return false; 17 | } 18 | permission = await Geolocator.checkPermission(); 19 | if (permission == LocationPermission.denied) { 20 | permission = await Geolocator.requestPermission(); 21 | if (permission == LocationPermission.denied) { 22 | snackbarKey.currentState?.showSnackBar( 23 | InfoSnackBar(contentText: 'Location permissions are denied')); 24 | return false; 25 | } 26 | } 27 | if (permission == LocationPermission.deniedForever) { 28 | snackbarKey.currentState?.showSnackBar(InfoSnackBar( 29 | contentText: 30 | 'Location permissions are permanently denied, we cannot request permissions.')); 31 | return false; 32 | } 33 | return true; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/features/main/presentation/cubit/main_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:connectopia/app/app_router.dart'; 3 | import 'package:connectopia/app/base_cubit.dart'; 4 | import 'package:connectopia/features/main/presentation/cubit/view_model/main_view_model.dart'; 5 | import 'package:connectopia/features/main/presentation/cubit/view_model/route_enums.dart'; 6 | import 'package:connectopia/product/di/injection.dart'; 7 | import 'package:firebase_auth/firebase_auth.dart'; 8 | 9 | class MainCubit extends BaseCubit { 10 | MainCubit() : super(MainViewModel()); 11 | 12 | void setTabsRouter(TabsRouter tabsRouter) { 13 | if (tabsRouter.activeIndex == RouteEnums.profile.index) { 14 | if (FirebaseAuth.instance.currentUser == null) { 15 | getIt.get().replace(const MainLoginRoute()); 16 | return; 17 | } 18 | } 19 | emit(state.copyWith(tabsRouter: tabsRouter)); 20 | } 21 | 22 | void navigateToMaps() { 23 | state.tabsRouter?.setActiveIndex(RouteEnums.maps.index); 24 | } 25 | 26 | void navigateHome() { 27 | state.tabsRouter?.setActiveIndex(RouteEnums.home.index); 28 | } 29 | 30 | void navigateToDiscover() { 31 | state.tabsRouter?.setActiveIndex(RouteEnums.discover.index); 32 | } 33 | 34 | void navigateToProfile() { 35 | state.tabsRouter?.setActiveIndex(RouteEnums.profile.index); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/app/app_wrapper_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:connectopia/features/maps/presentation/cubit/maps_cubit.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | 6 | import '../features/category/presentation/cubit/category_cubit.dart'; 7 | import '../product/widgets/global_progress_loading_bar.dart'; 8 | import 'connectopia_app_cubit.dart'; 9 | 10 | @RoutePage() 11 | class AppWrapperPage extends StatelessWidget with AutoRouteWrapper { 12 | const AppWrapperPage({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Stack( 17 | children: [ 18 | HeroControllerScope( 19 | controller: HeroController(), child: const AutoRouter()), 20 | BlocBuilder( 21 | builder: (context, state) { 22 | return state.isLoading 23 | ? const GlobalProgressLoadingBar() 24 | : const SizedBox(); 25 | }, 26 | ), 27 | ], 28 | ); 29 | } 30 | 31 | @override 32 | Widget wrappedRoute(BuildContext context) { 33 | return MultiBlocProvider(providers: [ 34 | BlocProvider( 35 | create: (ctx) => CategoryCubit()..init(), 36 | ), 37 | BlocProvider( 38 | create: (ctx) => MapsCubit()..init(), 39 | ), 40 | ], child: this); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/features/following/data/repository/following_repository.dart: -------------------------------------------------------------------------------- 1 | import '../../../../core/error/error_extension.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import '../../../../core/error/error_separator.dart'; 5 | import '../../../../product/models/response_data.dart'; 6 | import '../../domain/models/request/following_request.dart'; 7 | import '../../domain/models/response/following_response.dart'; 8 | import '../data_access/following_service.dart'; 9 | 10 | abstract class IFollowingRepository { 11 | Future add(FollowingRequest FollowingRequest); 12 | Future delete(String id); 13 | } 14 | 15 | @Injectable(as: IFollowingRepository) 16 | class FollowingRepository implements IFollowingRepository { 17 | final IFollowingService _followingService; 18 | final ErrorSeparator _errorSeparator; 19 | 20 | FollowingRepository(this._followingService, this._errorSeparator); 21 | 22 | @override 23 | Future add(FollowingRequest followingRequest) async { 24 | return await _followingService.add(followingRequest).catchError((error) => 25 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 26 | } 27 | 28 | @override 29 | Future delete(String id) async { 30 | return await _followingService.delete(id).catchError((error) => 31 | throw _errorSeparator.createError(error, StackTrace.current).handle()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | void fl_register_plugins(FlPluginRegistry* registry) { 15 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = 16 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); 17 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar); 18 | g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = 19 | fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); 20 | flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); 21 | g_autoptr(FlPluginRegistrar) smart_auth_registrar = 22 | fl_plugin_registry_get_registrar_for_plugin(registry, "SmartAuthPlugin"); 23 | smart_auth_plugin_register_with_registrar(smart_auth_registrar); 24 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 25 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 26 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 27 | } 28 | -------------------------------------------------------------------------------- /lib/features/search/presentation/cubit/search_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectopia/app/base_cubit.dart'; 2 | 3 | import '../../../../app/connectopia_app_cubit.dart'; 4 | import '../../../../product/di/injection.dart'; 5 | import '../../../groups/data/repositories/group_repository.dart'; 6 | import 'view_model/search_view_model.dart'; 7 | 8 | class SearchCubit extends BaseCubit { 9 | SearchCubit() : super(SearchViewModel()); 10 | 11 | late final IGroupRepository _groupRepository; 12 | 13 | Future init() async { 14 | _groupRepository = getIt.get(); 15 | await getAllGroups(); 16 | } 17 | 18 | void changeSearchKey(String? searchKey) { 19 | if (searchKey != null && searchKey.isNotEmpty) { 20 | final searchResult = state.allGroups 21 | ?.where((element) => 22 | element?.name?.toLowerCase().contains(searchKey.toLowerCase()) ?? 23 | false) 24 | .toList(); 25 | emit(state.copyWith(searchResult: searchResult)); 26 | } else { 27 | emit(state.copyWith(searchResult: null)); 28 | } 29 | } 30 | 31 | Future getAllGroups() async { 32 | getIt.get().changeIsLoading(isLoading: true); 33 | final groups = await _groupRepository.getAll(); 34 | emit(state.copyWith(allGroups: groups, searchResult: [])); 35 | getIt.get().changeIsLoading(isLoading: false); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"connectopia", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | --------------------------------------------------------------------------------