├── lib ├── core │ ├── constants │ │ ├── app_strings.dart │ │ ├── app_contants.dart │ │ ├── app_routes.dart │ │ ├── theme │ │ │ ├── dark_theme │ │ │ │ └── dark_theme.dart │ │ │ ├── light_theme │ │ │ │ └── light_theme.dart │ │ │ └── base_theme │ │ │ │ └── base_theme.dart │ │ ├── app_images.dart │ │ └── app_icons.dart │ ├── extensions │ │ ├── sizer.dart │ │ ├── date.dart │ │ ├── platform.dart │ │ ├── space.dart │ │ └── theme.dart │ ├── configs │ │ ├── getX │ │ │ ├── base_controller.dart │ │ │ ├── init_controllers.dart │ │ │ └── page_routes.dart │ │ └── cache │ │ │ └── cache.dart │ └── utils │ │ ├── error │ │ └── firebase_error_handler.dart │ │ └── snack_bar │ │ └── show_custom_snack_bar.dart ├── modules │ ├── base_page │ │ ├── infra │ │ │ └── datasources │ │ │ │ └── base_page_controller.dart │ │ └── presenter │ │ │ └── base_page.dart │ ├── notification │ │ ├── infra │ │ │ ├── datasources │ │ │ │ └── notification_screen_controller.dart │ │ │ └── models │ │ │ │ └── notification_card.dart │ │ └── presenter │ │ │ ├── widgets │ │ │ ├── title.dart │ │ │ ├── card_avatar.dart │ │ │ ├── header.dart │ │ │ └── info.dart │ │ │ └── notifications_screen.dart │ ├── home │ │ ├── presenter │ │ │ ├── widgets │ │ │ │ ├── loading_widget.dart │ │ │ │ ├── post │ │ │ │ │ ├── post_image.dart │ │ │ │ │ ├── post_header.dart │ │ │ │ │ ├── post_bottom.dart │ │ │ │ │ └── post.dart │ │ │ │ ├── home_header.dart │ │ │ │ ├── tab_bar_widget.dart │ │ │ │ └── tab_category_model.dart │ │ │ └── home_screen.dart │ │ └── infra │ │ │ └── datasources │ │ │ └── user_controller.dart │ ├── category │ │ └── infra │ │ │ ├── datasources │ │ │ └── category_controller.dart │ │ │ └── models │ │ │ ├── category_header.dart │ │ │ └── discover_box_model.dart │ ├── base │ │ ├── infra │ │ │ └── datasources │ │ │ │ └── base_screen_controller.dart │ │ └── presenter │ │ │ └── base_screen.dart │ ├── boarding │ │ └── presenter │ │ │ └── boarding_screen.dart │ ├── splash │ │ ├── presenter │ │ │ ├── widgets │ │ │ │ ├── splash_text.dart │ │ │ │ └── splash_square_image.dart │ │ │ └── splash_screen.dart │ │ └── infra │ │ │ ├── models │ │ │ └── centered_image_design.dart │ │ │ └── datasources │ │ │ └── splash_screen_controller.dart │ └── profile │ │ └── profile_screen.dart ├── entities │ ├── notification.dart │ ├── peer.dart │ ├── person.dart │ ├── post.dart │ └── user.dart ├── models │ ├── avatar_model.dart │ ├── settings_icon.dart │ ├── highlighted_action_text.dart │ ├── custom_common_button.dart │ ├── custom_search_box.dart │ └── custom_input_form_field.dart └── main.dart ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── my_application.h ├── ios ├── 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-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── GoogleService-Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── GoogleService-Info.plist └── Podfile ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── send_post_app │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── assets ├── images │ ├── background.png │ ├── dummy_photo.png │ ├── dummy_avatar.png │ ├── dummy_photo_2.png │ ├── dummy_photo_3.png │ ├── dummy_avatar_2.png │ ├── dummy_post_image.png │ ├── light_background.png │ ├── dummy_post_image_2.png │ ├── header_background.png │ ├── dummy_designer_photo.png │ ├── dummy_ui_design_photo.png │ ├── rectangle_box_cover.png │ ├── dummy_illustrator_photo.png │ ├── dummy_making_video_photo.png │ ├── dummy_photographer_photo.png │ ├── dummy_photographer_photo_2.png │ └── dummy_video_creator_photo.png ├── fonts │ └── Montserrat-Regular.ttf └── icons │ ├── ic_arrow_right.svg │ ├── ic_arrow_left.svg │ ├── ic_back_arrow.svg │ ├── ic_send.svg │ ├── ic_facebook.svg │ ├── ic_cancel.svg │ ├── ic_log_out.svg │ ├── ic_show.svg │ ├── ic_home.svg │ ├── ic_facebook_filled.svg │ ├── ic_delete.svg │ ├── ic_search.svg │ ├── ic_edit.svg │ ├── ic_profile.svg │ ├── ic_global.svg │ ├── ic_filter.svg │ ├── ic_hide.svg │ ├── ic_gallery.svg │ ├── ic_send_filled.svg │ ├── ic_notification.svg │ ├── ic_heart.svg │ ├── ic_category_filled.svg │ ├── ic_add_circle.svg │ ├── ic_upload.svg │ ├── ic_profile_filled.svg │ ├── ic_home_filled.svg │ ├── ic_camera.svg │ ├── ic_notification_filled.svg │ ├── ic_settings.svg │ ├── ic_chat.svg │ ├── ic_category.svg │ └── ic_instagram.svg ├── macos ├── 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 │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme └── Podfile ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ └── flutter_window.cpp ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ └── generated_plugins.cmake ├── .gitignore ├── pubspec.yaml ├── test └── widget_test.dart ├── analysis_options.yaml ├── .metadata └── README.md /lib/core/constants/app_strings.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/background.png -------------------------------------------------------------------------------- /assets/images/dummy_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_photo.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/images/dummy_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_avatar.png -------------------------------------------------------------------------------- /assets/images/dummy_photo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_photo_2.png -------------------------------------------------------------------------------- /assets/images/dummy_photo_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_photo_3.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/images/dummy_avatar_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_avatar_2.png -------------------------------------------------------------------------------- /assets/images/dummy_post_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_post_image.png -------------------------------------------------------------------------------- /assets/images/light_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/light_background.png -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /assets/fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /assets/images/dummy_post_image_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_post_image_2.png -------------------------------------------------------------------------------- /assets/images/header_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/header_background.png -------------------------------------------------------------------------------- /assets/images/dummy_designer_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_designer_photo.png -------------------------------------------------------------------------------- /assets/images/dummy_ui_design_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_ui_design_photo.png -------------------------------------------------------------------------------- /assets/images/rectangle_box_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/rectangle_box_cover.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /assets/images/dummy_illustrator_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_illustrator_photo.png -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/images/dummy_making_video_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_making_video_photo.png -------------------------------------------------------------------------------- /assets/images/dummy_photographer_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_photographer_photo.png -------------------------------------------------------------------------------- /assets/images/dummy_photographer_photo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_photographer_photo_2.png -------------------------------------------------------------------------------- /assets/images/dummy_video_creator_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/assets/images/dummy_video_creator_photo.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/batuhanozkandev/send-post-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-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/batuhanozkandev/send-post-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/batuhanozkandev/send-post-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/batuhanozkandev/send-post-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /lib/modules/base_page/infra/datasources/base_page_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:send_post_app/core/configs/getX/base_controller.dart'; 2 | 3 | class BasePageController extends BaseController {} 4 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/batuhanozkandev/send-post-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/batuhanozkandev/send-post-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/entities/notification.dart: -------------------------------------------------------------------------------- 1 | class Notification { 2 | final String? title; 3 | final String? avatarUrl; 4 | 5 | Notification( 6 | this.title, 7 | this.avatarUrl, 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /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/send_post_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.send_post_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /lib/modules/notification/infra/datasources/notification_screen_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:send_post_app/core/configs/getX/base_controller.dart'; 2 | 3 | class NotificationScreenController extends BaseController {} 4 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/icons/ic_arrow_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /assets/icons/ic_arrow_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/core/constants/app_contants.dart: -------------------------------------------------------------------------------- 1 | class AppConstants { 2 | // common field 3 | static const double commonFieldHeight = 10; 4 | static const double commonFieldWidth = 80; 5 | 6 | // search box 7 | static const double commonSearchBoxHeight = 5; 8 | static const double commonSearchBoxWidth = 80; 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /assets/icons/ic_back_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/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 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | FirebaseCorePluginCApiRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 14 | } 15 | -------------------------------------------------------------------------------- /lib/core/constants/app_routes.dart: -------------------------------------------------------------------------------- 1 | class AppRoutes { 2 | static const String boarding = '/boarding'; 3 | static const String logIn = '/logIn'; 4 | static const String signUp = '/signUp'; 5 | static const String home = '/home'; 6 | static const String profile = '/profile'; 7 | static const String category = '/category'; 8 | static const String base = '/base'; 9 | static const String notification = '/notification'; 10 | } 11 | -------------------------------------------------------------------------------- /assets/icons/ic_send.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/icons/ic_facebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/icons/ic_cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/core/extensions/sizer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | extension BuildContextEntension on BuildContext { 4 | // size 5 | double get width => MediaQuery.of(this).size.width; 6 | 7 | double get height => MediaQuery.of(this).size.height; 8 | 9 | Size get size => MediaQuery.of(this).size; 10 | 11 | double heightOfScreen(double value) => 12 | (MediaQuery.of(this).size.height * value) / 100; 13 | 14 | double widthOfScreen(double value) => 15 | (MediaQuery.of(this).size.width * value) / 100; 16 | } 17 | -------------------------------------------------------------------------------- /lib/entities/peer.dart: -------------------------------------------------------------------------------- 1 | import 'package:send_post_app/entities/person.dart'; 2 | 3 | class Peer extends Person { 4 | final bool? isLikedByMe; 5 | final bool? isFollowedByMe; 6 | 7 | Peer({ 8 | super.name, 9 | super.uID, 10 | super.userName, 11 | super.email, 12 | super.followerCount, 13 | super.followingCount, 14 | super.likes, 15 | super.interestedInTopics, 16 | super.posts, 17 | super.avatarUrl, 18 | super.isBanned, 19 | this.isLikedByMe, 20 | this.isFollowedByMe, 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/loading_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class LoadingWidget extends StatelessWidget { 5 | const LoadingWidget({ 6 | super.key, 7 | }); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | color: Colors.red, 13 | height: Get.height, 14 | width: Get.width, 15 | child: const Center( 16 | child: CircularProgressIndicator(), 17 | ), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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/modules/category/infra/datasources/category_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/configs/getX/base_controller.dart'; 3 | 4 | class CategoryController extends BaseController { 5 | TextEditingController searchTextController = TextEditingController(); 6 | 7 | @override 8 | void dispose() { 9 | searchTextController.dispose(); 10 | super.dispose(); 11 | } 12 | 13 | @override 14 | void onInit() { 15 | builderId = 'categoryScreen'; 16 | super.onInit(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /assets/icons/ic_log_out.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/core/extensions/date.dart: -------------------------------------------------------------------------------- 1 | extension CalculateShareTimeX on DateTime { 2 | String calculate() { 3 | DateTime now = DateTime.now(); 4 | int dayDifference = now.day - day; 5 | int hourDifference = now.hour - hour; 6 | int minuteDifference = now.minute - minute; 7 | if (dayDifference > 0) return '${dayDifference.toString()} days ago'; 8 | if (hourDifference > 0) return '${hourDifference.toString()} hours ago'; 9 | if (minuteDifference > 0) 10 | return '${minuteDifference.toString()} minutes ago'; 11 | return 'null'; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/core/configs/getX/base_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class BaseController extends GetxController { 4 | String? builderId; 5 | String? errorMessage; 6 | bool isLoading = false; 7 | bool isError = false; 8 | 9 | void updateState({ 10 | String? builderId, 11 | String? errorMessage = '', 12 | bool isLoading = false, 13 | bool isError = false, 14 | }) { 15 | this.errorMessage = errorMessage; 16 | this.isLoading = isLoading; 17 | this.isError = isError; 18 | update([builderId ?? this.builderId!]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/modules/notification/presenter/widgets/title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/theme.dart'; 3 | 4 | class NotificationScreenTitle extends StatelessWidget { 5 | const NotificationScreenTitle({ 6 | super.key, 7 | required this.title, 8 | }); 9 | 10 | final String title; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Text( 15 | title, 16 | style: context.titleLarge?.copyWith( 17 | fontWeight: FontWeight.bold, 18 | ), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/post/post_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../../../core/constants/app_images.dart'; 4 | 5 | class PostImage extends StatelessWidget { 6 | const PostImage({ 7 | super.key, 8 | this.postImagePath, 9 | }); 10 | 11 | final String? postImagePath; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return SizedBox( 16 | width: double.infinity, 17 | child: Image.asset( 18 | postImagePath ?? AppImages.dummyPostImage, 19 | fit: BoxFit.cover, 20 | )); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/modules/notification/presenter/widgets/card_avatar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../../core/constants/app_images.dart'; 4 | import '../../../../models/avatar_model.dart'; 5 | 6 | class NotificationCardAvatar extends StatelessWidget { 7 | const NotificationCardAvatar({ 8 | super.key, 9 | this.url, 10 | }); 11 | 12 | final String? url; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | children: [ 18 | AvatarModel( 19 | url: url ?? AppImages.dummyAvatar2, 20 | ), 21 | ], 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/models/avatar_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../core/constants/app_images.dart'; 4 | 5 | class AvatarModel extends StatelessWidget { 6 | const AvatarModel({ 7 | super.key, 8 | this.url, 9 | this.radius, 10 | }); 11 | 12 | final String? url; 13 | final double? radius; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return CircleAvatar( 18 | foregroundImage: AssetImage( 19 | //post.owner?.avatarUrl ?? AppImages.dummyAvatar, 20 | url ?? AppImages.dummyAvatar, 21 | ), 22 | radius: radius ?? 20, 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /assets/icons/ic_show.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /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/models/settings_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | import 'package:send_post_app/core/extensions/sizer.dart'; 4 | 5 | import '../core/constants/app_icons.dart'; 6 | 7 | class SettingsIcon extends StatelessWidget { 8 | const SettingsIcon({ 9 | super.key, 10 | this.onTap, 11 | }); 12 | 13 | final void Function()? onTap; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return GestureDetector( 18 | onTap: onTap ?? () {}, 19 | child: SvgPicture.asset( 20 | AppIcons.settings, 21 | height: context.widthOfScreen(7), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /assets/icons/ic_home.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /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 = send_post_app 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.sendPostApp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /assets/icons/ic_facebook_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /assets/icons/ic_delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /lib/core/extensions/platform.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | extension PlatformExtension on BuildContext { 4 | // platforms 5 | bool get isMobile => MediaQuery.of(this).size.width <= 500.0; 6 | 7 | bool get isTablet => 8 | MediaQuery.of(this).size.width < 1024.0 && 9 | MediaQuery.of(this).size.width >= 650.0; 10 | 11 | bool get isSmallTablet => 12 | MediaQuery.of(this).size.width < 650.0 && 13 | MediaQuery.of(this).size.width > 500.0; 14 | 15 | bool get isDesktop => MediaQuery.of(this).size.width >= 1024.0; 16 | 17 | bool get isSmall => 18 | MediaQuery.of(this).size.width < 850.0 && 19 | MediaQuery.of(this).size.width >= 560.0; 20 | } 21 | -------------------------------------------------------------------------------- /lib/modules/base/infra/datasources/base_screen_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:send_post_app/core/configs/getX/base_controller.dart'; 3 | 4 | class BaseScreenController extends BaseController { 5 | PageController baseScreenPageController = PageController(); 6 | 7 | int activePageIndex = 0; 8 | 9 | Future changeScreen( 10 | int index, 11 | ) async { 12 | updateState(); 13 | activePageIndex = index; 14 | baseScreenPageController.jumpToPage( 15 | activePageIndex, 16 | ); 17 | updateState(); 18 | } 19 | 20 | @override 21 | void onInit() { 22 | builderId = 'baseScreen'; 23 | super.onInit(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /assets/icons/ic_search.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import cloud_firestore 9 | import firebase_auth 10 | import firebase_core 11 | import path_provider_foundation 12 | 13 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 14 | FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) 15 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) 16 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 17 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 18 | } 19 | -------------------------------------------------------------------------------- /assets/icons/ic_edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /assets/icons/ic_profile.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /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/modules/notification/presenter/widgets/header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/modules/notification/presenter/widgets/title.dart'; 3 | 4 | import '../../../../models/settings_icon.dart'; 5 | 6 | class NotificationScreenHeader extends StatelessWidget { 7 | const NotificationScreenHeader({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Row( 14 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 15 | crossAxisAlignment: CrossAxisAlignment.end, 16 | children: [ 17 | // title 18 | const NotificationScreenTitle(title: 'Activity'), 19 | // settings icons 20 | SettingsIcon( 21 | onTap: () {}, 22 | ), 23 | ], 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/core/constants/theme/dark_theme/dark_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../base_theme/base_theme.dart'; 4 | 5 | class DarkTheme extends BaseTheme { 6 | final darkTheme = ThemeData( 7 | primaryColorLight: BaseTheme.primaryLight, 8 | colorScheme: const ColorScheme( 9 | brightness: Brightness.light, 10 | primary: BaseTheme.primaryLight, 11 | onPrimary: BaseTheme.primaryLight, 12 | secondary: BaseTheme.secondary, 13 | onSecondary: BaseTheme.secondary, 14 | error: BaseTheme.error, 15 | onError: BaseTheme.error, 16 | background: BaseTheme.background, 17 | onBackground: BaseTheme.background, 18 | surface: BaseTheme.primaryLight, 19 | onSurface: BaseTheme.primaryLight)); 20 | } 21 | -------------------------------------------------------------------------------- /assets/icons/ic_global.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 9 | 10 | 12 | 13 | -------------------------------------------------------------------------------- /assets/icons/ic_filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lib/modules/boarding/presenter/boarding_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../base_page/presenter/base_page.dart'; 4 | 5 | class BoardingScreen extends StatelessWidget { 6 | const BoardingScreen({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return BasePage( 11 | background: Image.asset( 12 | 'assets/images/background.png', 13 | fit: BoxFit.cover, 14 | ), 15 | child: Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | children: const [ 18 | Center( 19 | child: Text( 20 | 'Send Photo App', 21 | style: TextStyle(color: Colors.white), 22 | ), 23 | ) 24 | ], 25 | )); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/entities/person.dart: -------------------------------------------------------------------------------- 1 | import 'package:send_post_app/entities/post.dart'; 2 | 3 | class Person { 4 | final String? token; 5 | final String? uID; 6 | final String? name; 7 | final String? userName; 8 | final String? email; 9 | final String? avatarUrl; 10 | final int? followerCount; 11 | final int? followingCount; 12 | final int? likes; 13 | final List? interestedInTopics; 14 | final List? posts; 15 | final bool? isBanned; 16 | 17 | Person({ 18 | this.token = '', 19 | this.name = '', 20 | this.uID = '', 21 | this.userName = '', 22 | this.email = '', 23 | this.followerCount = 0, 24 | this.followingCount = 0, 25 | this.likes = 0, 26 | this.interestedInTopics = const [], 27 | this.posts = const [], 28 | this.avatarUrl = '', 29 | this.isBanned = false, 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /lib/models/highlighted_action_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/theme.dart'; 3 | 4 | class HighlightedActionText extends StatelessWidget { 5 | final String text; 6 | final void Function()? onTap; 7 | final double? fontSize; 8 | 9 | const HighlightedActionText({ 10 | super.key, 11 | required this.text, 12 | this.onTap, 13 | this.fontSize = 16.0, 14 | }); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return InkWell( 19 | onTap: onTap ?? () {}, 20 | child: Text( 21 | text, 22 | style: context.bodyMedium?.copyWith( 23 | color: context.primaryColorDark, 24 | fontWeight: FontWeight.bold, 25 | letterSpacing: 2, 26 | fontSize: fontSize, 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /assets/icons/ic_hide.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/home_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | 4 | import '../../../../core/constants/app_icons.dart'; 5 | import '../../../../models/custom_search_box.dart'; 6 | import '../../infra/datasources/user_controller.dart'; 7 | 8 | class HomeHeader extends StatelessWidget { 9 | const HomeHeader({ 10 | super.key, 11 | required this.controller, 12 | }); 13 | 14 | final UserController controller; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Row( 19 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 20 | children: [ 21 | CommonSearchBox( 22 | controller: controller.searchBoxController, 23 | hint: 'Search', 24 | ), 25 | SvgPicture.asset(AppIcons.send), 26 | ], 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_core 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/icons/ic_gallery.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /lib/core/utils/error/firebase_error_handler.dart: -------------------------------------------------------------------------------- 1 | import 'package:send_post_app/core/utils/snack_bar/show_custom_snack_bar.dart'; 2 | 3 | class FirebaseErrorHandler { 4 | static void handleAuthError(String? error) { 5 | switch (error) { 6 | case 'user-not-found': 7 | showCustomSnackBar(message: 'User not found!', isError: true); 8 | break; 9 | case 'wrong-password': 10 | showCustomSnackBar(message: 'Wrong password!', isError: true); 11 | break; 12 | case 'weak-password': 13 | showCustomSnackBar(message: 'Password is weak!', isError: true); 14 | break; 15 | case 'email-already-in-use': 16 | showCustomSnackBar( 17 | message: 'This email is already in use!', isError: true); 18 | break; 19 | default: 20 | showCustomSnackBar( 21 | message: 'Email or password is not true!', isError: true); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: send_post_app 2 | description: Send Post App 3 | 4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 5 | 6 | version: 1.0.0+1 7 | 8 | environment: 9 | sdk: '>=2.19.6 <3.0.0' 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | cupertino_icons: ^1.0.2 16 | flutter_svg: ^2.0.5 17 | get: ^4.6.5 18 | hive: ^2.2.3 19 | hive_generator: ^2.0.0 20 | hive_flutter: ^1.1.0 21 | cloud_firestore: ^4.8.4 22 | firebase_auth: ^4.7.2 23 | firebase_core: ^2.15.0 24 | form_builder_validators: ^8.6.1 25 | 26 | dev_dependencies: 27 | flutter_test: 28 | sdk: flutter 29 | flutter_lints: ^2.0.0 30 | flutter: 31 | uses-material-design: true 32 | 33 | assets: 34 | - assets/animations/ 35 | - assets/fonts/ 36 | - assets/icons/ 37 | - assets/images/ 38 | - assets/statics/ 39 | 40 | fonts: 41 | - family: Montserrat 42 | fonts: 43 | - asset: assets/fonts/Montserrat-Regular.ttf 44 | -------------------------------------------------------------------------------- /assets/icons/ic_send_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 12 | -------------------------------------------------------------------------------- /assets/icons/ic_notification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /assets/icons/ic_heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /lib/modules/category/infra/models/category_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/theme.dart'; 3 | 4 | import '../../../../models/highlighted_action_text.dart'; 5 | 6 | class CategoryHeader extends StatelessWidget { 7 | const CategoryHeader({ 8 | super.key, 9 | required this.title, 10 | required this.seeMore, 11 | }); 12 | 13 | final String title; 14 | final void Function() seeMore; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Row( 19 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 20 | crossAxisAlignment: CrossAxisAlignment.end, 21 | children: [ 22 | Text( 23 | title, 24 | style: context.titleMedium?.copyWith( 25 | fontWeight: FontWeight.bold, 26 | ), 27 | ), 28 | HighlightedActionText( 29 | text: 'View More', 30 | fontSize: 12.0, 31 | onTap: seeMore, 32 | ), 33 | ], 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/modules/splash/presenter/widgets/splash_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:send_post_app/core/extensions/theme.dart'; 4 | import 'package:send_post_app/modules/splash/infra/datasources/splash_screen_controller.dart'; 5 | 6 | class SplashText extends GetWidget { 7 | const SplashText({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return GetBuilder( 14 | id: 'splashScreen', 15 | builder: (controller) { 16 | return AnimatedOpacity( 17 | duration: 1000.milliseconds, 18 | opacity: controller.isScreenLoaded ? 1.0 : 0.0, 19 | child: Text( 20 | controller.title, 21 | style: context.titleMedium?.copyWith( 22 | color: context.secondary, 23 | fontWeight: FontWeight.bold, 24 | ), 25 | ), 26 | ); 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /assets/icons/ic_category_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "send_post_app", 3 | "short_name": "send_post_app", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "Send Post App", 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /assets/icons/ic_add_circle.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 9 | 11 | 13 | 14 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /lib/modules/splash/infra/models/centered_image_design.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/sizer.dart'; 3 | 4 | import '../../../../core/constants/app_images.dart'; 5 | import '../../presenter/widgets/splash_square_image.dart'; 6 | 7 | class CenteredImagesDesign extends StatelessWidget { 8 | const CenteredImagesDesign({ 9 | super.key, 10 | }); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return SizedBox( 15 | width: context.widthOfScreen(50.0), 16 | child: GridView( 17 | shrinkWrap: true, 18 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 19 | crossAxisSpacing: 2.0, 20 | mainAxisSpacing: 2.0, 21 | crossAxisCount: 2, 22 | ), 23 | children: const [ 24 | SplashSquareImage(image: AppImages.dummyPhoto), 25 | SplashSquareImage(image: AppImages.dummyPhoto2), 26 | SplashSquareImage(image: AppImages.dummyPhoto3), 27 | SplashSquareImage(image: AppImages.dummyPhoto), 28 | ], 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/entities/post.dart: -------------------------------------------------------------------------------- 1 | import 'package:send_post_app/entities/person.dart'; 2 | 3 | class Post { 4 | final int? id; 5 | final int? ownerId; 6 | final String? type; 7 | final String? title; 8 | final String? body; 9 | final List? images; 10 | final Person? owner; 11 | final int? seenCount; 12 | final int? likeCount; 13 | final int? commentCount; 14 | final bool? isLikedByMe; 15 | final bool? isCommentedByMe; 16 | final bool? isSeenByMe; 17 | final List? commentedByPeers; 18 | final List? likedByPeers; 19 | final DateTime? shareTime; 20 | final bool? isPopular; 21 | final bool? isTrending; 22 | final bool? isFollowed; 23 | 24 | Post({ 25 | this.title, 26 | this.ownerId, 27 | this.type, 28 | this.body, 29 | this.images, 30 | this.seenCount, 31 | this.likeCount, 32 | this.commentCount, 33 | this.isLikedByMe, 34 | this.isCommentedByMe, 35 | this.commentedByPeers, 36 | this.likedByPeers, 37 | this.id, 38 | this.shareTime, 39 | this.isSeenByMe, 40 | this.owner, 41 | this.isPopular, 42 | this.isTrending, 43 | this.isFollowed, 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /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:send_post_app/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 | -------------------------------------------------------------------------------- /lib/core/utils/snack_bar/show_custom_snack_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | void showCustomSnackBar({ 5 | String? title = '', 6 | String? message = '', 7 | bool? isError = false, 8 | Duration? duration, 9 | }) { 10 | final context = Get.context; 11 | Get.showSnackbar( 12 | GetSnackBar( 13 | title: title, 14 | duration: duration ?? 3.seconds, 15 | backgroundColor: Colors.transparent, 16 | padding: EdgeInsets.zero, 17 | messageText: Container( 18 | padding: const EdgeInsets.symmetric(horizontal: 40), 19 | height: (context?.size?.height ?? 0) / 16.0, 20 | decoration: BoxDecoration( 21 | color: (isError ?? false) 22 | ? ThemeData.light().colorScheme.error 23 | : ThemeData.light().primaryColorLight, 24 | ), 25 | child: Align( 26 | alignment: Alignment.centerLeft, 27 | child: Text( 28 | message!, 29 | style: const TextStyle( 30 | fontSize: 16, 31 | color: Colors.white, 32 | ), 33 | ), 34 | ), 35 | ), 36 | ), 37 | ); 38 | } 39 | -------------------------------------------------------------------------------- /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/core/configs/getX/init_controllers.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:send_post_app/core/configs/getX/base_controller.dart'; 3 | import 'package:send_post_app/modules/auth/auth_controller.dart'; 4 | import 'package:send_post_app/modules/base_page/infra/datasources/base_page_controller.dart'; 5 | import 'package:send_post_app/modules/category/infra/datasources/category_controller.dart'; 6 | import 'package:send_post_app/modules/home/infra/datasources/user_controller.dart'; 7 | import 'package:send_post_app/modules/splash/infra/datasources/splash_screen_controller.dart'; 8 | 9 | import '../../../modules/base/infra/datasources/base_screen_controller.dart'; 10 | 11 | class ControllerInitialiser { 12 | ControllerInitialiser._(); 13 | 14 | static void init() { 15 | Get.lazyPut(() => BaseScreenController(), fenix: true); 16 | Get.lazyPut(() => BasePageController(), fenix: true); 17 | Get.lazyPut(() => BaseController(), fenix: true); 18 | Get.lazyPut(() => SplashScreenController(), fenix: true); 19 | Get.lazyPut(() => AuthController(), fenix: true); 20 | Get.lazyPut(() => UserController(), fenix: true); 21 | Get.lazyPut(() => CategoryController(), fenix: true); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_core/firebase_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:send_post_app/core/configs/getX/init_controllers.dart'; 5 | import 'package:send_post_app/core/constants/theme/dark_theme/dark_theme.dart'; 6 | import 'package:send_post_app/core/constants/theme/light_theme/light_theme.dart'; 7 | 8 | import 'core/configs/cache/cache.dart'; 9 | import 'core/configs/getX/page_routes.dart'; 10 | import 'modules/splash/presenter/splash_screen.dart'; 11 | 12 | void main() async { 13 | Cache.init(); 14 | ControllerInitialiser.init(); 15 | WidgetsFlutterBinding.ensureInitialized(); 16 | await Firebase.initializeApp(); 17 | 18 | runApp(const MyApp()); 19 | } 20 | 21 | class MyApp extends StatelessWidget { 22 | const MyApp({super.key}); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return GetMaterialApp( 27 | debugShowCheckedModeBanner: false, 28 | getPages: pages, 29 | title: 'Send Photo App', 30 | theme: LightTheme().lightTheme, 31 | darkTheme: DarkTheme().darkTheme, 32 | home: const Scaffold( 33 | body: SplashScreen(), 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/tab_bar_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/modules/home/presenter/widgets/tab_category_model.dart'; 3 | 4 | import '../../infra/datasources/user_controller.dart'; 5 | 6 | class TabBarWidget extends StatelessWidget { 7 | const TabBarWidget({ 8 | super.key, 9 | required this.controller, 10 | }); 11 | 12 | final UserController controller; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return TabBar( 17 | padding: EdgeInsets.zero, 18 | controller: controller.tabController, 19 | indicatorColor: Colors.transparent, 20 | onTap: (index) => controller.selectedTabIndex.value = index, 21 | tabs: [ 22 | TabCategory( 23 | tabController: controller.tabController, 24 | text: 'Popular', 25 | index: 0, 26 | ), 27 | TabCategory( 28 | tabController: controller.tabController, 29 | text: 'Trending', 30 | index: 1, 31 | ), 32 | TabCategory( 33 | tabController: controller.tabController, 34 | text: 'Following', 35 | index: 2, 36 | ), 37 | ], 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /assets/icons/ic_upload.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /lib/modules/notification/presenter/widgets/info.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/space.dart'; 3 | import 'package:send_post_app/core/extensions/theme.dart'; 4 | 5 | class NotificationCardInfo extends StatelessWidget { 6 | const NotificationCardInfo({ 7 | super.key, 8 | this.userName, 9 | this.action, 10 | this.timeAgo, 11 | }); 12 | 13 | final String? userName; 14 | final String? action; 15 | final String? timeAgo; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | Text( 23 | userName ?? '', 24 | style: context.bodyMedium?.copyWith( 25 | fontWeight: FontWeight.bold, 26 | ), 27 | ), 28 | context.yyySmall, 29 | // Action 30 | Text( 31 | action ?? '', 32 | style: context.labelMedium?.copyWith(), 33 | ), 34 | context.yyySmall, 35 | 36 | Text( 37 | timeAgo ?? '', 38 | style: context.labelMedium?.copyWith( 39 | color: context.secondary, 40 | ), 41 | ), 42 | ], 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /assets/icons/ic_profile_filled.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 9 | 11 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/modules/profile/profile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/constants/app_images.dart'; 3 | import 'package:send_post_app/core/extensions/sizer.dart'; 4 | 5 | import '../base_page/presenter/base_page.dart'; 6 | 7 | class ProfileScreen extends StatelessWidget { 8 | const ProfileScreen({Key? key}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return BasePage( 13 | child: Stack( 14 | children: [ 15 | Positioned( 16 | top: -100, 17 | left: 0, 18 | right: 0, 19 | child: Container( 20 | height: context.heightOfScreen(40), 21 | width: context.widthOfScreen(150), 22 | decoration: const BoxDecoration( 23 | shape: BoxShape.circle, 24 | ), 25 | child: ClipRRect( 26 | borderRadius: const BorderRadius.only( 27 | bottomRight: Radius.circular(100), 28 | bottomLeft: Radius.circular(100), 29 | ), 30 | child: Image.asset( 31 | AppImages.background, 32 | fit: BoxFit.cover, 33 | ), 34 | ), 35 | ), 36 | ) 37 | ], 38 | )); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/core/constants/theme/light_theme/light_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/constants/theme/base_theme/base_theme.dart'; 3 | 4 | class LightTheme extends BaseTheme { 5 | final lightTheme = ThemeData( 6 | fontFamily: 'Montserrat', 7 | primaryColorLight: BaseTheme.primaryLight, 8 | primaryColorDark: BaseTheme.primaryDark, 9 | colorScheme: const ColorScheme( 10 | brightness: Brightness.light, 11 | primary: BaseTheme.primaryLight, 12 | onPrimary: BaseTheme.primaryLight, 13 | secondary: BaseTheme.secondary, 14 | onSecondary: BaseTheme.secondary, 15 | error: BaseTheme.error, 16 | onError: BaseTheme.error, 17 | background: BaseTheme.background, 18 | onBackground: BaseTheme.background, 19 | surface: BaseTheme.primaryLight, 20 | onSurface: BaseTheme.primaryLight), 21 | textTheme: const TextTheme( 22 | titleSmall: BaseTheme.titleSmall, 23 | titleMedium: BaseTheme.titleMedium, 24 | titleLarge: BaseTheme.titleLarge, 25 | bodySmall: BaseTheme.bodySmall, 26 | bodyMedium: BaseTheme.bodyMedium, 27 | bodyLarge: BaseTheme.bodyLarge, 28 | labelSmall: BaseTheme.labelSmall, 29 | labelMedium: BaseTheme.labelMedium, 30 | labelLarge: BaseTheme.labelLarge, 31 | ), 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /ios/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 808447881417-9bmtkvnb0lr2t6q921bic6483djgvi8a.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.808447881417-9bmtkvnb0lr2t6q921bic6483djgvi8a 9 | ANDROID_CLIENT_ID 10 | 808447881417-1lg7kmvka41fj99ta43s6cr0msmtvsq1.apps.googleusercontent.com 11 | API_KEY 12 | AIzaSyA9IhoDj3JXGw9HpoHjGFRT602T15L-qjw 13 | GCM_SENDER_ID 14 | 808447881417 15 | PLIST_VERSION 16 | 1 17 | BUNDLE_ID 18 | com.sendPostApp 19 | PROJECT_ID 20 | send-post-app 21 | STORAGE_BUCKET 22 | send-post-app.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:808447881417:ios:22f2c608a8ecbcabea1d18 35 | 36 | -------------------------------------------------------------------------------- /lib/modules/splash/presenter/splash_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:send_post_app/core/constants/app_images.dart'; 4 | import 'package:send_post_app/core/extensions/space.dart'; 5 | import 'package:send_post_app/modules/splash/infra/datasources/splash_screen_controller.dart'; 6 | import 'package:send_post_app/modules/splash/presenter/widgets/splash_text.dart'; 7 | 8 | import '../../base_page/presenter/base_page.dart'; 9 | import '../infra/models/centered_image_design.dart'; 10 | 11 | class SplashScreen extends GetWidget { 12 | const SplashScreen({Key? key}) : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | controller.forwardSplashAnimation(); 17 | controller.redirect(); 18 | return BasePage( 19 | background: Image.asset( 20 | AppImages.lightBackground, 21 | fit: BoxFit.cover, 22 | ), 23 | child: Center( 24 | child: Column( 25 | mainAxisAlignment: MainAxisAlignment.center, 26 | children: [ 27 | // splash text 28 | const SplashText(), 29 | // space 30 | context.ySmall, 31 | // 4 centered boxes design 32 | const CenteredImagesDesign(), 33 | ], 34 | ), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 808447881417-9bmtkvnb0lr2t6q921bic6483djgvi8a.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.808447881417-9bmtkvnb0lr2t6q921bic6483djgvi8a 9 | ANDROID_CLIENT_ID 10 | 808447881417-1lg7kmvka41fj99ta43s6cr0msmtvsq1.apps.googleusercontent.com 11 | API_KEY 12 | AIzaSyA9IhoDj3JXGw9HpoHjGFRT602T15L-qjw 13 | GCM_SENDER_ID 14 | 808447881417 15 | PLIST_VERSION 16 | 1 17 | BUNDLE_ID 18 | com.sendPostApp 19 | PROJECT_ID 20 | send-post-app 21 | STORAGE_BUCKET 22 | send-post-app.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:808447881417:ios:22f2c608a8ecbcabea1d18 35 | 36 | -------------------------------------------------------------------------------- /lib/core/constants/app_images.dart: -------------------------------------------------------------------------------- 1 | class AppImages { 2 | static const main = "assets/images"; 3 | static const String background = '$main/background.png'; 4 | static const String lightBackground = '$main/light_background.png'; 5 | static const String headerBackground = '$main/header_background.png'; 6 | static const String rectangleBoxCover = '$main/rectangle_box_cover.png'; 7 | static const String dummyAvatar = '$main/dummy_avatar.png'; 8 | static const String dummyAvatar2 = '$main/dummy_avatar_2.png'; 9 | static const String dummyDesigner = '$main/dummy_designer_photo.png'; 10 | static const String dummyIllustrator = '$main/dummy_illustrator_photo.png'; 11 | static const String dummyMakingVideo = '$main/dummy_making_video_photo.png'; 12 | static const String dummyPhoto = '$main/dummy_photo.png'; 13 | static const String dummyPhoto2 = '$main/dummy_photo_2.png'; 14 | static const String dummyPhoto3 = '$main/dummy_photo_3.png'; 15 | static const String dummyPhotographer = '$main/dummy_photographer_photo.png'; 16 | static const String dummyPhotographer2 = 17 | '$main/dummy_photographer_photo_2.png'; 18 | static const String dummyPostImage = '$main/dummy_post_image.png'; 19 | static const String dummyPostImage2 = '$main/dummy_post_image_2.png'; 20 | static const String dummyUiDesign = '$main/dummy_ui_design_photo.png'; 21 | static const String dummyVideoCreator = '$main/dummy_video_creator_photo.png'; 22 | } 23 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/post/post_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:send_post_app/core/extensions/date.dart'; 4 | import 'package:send_post_app/core/extensions/space.dart'; 5 | import 'package:send_post_app/core/extensions/theme.dart'; 6 | 7 | import '../../../../../entities/post.dart'; 8 | import '../../../../../models/avatar_model.dart'; 9 | 10 | class PostHeader extends StatelessWidget { 11 | const PostHeader({ 12 | super.key, 13 | required this.post, 14 | }); 15 | 16 | final Post post; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Row( 21 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 22 | children: [ 23 | // Avatar of post 24 | Row( 25 | children: [ 26 | AvatarModel(url: post.owner?.avatarUrl), 27 | context.xSmall, 28 | Text( 29 | post.owner?.userName ?? 'Anonymous User', 30 | style: context.textTheme.titleSmall?.copyWith( 31 | fontWeight: FontWeight.bold, 32 | ), 33 | ), 34 | ], 35 | ), 36 | // time text 37 | Text( 38 | post.shareTime?.calculate() ?? '', 39 | style: context.labelMedium?.copyWith( 40 | color: Colors.grey, 41 | ), 42 | ) 43 | ], 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/core/extensions/space.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | extension SpaceExtendion on BuildContext { 4 | // Space | Width 5 | SizedBox get xxSmall => SizedBox( 6 | width: MediaQuery.of(this).size.width * 0.02, 7 | ); 8 | 9 | SizedBox get xSmall => SizedBox( 10 | width: MediaQuery.of(this).size.width * 0.04, 11 | ); 12 | 13 | SizedBox get xMedium => SizedBox( 14 | width: MediaQuery.of(this).size.width * 0.08, 15 | ); 16 | 17 | SizedBox get xLarge => SizedBox( 18 | width: MediaQuery.of(this).size.width * 0.12, 19 | ); 20 | 21 | SizedBox get xHuge => SizedBox( 22 | width: MediaQuery.of(this).size.width * 0.16, 23 | ); 24 | 25 | // Space | Height 26 | SizedBox get yyySmall => SizedBox( 27 | height: MediaQuery.of(this).size.height * 0.01, 28 | ); 29 | 30 | SizedBox get yySmall => SizedBox( 31 | height: MediaQuery.of(this).size.height * 0.02, 32 | ); 33 | 34 | SizedBox get ySmall => SizedBox( 35 | height: MediaQuery.of(this).size.height * 0.04, 36 | ); 37 | 38 | SizedBox get yMedium => SizedBox( 39 | height: MediaQuery.of(this).size.height * 0.08, 40 | ); 41 | 42 | SizedBox get yLarge => SizedBox( 43 | height: MediaQuery.of(this).size.height * 0.12, 44 | ); 45 | 46 | SizedBox get yHuge => SizedBox( 47 | height: MediaQuery.of(this).size.height * 0.16, 48 | ); 49 | } 50 | -------------------------------------------------------------------------------- /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"send_post_app", 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 | -------------------------------------------------------------------------------- /assets/icons/ic_home_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 12 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.14' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /lib/entities/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:send_post_app/entities/notification.dart'; 3 | import 'package:send_post_app/entities/person.dart'; 4 | 5 | class User extends Person { 6 | final List? notifications; 7 | 8 | User({ 9 | super.name, 10 | super.uID, 11 | super.userName, 12 | super.email, 13 | super.followerCount, 14 | super.followingCount, 15 | super.likes, 16 | super.interestedInTopics, 17 | super.posts, 18 | super.avatarUrl, 19 | super.isBanned, 20 | this.notifications, 21 | }); 22 | 23 | factory User.fromFirestore( 24 | DocumentSnapshot> snapshot, 25 | ) { 26 | final data = snapshot.data(); 27 | return User( 28 | name: data?['name'], 29 | uID: data?['uID'], 30 | userName: data?['userName'], 31 | email: data?['email'], 32 | followerCount: data?['followerCount'], 33 | followingCount: data?['followingCount'], 34 | likes: data?['likes'], 35 | interestedInTopics: data?['interestedInTopics'] is Iterable 36 | ? List.from(data?['interestedInTopics']) 37 | : null, 38 | posts: data?['posts'] is Iterable ? List.from(data?['posts']) : null, 39 | avatarUrl: data?['avatarUrl'], 40 | isBanned: data?['isBanned'], 41 | notifications: data?['notifications'] is Iterable 42 | ? List.from(data?['notifications']) 43 | : null, 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/tab_category_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:send_post_app/core/extensions/sizer.dart'; 4 | import 'package:send_post_app/core/extensions/theme.dart'; 5 | 6 | import '../../infra/datasources/user_controller.dart'; 7 | 8 | class TabCategory extends GetWidget { 9 | const TabCategory({ 10 | super.key, 11 | required this.index, 12 | required this.text, 13 | required this.tabController, 14 | }); 15 | 16 | final int index; 17 | final String text; 18 | final TabController tabController; 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Tab( 23 | child: Obx( 24 | () => Container( 25 | height: context.heightOfScreen(5), 26 | width: context.widthOfScreen(30), 27 | decoration: BoxDecoration( 28 | color: controller.selectedTabIndex == index 29 | ? context.primaryColorLight.withOpacity(0.1) 30 | : Colors.transparent, 31 | borderRadius: BorderRadius.all( 32 | Radius.circular( 33 | context.radiusLarge, 34 | ), 35 | ), 36 | ), 37 | child: Center( 38 | child: Text( 39 | text, 40 | style: controller.selectedTabIndex == index 41 | ? context.selectedTabText 42 | : context.unSelectedTabText, 43 | )), 44 | ), 45 | )); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "808447881417", 4 | "project_id": "send-post-app", 5 | "storage_bucket": "send-post-app.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:808447881417:android:03a79eb59c519533ea1d18", 11 | "android_client_info": { 12 | "package_name": "com.send_post_app" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "808447881417-1lg7kmvka41fj99ta43s6cr0msmtvsq1.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.send_post_app", 21 | "certificate_hash": "3b0955c08dd222db4182eabd33b5409ddf2d555f" 22 | } 23 | }, 24 | { 25 | "client_id": "808447881417-ps0dtutsc7fmd3rq0206ee00r8rl0n0m.apps.googleusercontent.com", 26 | "client_type": 3 27 | } 28 | ], 29 | "api_key": [ 30 | { 31 | "current_key": "AIzaSyA7nCDOyudvu40aIM9Y8CBVXeGzxTqvL-E" 32 | } 33 | ], 34 | "services": { 35 | "appinvite_service": { 36 | "other_platform_oauth_client": [ 37 | { 38 | "client_id": "808447881417-ps0dtutsc7fmd3rq0206ee00r8rl0n0m.apps.googleusercontent.com", 39 | "client_type": 3 40 | } 41 | ] 42 | } 43 | } 44 | } 45 | ], 46 | "configuration_version": "1" 47 | } -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /lib/modules/splash/presenter/widgets/splash_square_image.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:send_post_app/core/extensions/sizer.dart'; 6 | import 'package:send_post_app/core/extensions/theme.dart'; 7 | import 'package:send_post_app/modules/splash/infra/datasources/splash_screen_controller.dart'; 8 | 9 | class SplashSquareImage extends GetWidget { 10 | final String image; 11 | 12 | const SplashSquareImage({ 13 | super.key, 14 | required this.image, 15 | }); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return GetBuilder( 20 | id: 'splashScreen', 21 | builder: (controller) { 22 | return AnimatedOpacity( 23 | duration: Random().nextInt(2000).milliseconds, 24 | opacity: controller.isScreenLoaded ? 1.0 : 0.0, 25 | child: AspectRatio( 26 | aspectRatio: 1, 27 | child: SizedBox( 28 | height: context.heightOfScreen(15.0), 29 | child: ClipRRect( 30 | borderRadius: BorderRadius.all( 31 | Radius.circular(context.radiusMedium), 32 | ), 33 | child: Image.asset( 34 | image, 35 | fit: BoxFit.cover, 36 | ), 37 | ), 38 | ), 39 | ), 40 | ); 41 | }); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /assets/icons/ic_camera.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 11 | -------------------------------------------------------------------------------- /lib/modules/splash/infra/datasources/splash_screen_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:send_post_app/core/configs/cache/cache.dart'; 3 | import 'package:send_post_app/core/configs/getX/base_controller.dart'; 4 | import 'package:send_post_app/core/constants/app_routes.dart'; 5 | import 'package:send_post_app/modules/home/infra/datasources/user_controller.dart'; 6 | 7 | class SplashScreenController extends BaseController { 8 | bool isScreenLoaded = false; 9 | String title = 'Send Post App'; 10 | final _userController = Get.find(); 11 | 12 | Future forwardSplashAnimation() async { 13 | Future.delayed(10.milliseconds, () { 14 | updateState(); 15 | isScreenLoaded = true; 16 | updateState(); 17 | }); 18 | } 19 | 20 | Future redirect() async { 21 | Future.delayed(2000.milliseconds, () async { 22 | updateState(); 23 | final _token = Cache.getToken(); 24 | print('TOKEN=> $_token'); 25 | if (_token == null || _token == '') { 26 | Get.offAndToNamed(AppRoutes.logIn); 27 | updateState(); 28 | return; 29 | } else { 30 | final uID = Cache.getUID(); 31 | _userController.fetchData(uID).then( 32 | (value) => 33 | Get.offAndToNamed(AppRoutes.base), 34 | ); 35 | updateState(); 36 | return; 37 | } 38 | }); 39 | } 40 | 41 | @override 42 | void onInit() { 43 | builderId = 'splashScreen'; 44 | super.onInit(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /assets/icons/ic_notification_filled.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 9 | 11 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /assets/icons/ic_settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/core/configs/cache/cache.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive_flutter/hive_flutter.dart'; 2 | 3 | //@sendpostapp developer [Batuhan Ozkan] 4 | //This class is initialise the cache. I've used the Hive as cache. 5 | 6 | //The token will be returned 'null' if user logged in first time. 7 | // Route to => boarding screen 8 | 9 | //The token will be returned empty string '' if user logged in before but not signed in. 10 | // Route to => log in screen 11 | 12 | //The token will be returned random string if user logged in. 13 | // Route to => home screen 14 | 15 | class Cache { 16 | Cache._(); 17 | 18 | static Box? _box; 19 | static String? _token; 20 | static String? _uID; 21 | 22 | Box? get box => _box; 23 | 24 | String? get token => _token; 25 | 26 | String? get uID => _uID; 27 | 28 | static void init() async { 29 | await Hive.initFlutter(); 30 | _box = await Hive.openBox('App'); 31 | _token = getToken(); 32 | _uID = getUID(); 33 | } 34 | 35 | // Auth 36 | 37 | static String? getToken() { 38 | return _box?.get('token'); 39 | } 40 | 41 | static void setToken(String token) { 42 | _box?.put('token', token); 43 | } 44 | 45 | static Future? deleteToken() { 46 | return _box?.delete('token'); 47 | } 48 | 49 | static String? getUID() { 50 | return _box?.get('uID'); 51 | } 52 | 53 | static void setUID(String uID) { 54 | _box?.put('uID', uID); 55 | } 56 | 57 | static void updateLogInState({loggedIn = false}) { 58 | _box?.put('isLoggedIn', loggedIn); 59 | } 60 | 61 | static bool? isLoggedIn() { 62 | return _box?.get('isLoggedIn'); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/core/configs/getX/page_routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get_navigation/src/routes/get_route.dart'; 2 | import 'package:send_post_app/core/constants/app_routes.dart'; 3 | import 'package:send_post_app/modules/auth/sign_up/presenter/sign_up_screen.dart'; 4 | import 'package:send_post_app/modules/boarding/presenter/boarding_screen.dart'; 5 | import 'package:send_post_app/modules/home/presenter/home_screen.dart'; 6 | import 'package:send_post_app/modules/notification/presenter/notifications_screen.dart'; 7 | import 'package:send_post_app/modules/profile/profile_screen.dart'; 8 | 9 | import '../../../modules/auth/log_in/presenters/log_in_screen.dart'; 10 | import '../../../modules/base/presenter/base_screen.dart'; 11 | import '../../../modules/category/presenter/category_screen.dart'; 12 | 13 | List>? pages = [ 14 | GetPage( 15 | name: AppRoutes.base, 16 | page: () => const BaseScreen(), 17 | ), 18 | GetPage( 19 | name: AppRoutes.boarding, 20 | page: () => const BoardingScreen(), 21 | ), 22 | GetPage( 23 | name: AppRoutes.logIn, 24 | page: () => LogInScreen(), 25 | ), 26 | GetPage( 27 | name: AppRoutes.signUp, 28 | page: () => const SignUpScreen(), 29 | ), 30 | GetPage( 31 | name: AppRoutes.home, 32 | page: () => const HomeScreen(), 33 | ), 34 | GetPage( 35 | name: AppRoutes.profile, 36 | page: () => const ProfileScreen(), 37 | ), 38 | GetPage( 39 | name: AppRoutes.category, 40 | page: () => const CategoryScreen(), 41 | ), 42 | GetPage( 43 | name: AppRoutes.notification, 44 | page: () => const NotificationScreen(), 45 | ), 46 | ]; 47 | -------------------------------------------------------------------------------- /assets/icons/ic_chat.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 9 | 11 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/modules/base_page/presenter/base_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:send_post_app/modules/base_page/infra/datasources/base_page_controller.dart'; 4 | 5 | class BasePage extends GetWidget { 6 | final Widget child; 7 | final Widget? background; 8 | final EdgeInsetsGeometry? padding; 9 | final bool? resizeToAvoidBottomInset; 10 | final bool? hasFocusHandler; 11 | 12 | const BasePage({ 13 | Key? key, 14 | required this.child, 15 | this.padding, 16 | this.background, 17 | this.resizeToAvoidBottomInset = false, 18 | this.hasFocusHandler = false, 19 | }) : super(key: key); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | resizeToAvoidBottomInset: resizeToAvoidBottomInset, 25 | body: GestureDetector( 26 | onTap: () { 27 | if (hasFocusHandler!) { 28 | FocusManager.instance.primaryFocus?.unfocus(); 29 | } 30 | }, 31 | child: SizedBox( 32 | height: context.height, 33 | width: context.width, 34 | child: Stack( 35 | children: [ 36 | if (background != null) 37 | SizedBox( 38 | height: context.height, 39 | width: context.width, 40 | child: background!), 41 | // screen 42 | SafeArea( 43 | child: Padding( 44 | padding: padding ?? EdgeInsets.zero, 45 | child: child, 46 | ), 47 | ), 48 | ], 49 | ), 50 | ), 51 | ), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/modules/notification/presenter/notifications_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:send_post_app/core/extensions/space.dart'; 4 | import 'package:send_post_app/core/extensions/theme.dart'; 5 | import 'package:send_post_app/modules/base_page/presenter/base_page.dart'; 6 | import 'package:send_post_app/modules/notification/infra/datasources/notification_screen_controller.dart'; 7 | import 'package:send_post_app/modules/notification/presenter/widgets/header.dart'; 8 | 9 | import '../../../core/constants/app_images.dart'; 10 | import '../../../entities/peer.dart'; 11 | import '../infra/models/notification_card.dart'; 12 | 13 | class NotificationScreen extends GetWidget { 14 | const NotificationScreen({Key? key}) : super(key: key); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return BasePage( 19 | hasFocusHandler: true, 20 | padding: EdgeInsets.symmetric( 21 | horizontal: context.paddingHuge, 22 | ), 23 | child: Column( 24 | children: [ 25 | const NotificationScreenHeader(), 26 | context.ySmall, 27 | ListView.builder( 28 | itemCount: 5, 29 | shrinkWrap: true, 30 | itemBuilder: (context, index) { 31 | return Column( 32 | children: [ 33 | NotificationCardModel( 34 | peer: Peer( 35 | userName: 'Test test', 36 | avatarUrl: AppImages.dummyPhoto, 37 | ), 38 | ), 39 | context.yySmall, 40 | ], 41 | ); 42 | }), 43 | ], 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /assets/icons/ic_category.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 17 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 18 | - platform: android 19 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 20 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 21 | - platform: ios 22 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 23 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 24 | - platform: linux 25 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 26 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 27 | - platform: macos 28 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 29 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 30 | - platform: web 31 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 32 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 33 | - platform: windows 34 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 35 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /lib/models/custom_common_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/sizer.dart'; 3 | import 'package:send_post_app/core/extensions/theme.dart'; 4 | 5 | class CustomCommonButton extends StatelessWidget { 6 | final String text; 7 | final double? heightOfScreen; 8 | final double? widthOfScreen; 9 | final void Function() onTap; 10 | 11 | const CustomCommonButton({ 12 | super.key, 13 | required this.text, 14 | required this.onTap, 15 | this.heightOfScreen = 5, 16 | this.widthOfScreen = 80, 17 | }); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return DecoratedBox( 22 | decoration: BoxDecoration( 23 | gradient: LinearGradient(colors: [ 24 | context.primaryColorDark, 25 | context.primaryColorLight, 26 | ]), 27 | borderRadius: BorderRadius.all( 28 | Radius.circular(context.radiusButton), 29 | ), 30 | ), 31 | child: ElevatedButton( 32 | style: ElevatedButton.styleFrom( 33 | surfaceTintColor: Colors.transparent, 34 | fixedSize: Size( 35 | context.widthOfScreen(widthOfScreen!), 36 | context.heightOfScreen(heightOfScreen!), 37 | ), 38 | backgroundColor: Colors.transparent, 39 | disabledForegroundColor: Colors.transparent, 40 | disabledBackgroundColor: Colors.transparent, 41 | shadowColor: Colors.transparent, 42 | foregroundColor: Colors.transparent, 43 | ), 44 | onPressed: onTap, 45 | child: Center( 46 | child: Text( 47 | text, 48 | style: context.bodyLarge?.copyWith( 49 | fontWeight: FontWeight.bold, 50 | color: context.secondary, 51 | ), 52 | )), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/modules/notification/infra/models/notification_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/sizer.dart'; 3 | import 'package:send_post_app/core/extensions/space.dart'; 4 | import 'package:send_post_app/core/extensions/theme.dart'; 5 | 6 | import '../../../../core/constants/app_images.dart'; 7 | import '../../../../entities/peer.dart'; 8 | import '../../presenter/widgets/card_avatar.dart'; 9 | import '../../presenter/widgets/info.dart'; 10 | 11 | class NotificationCardModel extends StatelessWidget { 12 | const NotificationCardModel({ 13 | super.key, 14 | this.peer, 15 | }); 16 | 17 | final Peer? peer; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Container( 22 | height: context.heightOfScreen(10), 23 | decoration: BoxDecoration( 24 | color: context.primaryColorLight.withOpacity(0.5), 25 | borderRadius: BorderRadius.all( 26 | Radius.circular( 27 | context.radiusHuge, 28 | ), 29 | ), 30 | ), 31 | child: Padding( 32 | padding: EdgeInsets.symmetric( 33 | vertical: context.paddingMedium, 34 | ), 35 | child: Row( 36 | children: [ 37 | context.xSmall, 38 | NotificationCardAvatar( 39 | url: peer?.avatarUrl, 40 | ), 41 | context.xSmall, 42 | NotificationCardInfo( 43 | userName: peer?.userName, 44 | action: 'liked your photo', 45 | timeAgo: '2 min ago', 46 | ), 47 | context.xHuge, 48 | SizedBox( 49 | height: context.heightOfScreen(6), 50 | child: Image.asset( 51 | AppImages.dummyPostImage, 52 | ), 53 | ) 54 | ], 55 | ), 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | Send Post App 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | send_post_app 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(FLUTTER_BUILD_NUMBER) 27 | LSRequiresIPhoneOS 28 | 29 | UIApplicationSupportsIndirectInputEvents 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIMainStoryboardFile 34 | Main 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | UIViewControllerBasedStatusBarAppearance 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /lib/core/constants/theme/base_theme/base_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BaseTheme { 4 | // base colors 5 | static const Color primaryLight = Color(0xFF888BF4); 6 | static const Color primaryDark = Color(0xFF5151C6); 7 | static const Color secondary = Color(0xFFFFFFFF); 8 | static const Color error = Color(0xFFFA6650); 9 | static const Color background = Color(0xFFF1F1FE); 10 | static const Color fieldBackgroundColor = Color(0xFFF3F5F7); 11 | 12 | // base text styles 13 | static const TextStyle titleSmall = TextStyle(fontSize: 16.0); 14 | static const TextStyle titleMedium = TextStyle(fontSize: 20.0); 15 | static const TextStyle titleLarge = TextStyle(fontSize: 24.0); 16 | 17 | static const TextStyle labelSmall = TextStyle(fontSize: 8.0); 18 | static const TextStyle labelMedium = TextStyle(fontSize: 12.0); 19 | static const TextStyle labelLarge = TextStyle(fontSize: 16.0); 20 | 21 | static const TextStyle bodySmall = TextStyle(fontSize: 12.0); 22 | static const TextStyle bodyMedium = TextStyle(fontSize: 16.0); 23 | static const TextStyle bodyLarge = TextStyle(fontSize: 20.0); 24 | 25 | static const TextStyle selectedTabText = TextStyle( 26 | color: primaryDark, 27 | fontWeight: FontWeight.bold, 28 | ); 29 | static const TextStyle unSelectedTabText = TextStyle( 30 | color: Colors.grey, 31 | fontWeight: FontWeight.bold, 32 | ); 33 | 34 | // base radius 35 | static const double radiusSmall = 4.0; 36 | static const double radiusMedium = 8.0; 37 | static const double radiusLarge = 12.0; 38 | static const double radiusHuge = 16.0; 39 | 40 | // special radius 41 | static const double radiusField = 40.0; 42 | static const double radiusButton = 40.0; 43 | static const double radiusSearchBox = 40.0; 44 | 45 | // base paddings 46 | static const double paddingSmall = 4.0; 47 | static const double paddingMedium = 8.0; 48 | static const double paddingLarge = 12.0; 49 | static const double paddingHuge = 16.0; 50 | } 51 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/post/post_bottom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | import 'package:send_post_app/core/extensions/space.dart'; 4 | import 'package:send_post_app/core/extensions/theme.dart'; 5 | 6 | import '../../../../../core/constants/app_icons.dart'; 7 | 8 | class PostBottom extends StatelessWidget { 9 | const PostBottom({ 10 | super.key, 11 | this.commentCount = 0, 12 | this.likeCount = 0, 13 | this.onTapCommentIcon, 14 | this.onTapLikeCount, 15 | this.onTapAddBookMarkIcon, 16 | }); 17 | 18 | final int? commentCount; 19 | final int? likeCount; 20 | final void Function()? onTapCommentIcon; 21 | final void Function()? onTapLikeCount; 22 | final void Function()? onTapAddBookMarkIcon; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Row( 27 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 28 | children: [ 29 | GestureDetector( 30 | onTap: onTapAddBookMarkIcon ?? () {}, 31 | child: SvgPicture.asset( 32 | AppIcons.addCircle, 33 | ), 34 | ), 35 | Row( 36 | children: [ 37 | Text( 38 | (commentCount!).toString(), 39 | style: context.labelMedium, 40 | ), 41 | context.xxSmall, 42 | GestureDetector( 43 | onTap: onTapCommentIcon ?? () {}, 44 | child: SvgPicture.asset( 45 | AppIcons.chat, 46 | ), 47 | ), 48 | context.xxSmall, 49 | Text( 50 | (likeCount!).toString(), 51 | style: context.labelMedium, 52 | ), 53 | context.xxSmall, 54 | GestureDetector( 55 | onTap: onTapLikeCount ?? () {}, 56 | child: SvgPicture.asset( 57 | AppIcons.heart, 58 | ), 59 | ), 60 | ], 61 | ) 62 | ], 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/models/custom_search_box.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/sizer.dart'; 3 | import 'package:send_post_app/core/extensions/theme.dart'; 4 | 5 | import '../core/constants/app_contants.dart'; 6 | 7 | class CommonSearchBox extends StatelessWidget { 8 | final TextEditingController controller; 9 | final String? hint; 10 | final Color? prefixColor; 11 | final Color? suffixColor; 12 | final Widget? prefix; 13 | final Widget? suffix; 14 | final void Function(String)? onChanged; 15 | 16 | const CommonSearchBox({ 17 | super.key, 18 | required this.controller, 19 | this.hint = '', 20 | this.prefixColor, 21 | this.suffixColor, 22 | this.prefix, 23 | this.suffix, 24 | this.onChanged, 25 | }); 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return TextFormField( 30 | controller: controller, 31 | decoration: InputDecoration( 32 | border: OutlineInputBorder( 33 | borderRadius: BorderRadius.circular(context.radiusSearchBox), 34 | borderSide: BorderSide( 35 | width: 0, 36 | style: BorderStyle.none, 37 | ), 38 | ), 39 | filled: true, 40 | fillColor: context.fieldBackgroundColor, 41 | hintText: hint, 42 | hintStyle: context.bodySmall?.copyWith( 43 | color: Colors.grey, 44 | ), 45 | suffixIconColor: suffixColor, 46 | prefix: prefix, 47 | prefixIconColor: prefixColor, 48 | suffixIcon: suffix, 49 | contentPadding: EdgeInsets.symmetric(horizontal: context.paddingHuge), 50 | isDense: false, 51 | constraints: BoxConstraints( 52 | maxHeight: context.heightOfScreen( 53 | AppConstants.commonSearchBoxHeight, 54 | ), 55 | maxWidth: context.widthOfScreen( 56 | AppConstants.commonSearchBoxWidth, 57 | ), 58 | ), 59 | ), 60 | style: context.bodyMedium, 61 | onChanged: onChanged, 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/modules/category/infra/models/discover_box_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/space.dart'; 3 | import 'package:send_post_app/core/extensions/theme.dart'; 4 | 5 | import '../../../../core/constants/app_images.dart'; 6 | 7 | class DiscoverBoxModel extends StatelessWidget { 8 | const DiscoverBoxModel({ 9 | super.key, 10 | this.imageUrl, 11 | this.text, 12 | this.height, 13 | this.width, 14 | }); 15 | 16 | final String? imageUrl; 17 | final String? text; 18 | final double? height; 19 | final double? width; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Row( 24 | children: [ 25 | Stack( 26 | alignment: Alignment.center, 27 | children: [ 28 | SizedBox( 29 | height: height, 30 | width: width, 31 | child: ClipRRect( 32 | borderRadius: BorderRadius.all( 33 | Radius.circular( 34 | context.radiusHuge, 35 | ), 36 | ), 37 | child: Image.asset( 38 | imageUrl ?? AppImages.dummyPostImage2, 39 | fit: BoxFit.cover, 40 | ), 41 | ), 42 | ), 43 | Container( 44 | height: height, 45 | width: width, 46 | decoration: BoxDecoration( 47 | color: Colors.black.withOpacity(0.4), 48 | borderRadius: BorderRadius.all( 49 | Radius.circular( 50 | context.radiusHuge, 51 | ), 52 | ), 53 | ), 54 | ), 55 | Text( 56 | text ?? '', 57 | style: context.bodyLarge?.copyWith( 58 | color: context.secondary, 59 | fontWeight: FontWeight.bold, 60 | ), 61 | ), 62 | ], 63 | ), 64 | context.xxSmall, 65 | ], 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | send_post_app 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /lib/modules/home/infra/datasources/user_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:send_post_app/core/configs/getX/base_controller.dart'; 5 | import 'package:send_post_app/core/utils/error/firebase_error_handler.dart'; 6 | import 'package:send_post_app/core/utils/snack_bar/show_custom_snack_bar.dart'; 7 | import 'package:send_post_app/entities/user.dart'; 8 | import 'package:send_post_app/modules/auth/auth_controller.dart'; 9 | 10 | class UserController extends BaseController 11 | with GetSingleTickerProviderStateMixin { 12 | late TabController tabController; 13 | final searchBoxController = TextEditingController(); 14 | User user = User(); 15 | final _authController = Get.find(); 16 | Map tabIndexes = { 17 | 'Popular': 0, 18 | 'Trending': 1, 19 | 'Following': 2, 20 | }; 21 | 22 | RxInt selectedTabIndex = 0.obs; 23 | 24 | Future fetchData(String? uID) async { 25 | updateState(isLoading: true); 26 | if (uID == null) { 27 | showCustomSnackBar(message: 'uID is null', isError: true); 28 | return; 29 | } 30 | try { 31 | final ref = _authController.firestoreIns?.collection('users').doc(uID); 32 | if (ref == null) { 33 | print('!!!!!!!! THE USER DOC REF IS NULL !!!!!!!!!!!!'); 34 | return; 35 | } 36 | ref.get().then((DocumentSnapshot> snapshot) { 37 | user = User.fromFirestore(snapshot); 38 | }); 39 | updateState(isLoading: false); 40 | } on FirebaseException catch (e) { 41 | FirebaseErrorHandler.handleAuthError(e.code); 42 | } catch (e) { 43 | print('Error while fetching user data'); 44 | } 45 | updateState(isLoading: false); 46 | } 47 | 48 | void updateIndex() { 49 | tabController.addListener(() { 50 | selectedTabIndex.value = tabController.index; 51 | }); 52 | } 53 | 54 | @override 55 | void onInit() { 56 | builderId = 'userController'; 57 | tabController = TabController(length: 3, vsync: this); 58 | super.onInit(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/core/constants/app_icons.dart: -------------------------------------------------------------------------------- 1 | class AppIcons { 2 | static const mainPath = "assets/icons"; 3 | static const String addCircle = '$mainPath/ic_add_circle.svg'; 4 | static const String arrowLeft = '$mainPath/ic_arrow_left.svg'; 5 | static const String arrowRight = '$mainPath/ic_arrow_right.svg'; 6 | static const String backArrow = '$mainPath/ic_back_arrow.svg'; 7 | static const String camera = '$mainPath/ic_camera.svg'; 8 | static const String cancel = '$mainPath/ic_cancel.svg'; 9 | static const String category = '$mainPath/ic_category.svg'; 10 | static const String categoryFilled = '$mainPath/ic_category_filled.svg'; 11 | static const String chat = '$mainPath/ic_chat.svg'; 12 | static const String delete = '$mainPath/ic_delete.svg'; 13 | static const String edit = '$mainPath/ic_edit.svg'; 14 | static const String facebook = '$mainPath/ic_facebook.svg'; 15 | static const String facebookFilled = '$mainPath/ic_facebook_filled.svg'; 16 | static const String filter = '$mainPath/ic_filter.svg'; 17 | static const String gallery = '$mainPath/ic_gallery.svg'; 18 | static const String global = '$mainPath/ic_global.svg'; 19 | static const String heart = '$mainPath/ic_heart.svg'; 20 | static const String hide = '$mainPath/ic_hide.svg'; 21 | static const String home = '$mainPath/ic_home.svg'; 22 | static const String homeFilled = '$mainPath/ic_home_filled.svg'; 23 | static const String instagram = '$mainPath/ic_instagram.svg'; 24 | static const String logOut = '$mainPath/ic_log_out.svg'; 25 | static const String notification = '$mainPath/ic_notification.svg'; 26 | static const String notificationFilled = 27 | '$mainPath/ic_notification_filled.svg'; 28 | static const String profile = '$mainPath/ic_profile.svg'; 29 | static const String profileFilled = '$mainPath/ic_profile_filled.svg'; 30 | static const String search = '$mainPath/ic_search.svg'; 31 | static const String send = '$mainPath/ic_send.svg'; 32 | static const String sendFilled = '$mainPath/ic_send_filled.svg'; 33 | static const String settings = '$mainPath/ic_settings.svg'; 34 | static const String show = '$mainPath/ic_show.svg'; 35 | static const String upload = '$mainPath/ic_upload.svg'; 36 | } 37 | -------------------------------------------------------------------------------- /lib/core/extensions/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/constants/theme/base_theme/base_theme.dart'; 3 | 4 | extension ThemeExtension on BuildContext { 5 | // colors 6 | Color get primaryColorDark => Theme.of(this).primaryColorDark; 7 | 8 | Color get primaryColorLight => Theme.of(this).primaryColorLight; 9 | 10 | Color get secondary => Theme.of(this).colorScheme.secondary; 11 | 12 | Color get cardColor => Theme.of(this).cardColor; 13 | 14 | Color get errorColor => Theme.of(this).colorScheme.error; 15 | 16 | Color get background => Theme.of(this).colorScheme.background; 17 | 18 | Color get fieldBackgroundColor => BaseTheme.fieldBackgroundColor; 19 | 20 | // text styles 21 | TextStyle? get titleSmall => Theme.of(this).textTheme.titleSmall; 22 | 23 | TextStyle? get titleMedium => Theme.of(this).textTheme.titleMedium; 24 | 25 | TextStyle? get titleLarge => Theme.of(this).textTheme.titleLarge; 26 | 27 | TextStyle? get labelSmall => Theme.of(this).textTheme.labelSmall; 28 | 29 | TextStyle? get labelMedium => Theme.of(this).textTheme.labelMedium; 30 | 31 | TextStyle? get labelLarge => Theme.of(this).textTheme.labelLarge; 32 | 33 | TextStyle? get bodySmall => Theme.of(this).textTheme.bodySmall; 34 | 35 | TextStyle? get bodyMedium => Theme.of(this).textTheme.bodyMedium; 36 | 37 | TextStyle? get bodyLarge => Theme.of(this).textTheme.bodyLarge; 38 | 39 | TextStyle? get selectedTabText => BaseTheme.selectedTabText; 40 | 41 | TextStyle? get unSelectedTabText => BaseTheme.unSelectedTabText; 42 | 43 | // radius 44 | 45 | double get radiusSmall => BaseTheme.radiusSmall; 46 | 47 | double get radiusMedium => BaseTheme.radiusMedium; 48 | 49 | double get radiusLarge => BaseTheme.radiusLarge; 50 | 51 | double get radiusHuge => BaseTheme.radiusHuge; 52 | 53 | double get radiusField => BaseTheme.radiusField; 54 | 55 | double get radiusButton => BaseTheme.radiusButton; 56 | 57 | double get radiusSearchBox => BaseTheme.radiusSearchBox; 58 | 59 | // paddings 60 | 61 | double get paddingSmall => BaseTheme.paddingSmall; 62 | 63 | double get paddingMedium => BaseTheme.paddingMedium; 64 | 65 | double get paddingLarge => BaseTheme.paddingLarge; 66 | 67 | double get paddingHuge => BaseTheme.paddingHuge; 68 | } 69 | -------------------------------------------------------------------------------- /lib/models/custom_input_form_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:form_builder_validators/form_builder_validators.dart'; 3 | import 'package:send_post_app/core/constants/app_contants.dart'; 4 | import 'package:send_post_app/core/extensions/sizer.dart'; 5 | import 'package:send_post_app/core/extensions/theme.dart'; 6 | 7 | class CustomInputFormField extends StatelessWidget { 8 | final String? hint; 9 | final Widget? suffix; 10 | final Color? suffixColor; 11 | final Widget? prefix; 12 | final Color? prefixColor; 13 | final TextAlign? textAlign; 14 | final TextInputType? textInputType; 15 | final bool? isPassword; 16 | final List? validators; 17 | final TextEditingController? controller; 18 | 19 | const CustomInputFormField({ 20 | super.key, 21 | this.hint, 22 | this.suffix, 23 | this.suffixColor, 24 | this.prefix, 25 | this.prefixColor, 26 | this.textAlign = TextAlign.start, 27 | this.textInputType, 28 | this.isPassword = false, 29 | this.validators, 30 | this.controller, 31 | }); 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return TextFormField( 36 | controller: controller, 37 | key: key, 38 | decoration: InputDecoration( 39 | border: OutlineInputBorder( 40 | borderRadius: BorderRadius.circular(context.radiusField), 41 | ), 42 | filled: true, 43 | fillColor: context.fieldBackgroundColor, 44 | hintText: hint, 45 | hintStyle: context.bodySmall?.copyWith( 46 | color: Colors.grey, 47 | ), 48 | suffixIconColor: suffixColor, 49 | prefix: prefix, 50 | prefixIconColor: prefixColor, 51 | suffixIcon: suffix, 52 | contentPadding: EdgeInsets.symmetric(horizontal: context.paddingHuge), 53 | isDense: false, 54 | constraints: BoxConstraints( 55 | maxHeight: context.heightOfScreen(AppConstants.commonFieldHeight), 56 | maxWidth: context.widthOfScreen(AppConstants.commonFieldWidth), 57 | ), 58 | ), 59 | style: context.bodyMedium, 60 | textAlign: textAlign!, 61 | keyboardType: textInputType, 62 | obscureText: isPassword!, 63 | validator: FormBuilderValidators.compose(validators ?? []), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.send_post_app" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/widgets/post/post.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:send_post_app/core/extensions/sizer.dart'; 3 | import 'package:send_post_app/core/extensions/theme.dart'; 4 | import 'package:send_post_app/modules/home/presenter/widgets/post/post_bottom.dart'; 5 | import 'package:send_post_app/modules/home/presenter/widgets/post/post_header.dart'; 6 | import 'package:send_post_app/modules/home/presenter/widgets/post/post_image.dart'; 7 | 8 | import '../../../../../core/constants/app_images.dart'; 9 | import '../../../../../entities/post.dart'; 10 | 11 | class PostCard extends StatelessWidget { 12 | const PostCard( 13 | {Key? key, 14 | required this.post, 15 | this.onTapComment, 16 | this.onTapLike, 17 | this.onTapAddBookMarkIcon}) 18 | : super(key: key); 19 | 20 | final Post post; 21 | final void Function()? onTapComment; 22 | final void Function()? onTapLike; 23 | final void Function()? onTapAddBookMarkIcon; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Container( 28 | height: context.heightOfScreen(42), 29 | decoration: _postCardDecoration(context), 30 | child: Column( 31 | children: [ 32 | Padding( 33 | padding: _postHeaderPadding(context), 34 | child: PostHeader( 35 | post: post, 36 | ), 37 | ), 38 | 39 | /// image 40 | PostImage( 41 | postImagePath: post.images?[0] ?? AppImages.dummyPostImage, 42 | ), 43 | Padding( 44 | padding: _postHeaderPadding(context), 45 | child: PostBottom( 46 | commentCount: 12, 47 | likeCount: 40, 48 | onTapAddBookMarkIcon: onTapAddBookMarkIcon, 49 | onTapCommentIcon: onTapComment, 50 | onTapLikeCount: onTapLike, 51 | ), 52 | ), 53 | ], 54 | ), 55 | ); 56 | } 57 | } 58 | 59 | EdgeInsets _postHeaderPadding(BuildContext context) { 60 | return EdgeInsets.symmetric( 61 | horizontal: context.paddingHuge, 62 | vertical: context.paddingHuge, 63 | ); 64 | } 65 | 66 | BoxDecoration _postCardDecoration(BuildContext context) { 67 | return BoxDecoration( 68 | color: context.secondary, 69 | borderRadius: BorderRadius.all( 70 | Radius.circular( 71 | context.radiusLarge, 72 | ), 73 | ), 74 | boxShadow: [ 75 | BoxShadow( 76 | color: Colors.grey.shade300, 77 | blurRadius: 6, 78 | ), 79 | ], 80 | ); 81 | } 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Send Post App 2 | 3 | I wanted to try my clean code performance. So, my first priority is writing clean code. But maybe I decide to develop this app later :) 4 | 5 | ## Color Reference 6 | 7 | | Color | Hex | 8 | | ------------------- | ------- | 9 | | Primary Light Color | #888BF4 | 10 | | Primary Dark Color | #5151C6 | 11 | | Secondary Color | #FFFFFF | 12 | 13 | ## Tech Stack 14 | 15 | **State Management:** GetX 16 | 17 | **Remote Database:** Firebase 18 | 19 | **Local Database:** Hive 20 | 21 | ## FAQ 22 | 23 | #### Is this app responsive? 24 | 25 | Exactly! I created my own responsive structure with extensions. I'm using width and height of screen in everywhere. 26 | 27 | #### Why Firebase? 28 | 29 | Because I have already experience on Rest Api. I also wanted to code and develop quickly alone. 30 | 31 | ## Development 32 | 33 | As I said, I want to write clean code! So, I am trying to implement and use what I learn from my seniors and from who I follow developers! 34 | 35 | #### What did I pay attention? 36 | 37 | I paid attention to 'not repeat myself'. I try to use extract methods and classes. Also application file structure was important. It should be clear, understandable and can be improved. 38 | 39 | I used the singleton in many code files. Because we do not want to create some classes more and more, right? 🤭 40 | 41 | I used the extensions. For example, for getting height and width value of screen. (I've decided that I did not need to do this. Because GetX was already doing this. But it's okay, It was fun for me 💪🏻) 42 | 43 | Long story short, I know that, I need to improve myself about clean code. But I'm trying my best! I'm sure, it will be better day by day. Let's review my codes! 🙂 44 | 45 | ## Feedback 46 | 47 | If you have any feedback, please send me message 🙏🏻 https://www.linkedin.com/in/batuhanozkan441/ 48 | 49 | ## Screenshots 50 | 51 |
  • 52 | Simulator Screenshot - iPhone 14 Pro Max - 2023-08-13 at 23 48 11 53 | Simulator Screenshot - iPhone 14 Pro Max - 2023-08-14 at 00 28 28 54 |
  • 55 |
  • 56 | simulator_screenshot_832E6218-917B-40BC-903E-3FE5895DA63A 57 | simulator_screenshot_1D1AE419-D1DF-4DF5-B362-CB81F13F7542 58 |
  • 59 | -------------------------------------------------------------------------------- /assets/icons/ic_instagram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/modules/base/presenter/base_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:send_post_app/modules/category/presenter/category_screen.dart'; 5 | import 'package:send_post_app/modules/home/presenter/home_screen.dart'; 6 | import 'package:send_post_app/modules/notification/presenter/notifications_screen.dart'; 7 | 8 | import '../../../core/constants/app_icons.dart'; 9 | import '../infra/datasources/base_screen_controller.dart'; 10 | 11 | class BaseScreen extends GetWidget { 12 | final Widget? background; 13 | final EdgeInsetsGeometry? padding; 14 | final bool? resizeToAvoidBottomInset; 15 | final bool? hasFocusHandler; 16 | 17 | const BaseScreen({ 18 | Key? key, 19 | this.padding, 20 | this.background, 21 | this.resizeToAvoidBottomInset = false, 22 | this.hasFocusHandler = false, 23 | }) : super(key: key); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | resizeToAvoidBottomInset: resizeToAvoidBottomInset, 29 | bottomNavigationBar: GetBuilder( 30 | id: 'baseScreen', 31 | builder: (c) { 32 | return BottomNavigationBar( 33 | items: [ 34 | BottomNavigationBarItem( 35 | label: '', 36 | icon: SvgPicture.asset( 37 | c.activePageIndex == 0 38 | ? AppIcons.homeFilled 39 | : AppIcons.home, 40 | ), 41 | ), 42 | BottomNavigationBarItem( 43 | label: '', 44 | icon: SvgPicture.asset( 45 | c.activePageIndex == 1 46 | ? AppIcons.categoryFilled 47 | : AppIcons.category, 48 | ), 49 | ), 50 | BottomNavigationBarItem( 51 | label: '', 52 | icon: SvgPicture.asset( 53 | AppIcons.addCircle, 54 | ), 55 | ), 56 | BottomNavigationBarItem( 57 | label: '', 58 | icon: SvgPicture.asset( 59 | c.activePageIndex == 3 60 | ? AppIcons.notificationFilled 61 | : AppIcons.notification, 62 | ), 63 | ), 64 | BottomNavigationBarItem( 65 | label: '', 66 | icon: SvgPicture.asset( 67 | c.activePageIndex == 4 68 | ? AppIcons.profileFilled 69 | : AppIcons.profile, 70 | color: Colors.grey.withOpacity(0.3), 71 | ), 72 | ), 73 | ], 74 | onTap: (index) => controller.changeScreen(index), 75 | ); 76 | }), 77 | body: GestureDetector( 78 | onTap: () { 79 | if (hasFocusHandler!) { 80 | FocusManager.instance.primaryFocus?.unfocus(); 81 | } 82 | }, 83 | child: PageView( 84 | controller: controller.baseScreenPageController, 85 | children: const [ 86 | HomeScreen(), 87 | CategoryScreen(), 88 | HomeScreen(), 89 | NotificationScreen(), 90 | //ProfileScreen(), 91 | ], 92 | )), 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /lib/modules/home/presenter/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:send_post_app/core/constants/app_images.dart'; 4 | import 'package:send_post_app/core/extensions/space.dart'; 5 | import 'package:send_post_app/core/extensions/theme.dart'; 6 | import 'package:send_post_app/entities/post.dart'; 7 | import 'package:send_post_app/modules/home/infra/datasources/user_controller.dart'; 8 | import 'package:send_post_app/modules/home/presenter/widgets/home_header.dart'; 9 | import 'package:send_post_app/modules/home/presenter/widgets/loading_widget.dart'; 10 | import 'package:send_post_app/modules/home/presenter/widgets/post/post.dart'; 11 | import 'package:send_post_app/modules/home/presenter/widgets/tab_bar_widget.dart'; 12 | 13 | import '../../../entities/user.dart'; 14 | import '../../base_page/presenter/base_page.dart'; 15 | 16 | class HomeScreen extends GetWidget { 17 | const HomeScreen({Key? key}) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | controller.updateIndex(); 22 | return DefaultTabController( 23 | animationDuration: 100.milliseconds, 24 | initialIndex: 0, 25 | length: 3, 26 | child: BasePage( 27 | hasFocusHandler: true, 28 | padding: EdgeInsets.symmetric( 29 | horizontal: context.paddingHuge, 30 | ), 31 | child: GetBuilder( 32 | id: 'userController', 33 | builder: (c) { 34 | return Stack( 35 | children: [ 36 | Column( 37 | children: [ 38 | HomeHeader(controller: controller), 39 | context.ySmall, 40 | TabBarWidget( 41 | controller: controller, 42 | ), 43 | context.ySmall, 44 | Expanded( 45 | child: TabBarView( 46 | controller: controller.tabController, 47 | children: const [ 48 | _PopularPostsSection(), 49 | _PopularPostsSection(), 50 | _PopularPostsSection(), 51 | ]), 52 | ), 53 | ], 54 | ), 55 | if (controller.isLoading) const LoadingWidget(), 56 | ], 57 | ); 58 | }, 59 | )), 60 | ); 61 | } 62 | } 63 | 64 | class _PopularPostsSection extends StatelessWidget { 65 | const _PopularPostsSection({ 66 | super.key, 67 | }); 68 | 69 | @override 70 | Widget build(BuildContext context) { 71 | return ListView.builder( 72 | itemCount: 3, 73 | shrinkWrap: true, 74 | padding: EdgeInsets.zero, 75 | itemBuilder: (context, index) { 76 | return Column( 77 | children: [ 78 | PostCard( 79 | post: Post( 80 | id: 0, 81 | shareTime: DateTime(1), 82 | owner: User( 83 | avatarUrl: AppImages.dummyPhoto, 84 | userName: 'Username', 85 | ), 86 | ), 87 | onTapAddBookMarkIcon: () {}, 88 | onTapComment: () {}, 89 | onTapLike: () {}, 90 | ), 91 | context.ySmall, 92 | ], 93 | ); 94 | }); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "abseil-cpp-binary", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/google/abseil-cpp-binary.git", 7 | "state" : { 8 | "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", 9 | "version" : "1.2022062300.0" 10 | } 11 | }, 12 | { 13 | "identity" : "firebase-ios-sdk", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/firebase/firebase-ios-sdk", 16 | "state" : { 17 | "revision" : "a580250a9ff49ec38da5430cef20f88ddc831db2", 18 | "version" : "10.12.0" 19 | } 20 | }, 21 | { 22 | "identity" : "googleappmeasurement", 23 | "kind" : "remoteSourceControl", 24 | "location" : "https://github.com/google/GoogleAppMeasurement.git", 25 | "state" : { 26 | "revision" : "0a226a8c50494c4cb877fbde27ab6374520a3354", 27 | "version" : "10.12.0" 28 | } 29 | }, 30 | { 31 | "identity" : "googledatatransport", 32 | "kind" : "remoteSourceControl", 33 | "location" : "https://github.com/google/GoogleDataTransport.git", 34 | "state" : { 35 | "revision" : "98a00258d4518b7521253a70b7f70bb76d2120fe", 36 | "version" : "9.2.4" 37 | } 38 | }, 39 | { 40 | "identity" : "googleutilities", 41 | "kind" : "remoteSourceControl", 42 | "location" : "https://github.com/google/GoogleUtilities.git", 43 | "state" : { 44 | "revision" : "4446686bc3714d49ce043d0f68318f42ed718cb6", 45 | "version" : "7.11.4" 46 | } 47 | }, 48 | { 49 | "identity" : "grpc-binary", 50 | "kind" : "remoteSourceControl", 51 | "location" : "https://github.com/google/grpc-binary.git", 52 | "state" : { 53 | "revision" : "f1b366129d1125be7db83247e003fc333104b569", 54 | "version" : "1.50.2" 55 | } 56 | }, 57 | { 58 | "identity" : "gtm-session-fetcher", 59 | "kind" : "remoteSourceControl", 60 | "location" : "https://github.com/google/gtm-session-fetcher.git", 61 | "state" : { 62 | "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd", 63 | "version" : "3.1.1" 64 | } 65 | }, 66 | { 67 | "identity" : "leveldb", 68 | "kind" : "remoteSourceControl", 69 | "location" : "https://github.com/firebase/leveldb.git", 70 | "state" : { 71 | "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b", 72 | "version" : "1.22.2" 73 | } 74 | }, 75 | { 76 | "identity" : "nanopb", 77 | "kind" : "remoteSourceControl", 78 | "location" : "https://github.com/firebase/nanopb.git", 79 | "state" : { 80 | "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", 81 | "version" : "2.30909.0" 82 | } 83 | }, 84 | { 85 | "identity" : "promises", 86 | "kind" : "remoteSourceControl", 87 | "location" : "https://github.com/google/promises.git", 88 | "state" : { 89 | "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", 90 | "version" : "2.3.1" 91 | } 92 | }, 93 | { 94 | "identity" : "swift-protobuf", 95 | "kind" : "remoteSourceControl", 96 | "location" : "https://github.com/apple/swift-protobuf.git", 97 | "state" : { 98 | "revision" : "ce20dc083ee485524b802669890291c0d8090170", 99 | "version" : "1.22.1" 100 | } 101 | } 102 | ], 103 | "version" : 2 104 | } 105 | --------------------------------------------------------------------------------