├── .github └── workflows │ └── flutter-ci.yml ├── .gitignore ├── .metadata ├── CONTRIBUTION.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── programmerprofile │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── animations │ ├── bg-1.json │ ├── bg-2.json │ └── bg-3.json ├── images │ ├── 112417-verify-your-email.json │ ├── 17245-code.json │ ├── 38435-register.json │ ├── 4021-no-notification-state.json │ ├── 5482-connect.json │ ├── 67011-code-time.json │ ├── 87718-waiting-register.json │ ├── 95348-coding-boy.json │ ├── 98636-coding.json │ ├── cf.svg │ ├── code-forces (1).png │ ├── code-forces.png │ ├── forgotPassword.json │ ├── image2.png │ ├── loading_spinner.json │ ├── not-found.json │ ├── resetPassword.json │ └── search-not-found.json └── logo.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── auth │ ├── controller │ │ ├── api.dart │ │ ├── auth.dart │ │ └── queries.dart │ ├── model │ │ ├── http_exception.dart │ │ └── user.dart │ └── view │ │ ├── forgot_password_page.dart │ │ ├── login_page.dart │ │ ├── onboarding_page.dart │ │ ├── reset_password_page.dart │ │ ├── sign_up_page.dart │ │ ├── verification_page.dart │ │ └── widgets │ │ ├── custom_button.dart │ │ ├── custom_scaffold.dart │ │ └── on_boarding_card.dart ├── contests │ ├── controller │ │ ├── api.dart │ │ └── query.dart │ ├── model │ │ └── contest_model.dart │ └── view │ │ ├── contest_card.dart │ │ └── contest_page.dart ├── home │ ├── controller │ │ ├── apis.dart │ │ ├── client.dart │ │ ├── queries.dart │ │ └── user_provider.dart │ ├── model │ │ ├── cf_bar_model.dart │ │ ├── cf_donut_model.dart │ │ ├── cf_rating_model.dart │ │ ├── github_language_model.dart │ │ ├── lc_contest_model.dart │ │ ├── lc_language_model.dart │ │ ├── lc_stats_model.dart │ │ └── lc_tags_model.dart │ └── view │ │ ├── edit_bio_page.dart │ │ ├── profile_page.dart │ │ ├── temp_home.dart │ │ └── widgets │ │ ├── codeforces_graphs.dart │ │ ├── drawer.dart │ │ ├── github_card1.dart │ │ ├── github_charts.dart │ │ ├── github_streak_card.dart │ │ ├── image_input.dart │ │ └── lc_tags_chart.dart ├── main.dart ├── notifications │ ├── controller │ │ ├── api.dart │ │ └── queries.dart │ ├── model │ │ └── notifications.dart │ └── view │ │ └── notification_page.dart ├── splash.dart ├── styles.dart └── userSearch │ ├── controller │ ├── apis.dart │ └── queries.dart │ ├── model │ └── search_result.dart │ └── view │ ├── new_user_page.dart │ └── search_page.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── app_icon_1024.png │ │ ├── app_icon_128.png │ │ ├── app_icon_16.png │ │ ├── app_icon_256.png │ │ ├── app_icon_32.png │ │ ├── app_icon_512.png │ │ └── app_icon_64.png │ ├── Base.lproj │ └── MainMenu.xib │ ├── Configs │ ├── AppInfo.xcconfig │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── pubspec.lock ├── pubspec.yaml ├── screenshots ├── Programmer-profile-ContestsAndEvents.PNG ├── Programmer-profile-Dashboard-CFAnalysis.PNG ├── Programmer-profile-Dashboard-GitHubAnalysis.PNG ├── Programmer-profile-Dashboard-Heatmap.PNG ├── Programmer-profile-Dashboard-LeetCodeAnalysis.PNG ├── Programmer-profile-Menu-Drawer.PNG ├── Programmer-profile-NewUserScreen.PNG ├── Programmer-profile-Notification.PNG ├── Programmer-profile-ProfileScreen.PNG └── Programmer-profile-SearchUserScreen.PNG ├── test └── widget_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.github/workflows/flutter-ci.yml: -------------------------------------------------------------------------------- 1 | name: Flutter CI 2 | 3 | # This workflow is triggered on pushes to the repository. 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | 10 | # on: push # Default will running for every branch. 11 | 12 | jobs: 13 | build: 14 | # This job will run on ubuntu virtual machine 15 | runs-on: ubuntu-latest 16 | steps: 17 | 18 | # Setup Java environment in order to build the Android app. 19 | - uses: actions/checkout@v1 20 | - uses: actions/setup-java@v1 21 | with: 22 | java-version: '12.x' 23 | 24 | # Setup the flutter environment. 25 | - uses: subosito/flutter-action@v1 26 | with: 27 | channel: 'beta' # 'dev', 'alpha', default to: 'stable' 28 | # flutter-version: '1.12.x' # you can also specify exact version of flutter 29 | 30 | # Get flutter dependencies. 31 | - run: flutter pub get 32 | 33 | # Check for any formatting issues in the code. 34 | #- run: flutter format --set-exit-if-changed . 35 | 36 | # Statically analyze the Dart code for any errors. 37 | - run: flutter analyze . 38 | 39 | # Run widget tests for our flutter project. 40 | # - run: flutter test 41 | 42 | # Build apk. 43 | - run: flutter build apk 44 | 45 | # Upload generated apk to the artifacts. 46 | - uses: actions/upload-artifact@v1 47 | with: 48 | name: release-apk 49 | path: build/app/outputs/apk/release/app-release.apk 50 | -------------------------------------------------------------------------------- /.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 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | -------------------------------------------------------------------------------- /.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: fb57da5f945d02ef4f98dfd9409a72b7cce74268 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: fb57da5f945d02ef4f98dfd9409a72b7cce74268 17 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 18 | - platform: android 19 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 20 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 21 | - platform: ios 22 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 23 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 24 | - platform: linux 25 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 26 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 27 | - platform: macos 28 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 29 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 30 | - platform: web 31 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 32 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 33 | - platform: windows 34 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 35 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 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 | -------------------------------------------------------------------------------- /CONTRIBUTION.md: -------------------------------------------------------------------------------- 1 | ## Contribution 2 | - Awesome! Contributions of all kinds are greatly appreciated. To help smoothen the process we have a few non-exhaustive guidelines to follow which should get you going in no time. 3 | 4 | ## Getting Started 5 | - [Contributing to Flutter:Getting Started](https://medium.com/flutter-community/contributing-to-flutter-getting-started-a0db68cbcd5b) 6 | - Fork the repository 7 | - Send your commits 8 | - Submit a Pull request 9 | 10 | ## Submitting a Pull Request 11 | - Write appropriate title 12 | -Wrtie a proper description including the issue name and solution. 13 | 14 | ## Using GitHub Issues 15 | - Feel free to use GitHub issues for questions, bug reports, and feature requests 16 | - Use the search feature to check for an existing issue 17 | - Include as much information as possible and provide any relevant resources (Eg. screenshots) 18 | - For bug reports ensure you have a reproducible test case 19 | - A pull request with a breaking test would be super preferable here but isn't required 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 AkhileshManda 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Programmer Profile Frontend 2 | 3 | An application to help coders keep track of their coding activity and growth across multiple platforms! Currently the app supports github, leetcode and codeforces profile. 4 | 5 | Try it out at : https://play.google.com/store/apps/details?id=com.kitaihazure.graphenous1 6 | 7 | Backend Credits : @kalashshah 8 | Backend Repo : https://github.com/kalashshah/programmer-profile-backend 9 | 10 | ## Features 11 | 12 | - Email Authentication with verify OTP 13 | - Profile Page - **GitHub authentication and Codeforces, Leetcode username settings, update profile picture** 14 | - Home Screen - User description (can be edited in markdown), Custom HeatMap (heatmap activity shows acitivity on all platforms), Graphical Analysis of all platforms 15 | - Events and Contest Screen - Shows all upcoming events and contests in a beautiful custom scrollable UI 16 | - Search Users - Find and follow your friends and get inspired to code! 17 | 18 | ## Technical Features 19 | 20 | - Feature based MVC architecture 21 | - GraphQL APIs Integration 22 | - State Management - provider 23 | - Lottie Animations 24 | 25 | ## Screenshots 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
Dashboard HeatmapLeetcode AnalysisCodeforces AnalysisGitHub AnalysisNotification ScreenProfile ScreenContest and Events ScreenSearch Users ScreenNew Users Screen
50 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.example.programmerprofile" 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-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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/programmerprofile/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.programmerprofile 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 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 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /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/images/cf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /assets/images/code-forces (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/assets/images/code-forces (1).png -------------------------------------------------------------------------------- /assets/images/code-forces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/assets/images/code-forces.png -------------------------------------------------------------------------------- /assets/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/assets/images/image2.png -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/assets/logo.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.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/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.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-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/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-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/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Programmerprofile 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | programmerprofile 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/auth/controller/api.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:graphql_flutter/graphql_flutter.dart'; 3 | 4 | class EndPoint { 5 | 6 | ValueNotifier getClient(){ 7 | ValueNotifier client = ValueNotifier( 8 | GraphQLClient( 9 | link: HttpLink("https://graphenous.azurewebsites.net/graphql"), 10 | cache: GraphQLCache(), 11 | ) 12 | ); 13 | 14 | return client; 15 | } 16 | } -------------------------------------------------------------------------------- /lib/auth/controller/auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | class Auth with ChangeNotifier { 5 | String? _token; 6 | String? username; 7 | String? userEmail; 8 | 9 | bool get isAuth { 10 | return _token != null; 11 | } 12 | 13 | String? get token { 14 | return _token; 15 | } 16 | 17 | void logout() async { 18 | //print('logging out..'); 19 | _token = null; 20 | // userEmail = null; 21 | // username = null; 22 | final prefs = await SharedPreferences.getInstance(); 23 | prefs.remove("token"); 24 | prefs.remove("id"); 25 | notifyListeners(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/auth/controller/queries.dart: -------------------------------------------------------------------------------- 1 | class AuthenticationQueries { 2 | static String signup() { 3 | return """ 4 | mutation Signup(\$input: SignupInput!) { 5 | signup(input: \$input) 6 | } 7 | """; 8 | } 9 | 10 | static String verify() { 11 | return """ 12 | mutation CheckCode(\$input: CheckCodeInput!) { 13 | checkCode(input: \$input) { 14 | token 15 | user { 16 | email 17 | name 18 | id 19 | } 20 | } 21 | } 22 | """; 23 | } 24 | 25 | static String signIn() { 26 | return """ 27 | mutation Signin(\$input: SigninInput!) { 28 | signin(input: \$input) { 29 | token 30 | user { 31 | id 32 | name 33 | } 34 | } 35 | } 36 | """; 37 | } 38 | 39 | static String forgotPassword() { 40 | return """ 41 | mutation ForgotPassword(\$input: ForgotPasswordInput!) { 42 | forgotPassword(input: \$input) 43 | } 44 | """; 45 | } 46 | 47 | static String resetPassword() { 48 | return """ 49 | mutation ResetPassword(\$input: ResetPasswordInput!) { 50 | resetPassword(input: \$input) 51 | } 52 | """; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/auth/model/http_exception.dart: -------------------------------------------------------------------------------- 1 | class HttpException implements Exception { 2 | final String message; 3 | HttpException(this.message); //constructor 4 | 5 | @override 6 | String toString() { 7 | return message; 8 | // return super.toString(); //instance of HttpException 9 | } 10 | } -------------------------------------------------------------------------------- /lib/auth/model/user.dart: -------------------------------------------------------------------------------- 1 | import 'dart:core'; 2 | 3 | class User{ 4 | String? id; 5 | String? username; 6 | String? email; 7 | String? profilePicture; 8 | String? description; 9 | String? codeforcesUsername; 10 | String? githubUsername; 11 | String? leetcodeUsername; 12 | DateTime? createdAt; 13 | DateTime? updatedAt; 14 | List? followedByIds; 15 | List? followingIds; 16 | String? githubToken; 17 | 18 | User({ 19 | this.id, 20 | this.email, 21 | this.username, 22 | this.profilePicture, 23 | this.description, 24 | this.codeforcesUsername, 25 | this.githubUsername, 26 | this.leetcodeUsername, 27 | this.createdAt, 28 | this.updatedAt, 29 | this.followedByIds, 30 | this.followingIds, 31 | this.githubToken 32 | }); 33 | } -------------------------------------------------------------------------------- /lib/auth/view/forgot_password_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:graphql_flutter/graphql_flutter.dart'; 3 | import 'package:lottie/lottie.dart'; 4 | import 'package:programmerprofile/auth/view/reset_password_page.dart'; 5 | import 'package:programmerprofile/auth/view/widgets/custom_button.dart'; 6 | import 'package:programmerprofile/styles.dart'; 7 | import '../controller/api.dart'; 8 | import '../controller/queries.dart'; 9 | 10 | class ForgotPasswordScreen extends StatefulWidget { 11 | const ForgotPasswordScreen({super.key}); 12 | static const routeName = "forgot-password"; 13 | @override 14 | State createState() => _ForgotPasswordScreenState(); 15 | } 16 | 17 | class _ForgotPasswordScreenState extends State { 18 | 19 | final GlobalKey _formKey = GlobalKey(); 20 | final TextEditingController _emailCon = TextEditingController(); 21 | 22 | bool isLoading = false; 23 | 24 | void onButtonPressed({required String email}) async { 25 | 26 | setState(() { 27 | isLoading = true; 28 | }); 29 | 30 | final EndPoint point = EndPoint(); 31 | ValueNotifier client = point.getClient(); 32 | 33 | QueryResult result = await client.value.mutate(MutationOptions( 34 | document: gql(AuthenticationQueries.forgotPassword()), 35 | variables: { 36 | "input": { 37 | 'email': email, 38 | } 39 | })); 40 | 41 | if (result.hasException) { 42 | //print(result.exception); 43 | setState(() { 44 | isLoading = false; 45 | }); 46 | if (!mounted) return; 47 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 48 | behavior: SnackBarBehavior.floating, 49 | padding: const EdgeInsets.all(15), 50 | margin: const EdgeInsets.all(20), 51 | backgroundColor: Colors.red, 52 | content: 53 | Text(result.exception!.graphqlErrors[0].message.toString()))); 54 | 55 | if (result.exception!.graphqlErrors.isEmpty) { 56 | //print("Internet is not found"); 57 | } else { 58 | //print(result.exception!.graphqlErrors[0].message.toString()); 59 | } 60 | } else { 61 | //print(result.data); 62 | //print("SHEEESH"); 63 | if (!mounted) return; 64 | Navigator.push( 65 | context, 66 | MaterialPageRoute( 67 | builder: (context) => ResetPasswordScreen(email: email))); 68 | } 69 | } 70 | 71 | @override 72 | Widget build(BuildContext context) { 73 | return Scaffold( 74 | backgroundColor: const Color.fromRGBO(0, 10, 56, 1), 75 | body: Stack( 76 | children: [ 77 | LottieBuilder.asset("assets/animations/bg-1.json"), 78 | Padding( 79 | padding: const EdgeInsets.all(8.0), 80 | child: Center( 81 | child: SingleChildScrollView( 82 | physics: const BouncingScrollPhysics(), 83 | child: Column( 84 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 85 | children: [ 86 | LottieBuilder.asset( 87 | "assets/images/forgotPassword.json", 88 | height: 350), 89 | 90 | const Padding( 91 | padding: EdgeInsets.all(8.0), 92 | child: Text( 93 | "Forgot Password?", 94 | style: TextStyle( 95 | color: Colors.pink, 96 | fontSize: 25, 97 | fontWeight: FontWeight.w500), 98 | ), 99 | ), 100 | const Padding( 101 | padding: EdgeInsets.all(8.0), 102 | child: Text( 103 | textAlign: TextAlign.center, 104 | "No worries! Just enter your email and reset your password", 105 | style: TextStyle( 106 | color: Colors.white, 107 | fontSize: 20, 108 | fontWeight: FontWeight.w400), 109 | ), 110 | ), 111 | const SizedBox(height: 20), 112 | //Expanded(child: Container()), 113 | Form( 114 | key: _formKey, 115 | child: Padding( 116 | padding: const EdgeInsets.all(8.0), 117 | child: TextFormField( 118 | controller: _emailCon, 119 | keyboardType: TextInputType.emailAddress, 120 | decoration: Styles.textFieldStyle("Email"), 121 | ), 122 | ), 123 | ), 124 | const SizedBox(height: 10), 125 | customElevatedButton( 126 | isLoading: isLoading, 127 | onPressed: (){ 128 | onButtonPressed(email: _emailCon.text); 129 | }, 130 | title: "Confirm Email" 131 | ) 132 | ], 133 | ), 134 | ), 135 | )), 136 | ], 137 | )); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/auth/view/onboarding_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:concentric_transition/concentric_transition.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:lottie/lottie.dart'; 4 | import 'package:programmerprofile/auth/view/sign_up_page.dart'; 5 | import 'package:programmerprofile/auth/view/widgets/on_boarding_card.dart'; 6 | 7 | class OnboardingPage extends StatelessWidget { 8 | OnboardingPage({Key? key}) : super(key: key); 9 | static const routeName = 'onboarding'; 10 | final data = [ 11 | OnBoardingData( 12 | title: "Connect", 13 | subtitle: 14 | "Connect your Codeforces, Leetcode, GitHub accounts all in one app", 15 | image: LottieBuilder.asset("assets/images/95348-coding-boy.json"), 16 | backgroundColor: const Color.fromRGBO(0, 10, 56, 1), 17 | titleColor: Colors.pink, 18 | subtitleColor: Colors.white, 19 | background: LottieBuilder.asset("assets/animations/bg-1.json"), 20 | ), 21 | OnBoardingData( 22 | title: "Code", 23 | subtitle: "Keep coding effectively while we help you keep track of your strength and weaknesses", 24 | image: LottieBuilder.asset("assets/images/98636-coding.json"), 25 | backgroundColor: Colors.white, 26 | titleColor: Colors.purple, 27 | subtitleColor: const Color.fromRGBO(0, 10, 56, 1), 28 | background: LottieBuilder.asset("assets/animations/bg-2.json"), 29 | ), 30 | OnBoardingData( 31 | title: "Collaborate", 32 | subtitle: "Collaborate with developers across the world and build innovative products", 33 | image: LottieBuilder.asset("assets/images/5482-connect.json"), 34 | backgroundColor: const Color.fromRGBO(71, 59, 117, 1), 35 | titleColor: Colors.yellow, 36 | subtitleColor: Colors.white, 37 | background: LottieBuilder.asset("assets/animations/bg-3.json"), 38 | ), 39 | ]; 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return Scaffold( 44 | body: ConcentricPageView( 45 | 46 | duration: const Duration(seconds: 4), 47 | colors: data.map((e) => e.backgroundColor).toList(), 48 | itemCount: data.length, 49 | itemBuilder: (int index) { 50 | return OnBoardingCard(data: data[index]); 51 | }, 52 | onFinish: () { 53 | Navigator.pushReplacementNamed( 54 | context, SignUpScreen.routeName 55 | ); 56 | }, 57 | ), 58 | ); 59 | } 60 | } -------------------------------------------------------------------------------- /lib/auth/view/verification_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_verification_code/flutter_verification_code.dart'; 3 | import 'package:graphql_flutter/graphql_flutter.dart'; 4 | import 'package:lottie/lottie.dart'; 5 | import 'package:programmerprofile/auth/controller/api.dart'; 6 | import 'package:programmerprofile/auth/controller/queries.dart'; 7 | import 'package:programmerprofile/auth/view/widgets/custom_button.dart'; 8 | import 'package:programmerprofile/home/view/temp_home.dart'; 9 | import 'package:shared_preferences/shared_preferences.dart'; 10 | 11 | class VerificationScreen extends StatefulWidget { 12 | final String email; 13 | const VerificationScreen({super.key, required this.email}); 14 | static String routeName = 'verification-screen'; 15 | @override 16 | State createState() => _VerificationScreenState(); 17 | } 18 | 19 | class _VerificationScreenState extends State { 20 | late String _code; 21 | bool _onEditing = true; 22 | 23 | bool isLoading = false; 24 | 25 | void onVerificationPressed()async{ 26 | 27 | setState(() { 28 | isLoading = true; 29 | }); 30 | final EndPoint point = EndPoint(); 31 | ValueNotifier client = point.getClient(); 32 | 33 | QueryResult result = await client.value.mutate( 34 | MutationOptions(document: gql(AuthenticationQueries.verify()), 35 | variables: { 36 | "input": { 37 | 'email': widget.email, 38 | 'code': _code 39 | } 40 | })); 41 | 42 | if (result.hasException) { 43 | setState(() { 44 | isLoading = false; 45 | }); 46 | //print(result.exception); 47 | if (!mounted) return; 48 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 49 | behavior: SnackBarBehavior.floating, 50 | padding: const EdgeInsets.all(15), 51 | margin: const EdgeInsets.all(20), 52 | backgroundColor: Colors.red, 53 | content: 54 | Text(result.exception!.graphqlErrors[0].message.toString()))); 55 | if (result.exception!.graphqlErrors.isEmpty) { 56 | // print("Internet is not found"); 57 | } else { 58 | // print(result.exception!.graphqlErrors[0].message.toString()); 59 | } 60 | //notifyListeners(); 61 | } else { 62 | // print(result.data); 63 | final prefs = await SharedPreferences.getInstance(); 64 | // print(result.data!['checkCode']['token']); 65 | prefs.setString("token", result.data!['checkCode']['token']); 66 | prefs.setString("id", result.data!['checkCode']['user']['id']); 67 | if (!mounted) return; 68 | Navigator.pushReplacementNamed(context, Home.routeName); 69 | // print("SHEEESH"); 70 | } 71 | } 72 | @override 73 | Widget build(BuildContext context) { 74 | return Scaffold( 75 | backgroundColor: const Color.fromRGBO(0, 10, 56, 1), 76 | body: Stack( 77 | children: [ 78 | LottieBuilder.asset("assets/animations/bg-1.json"), 79 | Center( 80 | child: SingleChildScrollView( 81 | child: Column( 82 | children: [ 83 | //LottieBuilder.asset("assets/images/112417-verify-your-email.json"), 84 | LottieBuilder.asset("assets/images/17245-code.json", 85 | height: 350), 86 | const Padding( 87 | padding: EdgeInsets.all(8.0), 88 | child: Text( 89 | "Verify OTP", 90 | style: TextStyle( 91 | color: Colors.pink, 92 | fontSize: 25, 93 | fontWeight: FontWeight.w500), 94 | ), 95 | ), 96 | const Padding( 97 | padding: EdgeInsets.all(8.0), 98 | child: Text( 99 | textAlign: TextAlign.center, 100 | "Please enter the OTP recieved on your mail to proceed", 101 | style: TextStyle( 102 | color: Colors.white, 103 | fontSize: 20, 104 | fontWeight: FontWeight.w400), 105 | ), 106 | ), 107 | const SizedBox(height: 20), 108 | VerificationCode( 109 | textStyle: const TextStyle(fontSize: 20.0, color: Colors.pink), 110 | keyboardType: TextInputType.streetAddress, 111 | underlineColor: Colors.pink, 112 | // If this is null it will use primaryColor: Colors.red from Theme 113 | length: 6, 114 | cursorColor: 115 | Colors.pink, // If this is null it will default to the ambient 116 | // clearAll is NOT required, you can delete it 117 | // takes any widget, so you can implement your design 118 | clearAll: const Padding( 119 | padding: EdgeInsets.all(8.0), 120 | child: Text( 121 | 'clear all', 122 | style: TextStyle( 123 | fontSize: 20.0, 124 | fontWeight: FontWeight.w400, 125 | color: Colors.white), 126 | ), 127 | ), 128 | onCompleted: (String value) { 129 | setState(() { 130 | _code = value; 131 | }); 132 | }, 133 | onEditing: (bool value) { 134 | setState(() { 135 | _onEditing = value; 136 | }); 137 | if (!_onEditing) FocusScope.of(context).unfocus(); 138 | }, 139 | ), 140 | const SizedBox(height: 30,), 141 | customElevatedButton( 142 | isLoading: isLoading, 143 | onPressed: (){ 144 | onVerificationPressed(); 145 | }, 146 | title: "Verify" 147 | ) 148 | ], 149 | ), 150 | ), 151 | ), 152 | ], 153 | )); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /lib/auth/view/widgets/custom_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | 4 | Widget customElevatedButton( 5 | {required bool isLoading, 6 | required Function onPressed, 7 | required String title}) { 8 | return Padding( 9 | padding: const EdgeInsets.all(8.0), 10 | child: SizedBox( 11 | width: double.infinity, 12 | height: 45, 13 | child: ElevatedButton( 14 | style: 15 | ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.pink)), 16 | onPressed: () { 17 | onPressed(); 18 | }, 19 | child: !isLoading 20 | ? Text( 21 | title, 22 | ) 23 | : LottieBuilder.asset("assets/images/loading_spinner.json")), 24 | ), 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /lib/auth/view/widgets/custom_scaffold.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | 4 | Widget customScaffold({GlobalKey? scaffoldKey, required Widget body, AppBar? appBar}){ 5 | return Scaffold( 6 | appBar: appBar ?? AppBar(backgroundColor: Colors.transparent,), 7 | backgroundColor: const Color.fromRGBO(0, 10, 56, 1), 8 | body: Stack( 9 | children: [ 10 | LottieBuilder.asset("assets/animations/bg-1.json"), 11 | body 12 | ], 13 | ), 14 | ); 15 | } -------------------------------------------------------------------------------- /lib/auth/view/widgets/on_boarding_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class OnBoardingData { 4 | final String title; 5 | final String subtitle; 6 | final Widget image; 7 | final Color backgroundColor; 8 | final Color titleColor; 9 | final Color subtitleColor; 10 | final Widget? background; 11 | 12 | OnBoardingData({ 13 | required this.title, 14 | required this.subtitle, 15 | required this.image, 16 | required this.backgroundColor, 17 | required this.titleColor, 18 | required this.subtitleColor, 19 | this.background, 20 | }); 21 | } 22 | 23 | class OnBoardingCard extends StatelessWidget { 24 | const OnBoardingCard({ 25 | required this.data, 26 | Key? key, 27 | }) : super(key: key); 28 | 29 | final OnBoardingData data; 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Stack( 34 | children: [ 35 | if (data.background != null) data.background!, 36 | Padding( 37 | padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 20), 38 | child: Column( 39 | mainAxisAlignment: MainAxisAlignment.center, 40 | children: [ 41 | const Spacer(flex: 3), 42 | Flexible( 43 | flex: 20, 44 | child: data.image, 45 | ), 46 | const Spacer(flex: 1), 47 | Text( 48 | data.title.toUpperCase(), 49 | style: TextStyle( 50 | color: data.titleColor, 51 | fontSize: 20, 52 | fontWeight: FontWeight.bold, 53 | letterSpacing: 1, 54 | ), 55 | maxLines: 1, 56 | ), 57 | const Spacer(flex: 1), 58 | Text( 59 | data.subtitle, 60 | style: TextStyle( 61 | color: data.subtitleColor, 62 | fontSize: 16, 63 | ), 64 | textAlign: TextAlign.center, 65 | maxLines: 2, 66 | ), 67 | const Spacer(flex: 10), 68 | ], 69 | ), 70 | ), 71 | ], 72 | ); 73 | } 74 | } -------------------------------------------------------------------------------- /lib/contests/controller/api.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:graphql_flutter/graphql_flutter.dart'; 3 | import 'package:programmerprofile/contests/controller/query.dart'; 4 | import 'package:programmerprofile/home/controller/client.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | 7 | import '../model/contest_model.dart'; 8 | 9 | class ContestAPI{ 10 | Future>?> getContests() async { 11 | //print("Called"); 12 | List> data = []; 13 | 14 | final prefs = await SharedPreferences.getInstance(); 15 | final String token = prefs.getString("token")!; 16 | //print("token: $token"); 17 | final EndPointGithubAuth point = EndPointGithubAuth(); 18 | ValueNotifier client = point.getClientGithub(token); 19 | 20 | QueryResult result = await client.value.mutate(MutationOptions( 21 | document: gql(ContestQuery.getContests()), 22 | )); 23 | if (result.hasException) { 24 | //print("Contest Exception"); 25 | 26 | if (result.exception!.graphqlErrors.isEmpty) { 27 | // print("Internet is not found"); 28 | } else { 29 | // print(result.exception!.graphqlErrors[0].message.toString()); 30 | } 31 | } else { 32 | // print(result.data); 33 | List todayContests = []; 34 | List tomContests = []; 35 | List weekContests = []; 36 | List upcomingContests = []; 37 | 38 | for(var x in result.data!["getContests"]["today"]) { 39 | todayContests.add(Contest( 40 | duration: x["duration"], 41 | start: DateTime.parse(x["start"].toString()), 42 | end: DateTime.parse(x["end"].toString()), 43 | event: x["event"], 44 | host: x["host"], 45 | href: x["href"], 46 | id: x["id"], 47 | resource: x["resource"], 48 | resourceId: x["resource_id"])); 49 | } 50 | //print("today fetched"); 51 | for(var x in result.data!["getContests"]["tomorrow"]) { 52 | tomContests.add(Contest( 53 | duration: x["duration"], 54 | start: DateTime.parse(x["start"].toString()), 55 | end: DateTime.parse(x["end"].toString()), 56 | event: x["event"], 57 | host: x["host"], 58 | href: x["href"], 59 | id: x["id"], 60 | resource: x["resource"], 61 | resourceId: x["resource_id"])); 62 | } 63 | //print("tom fetched"); 64 | 65 | for(var x in result.data!["getContests"]["week"]) { 66 | weekContests.add(Contest( 67 | duration: x["duration"], 68 | start: DateTime.parse(x["start"].toString()), 69 | end: DateTime.parse(x["end"].toString()), 70 | event: x["event"], 71 | host: x["host"], 72 | href: x["href"], 73 | id: x["id"], 74 | resource: x["resource"], 75 | resourceId: x["resource_id"])); 76 | } 77 | //print("week fetched"); 78 | 79 | for(var x in result.data!["getContests"]["upcoming"]) { 80 | upcomingContests.add(Contest( 81 | duration: x["duration"], 82 | start: DateTime.parse(x["start"].toString()), 83 | end: DateTime.parse(x["end"].toString()), 84 | event: x["event"], 85 | host: x["host"], 86 | href: x["href"], 87 | id: x["id"], 88 | resource: x["resource"], 89 | resourceId: x["resource_id"])); 90 | } 91 | //print("upcoming fetched"); 92 | 93 | 94 | // data.putIfAbsent("today", () => todayContests); 95 | // data.putIfAbsent("tom", () => tomContests); 96 | // data.putIfAbsent("week", () => weekContests); 97 | // data.putIfAbsent("upcoming", () => upcomingContests); 98 | //print(data.toString()); 99 | data.add(todayContests); 100 | data.add(tomContests); 101 | data.add(weekContests); 102 | data.add(upcomingContests); 103 | 104 | //print(data[0][1].start.toString()); 105 | return data; 106 | } 107 | return null; 108 | } 109 | } -------------------------------------------------------------------------------- /lib/contests/controller/query.dart: -------------------------------------------------------------------------------- 1 | class ContestQuery{ 2 | static String getContests(){ 3 | return """ 4 | 5 | query GetContests { 6 | getContests { 7 | today { 8 | duration 9 | start 10 | end 11 | event 12 | host 13 | href 14 | id 15 | resource 16 | resource_id 17 | } 18 | tomorrow { 19 | duration 20 | start 21 | end 22 | event 23 | host 24 | id 25 | resource 26 | resource_id 27 | href 28 | } 29 | week { 30 | duration 31 | start 32 | end 33 | event 34 | host 35 | href 36 | id 37 | resource 38 | resource_id 39 | } 40 | upcoming { 41 | duration 42 | start 43 | end 44 | event 45 | host 46 | href 47 | id 48 | resource 49 | resource_id 50 | } 51 | } 52 | } 53 | 54 | 55 | """; 56 | } 57 | } -------------------------------------------------------------------------------- /lib/contests/model/contest_model.dart: -------------------------------------------------------------------------------- 1 | class Contest{ 2 | int duration; 3 | DateTime? start; 4 | DateTime? end; 5 | String event; 6 | String host; 7 | String href; 8 | String id; 9 | String resource; 10 | int resourceId; 11 | 12 | Contest({ 13 | required this.duration, 14 | this.start, 15 | this.end, 16 | required this.event, 17 | required this.host, 18 | required this.href, 19 | required this.id, 20 | required this.resource, 21 | required this.resourceId 22 | }); 23 | 24 | } -------------------------------------------------------------------------------- /lib/contests/view/contest_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glassmorphism/glassmorphism.dart'; 3 | import 'package:intl/intl.dart'; 4 | import 'package:url_launcher/url_launcher.dart'; 5 | 6 | Widget contestCard( 7 | {required String name, 8 | required DateTime start, 9 | required DateTime end, 10 | required String site, 11 | required String href}) { 12 | String day = DateFormat('EEEE').format(start).substring(0, 3); 13 | String monthName = DateFormat.MMMMd().format(start).split(" ")[0]; 14 | Uri url = Uri.parse(href); 15 | return GestureDetector( 16 | onTap: () async { 17 | if (await canLaunchUrl(url)) { 18 | await launchUrl(url); 19 | } else { 20 | throw "Could not launch "; 21 | } 22 | }, 23 | child: GlassmorphicContainer( 24 | width: double.infinity, 25 | height: 185, 26 | borderRadius: 20, 27 | blur: 20, 28 | alignment: Alignment.bottomCenter, 29 | border: 2, 30 | linearGradient: LinearGradient( 31 | begin: Alignment.topLeft, 32 | end: Alignment.bottomRight, 33 | colors: [ 34 | const Color(0xFFffffff).withOpacity(0.1), 35 | const Color(0xFFFFFFFF).withOpacity(0.05), 36 | ], 37 | stops: const [ 38 | 0.1, 39 | 1, 40 | ]), 41 | borderGradient: LinearGradient( 42 | begin: Alignment.topLeft, 43 | end: Alignment.bottomRight, 44 | colors: [ 45 | const Color(0xFFffffff).withOpacity(0.5), 46 | const Color((0xFFFFFFFF)).withOpacity(0.5), 47 | ], 48 | ), 49 | child: Padding( 50 | padding: const EdgeInsets.all(7.5), 51 | child: Row( 52 | // crossAxisAlignment: CrossAxisAlignment.center, 53 | // mainAxisAlignment: MainAxisAlignment.center, 54 | children: [ 55 | Column( 56 | mainAxisAlignment: MainAxisAlignment.center, 57 | children: [ 58 | Padding( 59 | padding: const EdgeInsets.only( 60 | left: 8, right: 8, top: 8, bottom: 2), 61 | child: Text(monthName, 62 | style: const TextStyle(color: Colors.white, fontSize: 15)), 63 | ), 64 | Padding( 65 | padding: const EdgeInsets.only( 66 | left: 8, right: 8, top: 8, bottom: 2), 67 | child: Text( 68 | start.toString().substring(8, 10), 69 | style: const TextStyle(color: Colors.white, fontSize: 30), 70 | ), 71 | ), 72 | Padding( 73 | padding: const EdgeInsets.all(8.0), 74 | child: Text(day, 75 | style: const TextStyle(color: Colors.white, fontSize: 20)), 76 | ), 77 | ], 78 | ), 79 | Column( 80 | crossAxisAlignment: CrossAxisAlignment.start, 81 | children: [ 82 | SizedBox( 83 | width: 200, 84 | child: Padding( 85 | padding: const EdgeInsets.all(8.0), 86 | child: Text( 87 | name, 88 | style: const TextStyle(color: Colors.white, fontSize: 20), 89 | //textAlign: TextAlign.center, 90 | overflow: TextOverflow.ellipsis, 91 | ), 92 | ), 93 | ), 94 | SizedBox( 95 | width: 190, 96 | child: Padding( 97 | padding: const EdgeInsets.all(8.0), 98 | child: Text( 99 | "Start : ${DateFormat("MM-dd HH:mm").format(start)}\n\nEnd : ${DateFormat("MM-dd HH:mm").format(end)}", 100 | overflow: TextOverflow.ellipsis, 101 | style: const TextStyle(color: Colors.white, fontSize: 20), 102 | ), 103 | ), 104 | ), 105 | SizedBox( 106 | width: 200, 107 | child: Padding( 108 | padding: const EdgeInsets.all(8.0), 109 | child: Text( 110 | site, 111 | style: const TextStyle(color: Colors.pink, fontSize: 20), 112 | overflow: TextOverflow.ellipsis, 113 | ), 114 | ), 115 | ) 116 | ], 117 | ), 118 | ], 119 | ), 120 | ), 121 | ), 122 | ); 123 | } 124 | -------------------------------------------------------------------------------- /lib/home/controller/client.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:graphql_flutter/graphql_flutter.dart'; 3 | 4 | class EndPointGithubAuth { 5 | ValueNotifier getClientGithub(String token) { 6 | ValueNotifier client = ValueNotifier(GraphQLClient( 7 | link: HttpLink( 8 | "https://graphenous.azurewebsites.net/graphql", 9 | defaultHeaders: { 10 | 'Authorization': 'Bearer $token', 11 | }, 12 | ), 13 | cache: GraphQLCache(), 14 | )); 15 | 16 | return client; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /lib/home/controller/queries.dart: -------------------------------------------------------------------------------- 1 | class DashBoardQueries { 2 | static String githubAuth() { 3 | return """ 4 | mutation AuthorizeGithub(\$input: FakeInput) { 5 | authorizeGithub(input: \$input) { 6 | url 7 | } 8 | } 9 | """; 10 | } 11 | 12 | static String addUsername() { 13 | return """ 14 | mutation AddUsername(\$input: AddUsernameInput!) { 15 | addUsername(input: \$input) 16 | } 17 | """; 18 | } 19 | 20 | static String getUser() { 21 | return """ 22 | query GetUser { 23 | getUser { 24 | name 25 | profilePicture 26 | codeforcesUsername 27 | leetcodeUsername 28 | githubToken 29 | } 30 | } 31 | """; 32 | } 33 | 34 | static String getContributions() { 35 | return """ 36 | query ContributionGraph(\$input: UserIdInput!) { 37 | contributionGraph(input: \$input) { 38 | totalContributions 39 | totalGithubContributions 40 | totalCodeforcesContributions 41 | totalLeetcodeContributions 42 | contributions { 43 | date 44 | githubContributions 45 | codeforcesContributions 46 | leetcodeContributions 47 | } 48 | } 49 | } 50 | """; 51 | } 52 | 53 | static String addDescription() { 54 | return """ 55 | mutation AddDescription(\$input: DescriptionInput!) { 56 | addDescription(input: \$input) 57 | } 58 | """; 59 | } 60 | 61 | static String getUserDashboard() { 62 | return """ 63 | query Query { 64 | getUser { 65 | id 66 | name 67 | profilePicture 68 | email 69 | description 70 | } 71 | } 72 | """; 73 | } 74 | 75 | static String cfGraphs() { 76 | return """ 77 | query CodeforcesGraphs(\$input: UserIdInput!) { 78 | codeforcesGraphs(input: \$input) { 79 | ratingGraph { 80 | ratings { 81 | contestId 82 | contestName 83 | date 84 | handle 85 | newRating 86 | oldRating 87 | rank 88 | } 89 | } 90 | barGraph { 91 | problemRatingGraph { 92 | difficulty 93 | problemsCount 94 | } 95 | } 96 | donutGraph { 97 | problemTagGraph { 98 | tagName 99 | problemsCount 100 | } 101 | } 102 | } 103 | } 104 | """; 105 | } 106 | 107 | static String githubGraphs() { 108 | return """ 109 | query GithubGraphs(\$input: UserIdInput!) { 110 | githubGraphs(input: \$input) { 111 | languageGraph { 112 | name 113 | color 114 | size 115 | } 116 | statsGraph { 117 | followers 118 | following 119 | repos 120 | forkedBy 121 | watchedBy 122 | commits 123 | issues 124 | contributedTo 125 | pullRequests 126 | pullRequestReviews 127 | } 128 | streakGraph { 129 | currentSteakLength 130 | longestStreakLength 131 | longestStreakStartDate 132 | longestStreakEndDate 133 | currentStreakStartDate 134 | totalContributions 135 | } 136 | } 137 | } 138 | """; 139 | } 140 | 141 | static String leetcodeGraph(){ 142 | return """ 143 | query LeetcodeGraphs(\$input: UserIdInput!) { 144 | leetcodeGraphs(input: \$input) { 145 | contest { 146 | rating 147 | ranking 148 | attendedContestsCount 149 | totalParticipants 150 | topPercentage 151 | } 152 | contestHistory { 153 | attended 154 | problemsSolved 155 | totalProblems 156 | rating 157 | ranking 158 | contest { 159 | title 160 | startTime 161 | } 162 | } 163 | problems { 164 | difficulty 165 | count 166 | } 167 | user { 168 | username 169 | profile { 170 | realname 171 | about 172 | avatar 173 | skills 174 | country 175 | ranking 176 | categoryDiscussCount 177 | solutionCount 178 | reputation 179 | postViewCount 180 | } 181 | languageProblemCount { 182 | languageName 183 | problemsSolved 184 | } 185 | tagProblemCounts { 186 | advanced { 187 | tagName 188 | tagSlug 189 | problemsSolved 190 | } 191 | intermediate { 192 | tagName 193 | tagSlug 194 | problemsSolved 195 | } 196 | fundamental { 197 | tagName 198 | tagSlug 199 | problemsSolved 200 | } 201 | } 202 | problemsSolvedBeatsStats { 203 | difficulty 204 | percentage 205 | } 206 | submitStatsGlobal { 207 | difficulty 208 | count 209 | } 210 | } 211 | } 212 | } 213 | 214 | 215 | """; 216 | } 217 | 218 | 219 | } 220 | -------------------------------------------------------------------------------- /lib/home/controller/user_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:programmerprofile/home/controller/apis.dart'; 3 | 4 | import '../../auth/model/user.dart'; 5 | 6 | class UserProvider with ChangeNotifier{ 7 | User? _user; 8 | User? get user => _user; 9 | 10 | UserProvider( 11 | 12 | ); 13 | 14 | //heatmap 15 | Map? _heatMapData; 16 | Map? get heatMapData => _heatMapData; 17 | 18 | //Codeforces Data 19 | Map>? _cfdata; 20 | Map>? get cfdata => _cfdata; 21 | 22 | //Github Data 23 | Map? _githubData; 24 | Map? get githubData => _githubData; 25 | 26 | //Leetcode Data 27 | Map? _leetcodeData; 28 | Map? get leetcodeData => _leetcodeData; 29 | 30 | Future getUserData()async{ 31 | _user = await APIs().getUser(); 32 | notifyListeners(); 33 | } 34 | 35 | void updateUserProfilePicture(String newurl){ 36 | _user?.profilePicture = newurl; 37 | notifyListeners(); 38 | } 39 | 40 | void updateUserBio(String newBio){ 41 | _user?.description = newBio; 42 | notifyListeners(); 43 | } 44 | 45 | Future getCFData()async{ 46 | // print("Getting CFData..."); 47 | _cfdata = await APIs().getCFGraphData(); 48 | notifyListeners(); 49 | // print("SET data"); 50 | } 51 | 52 | Future getGithubData() async{ 53 | _githubData = await APIs().getGithubData(); 54 | notifyListeners(); 55 | } 56 | 57 | Future getLeetCodeData() async{ 58 | _leetcodeData = await APIs().getLeetCodeData(); 59 | notifyListeners(); 60 | } 61 | 62 | Future getHeatMapData() async{ 63 | _heatMapData = await APIs().getHeatMapData(); 64 | notifyListeners(); 65 | } 66 | } -------------------------------------------------------------------------------- /lib/home/model/cf_bar_model.dart: -------------------------------------------------------------------------------- 1 | class CFBarModel{ 2 | String rating; 3 | int problemsCount; 4 | 5 | CFBarModel({ 6 | required this.rating, 7 | required this.problemsCount 8 | }); 9 | } -------------------------------------------------------------------------------- /lib/home/model/cf_donut_model.dart: -------------------------------------------------------------------------------- 1 | class CFDonutModel{ 2 | String tagName; 3 | int problemsCount; 4 | 5 | CFDonutModel({ 6 | required this.tagName, 7 | required this.problemsCount, 8 | }); 9 | } -------------------------------------------------------------------------------- /lib/home/model/cf_rating_model.dart: -------------------------------------------------------------------------------- 1 | class CFRatingModel{ 2 | int contestId; 3 | String contestName; 4 | DateTime date; 5 | String handle; 6 | int rank; 7 | int oldRating; 8 | int newRating; 9 | 10 | CFRatingModel({ 11 | required this.contestId, 12 | required this.contestName, 13 | required this.date, 14 | required this.handle, 15 | required this.rank, 16 | required this.oldRating, 17 | required this.newRating 18 | }); 19 | } -------------------------------------------------------------------------------- /lib/home/model/github_language_model.dart: -------------------------------------------------------------------------------- 1 | class Language{ 2 | String color; 3 | String name; 4 | int number; 5 | 6 | Language({ 7 | required this.color, 8 | required this.name, 9 | required this.number, 10 | }); 11 | } -------------------------------------------------------------------------------- /lib/home/model/lc_contest_model.dart: -------------------------------------------------------------------------------- 1 | class LCContest{ 2 | int problemSolved; 3 | int totalProblems; 4 | double rating; 5 | int ranking; 6 | String title; 7 | DateTime startTime; 8 | 9 | LCContest({ 10 | required this.problemSolved, 11 | required this.totalProblems, 12 | required this.rating, 13 | required this.ranking, 14 | required this.title, 15 | required this.startTime, 16 | }); 17 | 18 | } -------------------------------------------------------------------------------- /lib/home/model/lc_language_model.dart: -------------------------------------------------------------------------------- 1 | class LCLanguage{ 2 | String languageName; 3 | int problemsSolved; 4 | 5 | LCLanguage({ 6 | required this.languageName, 7 | required this.problemsSolved 8 | }); 9 | 10 | } -------------------------------------------------------------------------------- /lib/home/model/lc_stats_model.dart: -------------------------------------------------------------------------------- 1 | class LCStats{ 2 | int totalProblemsSolved; 3 | int easyProblemsSolved; 4 | int mediumProblemsSolved; 5 | int hardProblemsSolved; 6 | int problemsTotal; 7 | int easyTotal; 8 | int mediumTotal; 9 | int hardTotal; 10 | 11 | LCStats({ 12 | required this.totalProblemsSolved, 13 | required this.easyProblemsSolved, 14 | required this.mediumProblemsSolved, 15 | required this.hardProblemsSolved, 16 | required this.problemsTotal, 17 | required this.easyTotal, 18 | required this.mediumTotal, 19 | required this.hardTotal 20 | }); 21 | } -------------------------------------------------------------------------------- /lib/home/model/lc_tags_model.dart: -------------------------------------------------------------------------------- 1 | class LCTagsModel{ 2 | String tagName; 3 | String tagSlug; 4 | int problemsCount; 5 | 6 | LCTagsModel({ 7 | required this.tagName, 8 | required this.tagSlug, 9 | required this.problemsCount, 10 | }); 11 | } -------------------------------------------------------------------------------- /lib/home/view/edit_bio_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:graphql_flutter/graphql_flutter.dart'; 3 | import 'package:programmerprofile/home/controller/client.dart'; 4 | import 'package:programmerprofile/home/view/temp_home.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | import 'package:simple_markdown_editor/simple_markdown_editor.dart'; 7 | 8 | import '../controller/queries.dart'; 9 | 10 | class EditorScreen extends StatefulWidget { 11 | final String? initialData; 12 | const EditorScreen({Key? key, this.initialData}) : super(key: key); 13 | static const routeName = 'editor_screen'; 14 | @override 15 | EditorScreenState createState() => EditorScreenState(); 16 | } 17 | 18 | class EditorScreenState extends State { 19 | final TextEditingController _controller = TextEditingController(); 20 | @override 21 | void initState() { 22 | _controller.text = widget.initialData == null? "" : widget.initialData!; 23 | super.initState(); 24 | } 25 | 26 | void onBioSubmitted(String bio)async{ 27 | final prefs = await SharedPreferences.getInstance(); 28 | final String token = prefs.getString("token")!; 29 | final EndPointGithubAuth point = EndPointGithubAuth(); 30 | ValueNotifier client = point.getClientGithub(token); 31 | 32 | QueryResult result = await client.value.mutate(MutationOptions( 33 | document: gql(DashBoardQueries.addDescription()), 34 | variables: { 35 | "input": { 36 | "description": bio 37 | } 38 | } 39 | )); 40 | 41 | if (result.hasException) { 42 | if (!mounted) return null; 43 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 44 | behavior: SnackBarBehavior.floating, 45 | padding: const EdgeInsets.all(15), 46 | margin: const EdgeInsets.all(20), 47 | backgroundColor: Colors.red, 48 | content: 49 | Text(result.exception!.graphqlErrors[0].message.toString()))); 50 | //_passwordCon.clear(); 51 | 52 | if (result.exception!.graphqlErrors.isEmpty) { 53 | //print("Internet is not found"); 54 | 55 | } else { 56 | //print(result.exception!.graphqlErrors[0].message.toString()); 57 | } 58 | } else { 59 | //print(result.data); 60 | if (!mounted) return; 61 | Navigator.pushReplacementNamed(context, Home.routeName); 62 | } 63 | return null; 64 | 65 | } 66 | 67 | @override 68 | void dispose() { 69 | _controller.dispose(); 70 | super.dispose(); 71 | } 72 | 73 | @override 74 | Widget build(BuildContext context) { 75 | return Scaffold( 76 | appBar: AppBar( 77 | title: const Text("Markdown Editor"), 78 | actions: [ 79 | IconButton( 80 | onPressed: () { 81 | onBioSubmitted(_controller.text); 82 | }, 83 | icon: const Icon(Icons.save), 84 | ), 85 | ], 86 | ), 87 | body: SafeArea( 88 | child: Column( 89 | children: [ 90 | Expanded( 91 | child: MarkdownFormField( 92 | controller: _controller, 93 | enableToolBar: true, 94 | emojiConvert: true, 95 | autoCloseAfterSelectEmoji: false, 96 | ), 97 | ), 98 | ], 99 | ), 100 | ), 101 | ); 102 | } 103 | } -------------------------------------------------------------------------------- /lib/home/view/widgets/codeforces_graphs.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | import 'package:programmerprofile/home/model/cf_rating_model.dart'; 4 | import 'package:syncfusion_flutter_charts/charts.dart'; 5 | import '../../model/cf_bar_model.dart'; 6 | import '../../model/cf_donut_model.dart'; 7 | 8 | class CodeforcesGraphs extends StatefulWidget { 9 | final List donutGraphData; 10 | final List barGraphData; 11 | final List ratingGraphData; 12 | const CodeforcesGraphs( 13 | {required this.donutGraphData, 14 | required this.barGraphData, 15 | required this.ratingGraphData, 16 | super.key}); 17 | 18 | @override 19 | State createState() => _CodeforcesGraphsState(); 20 | } 21 | 22 | class _CodeforcesGraphsState extends State { 23 | late TooltipBehavior _tooltip; 24 | late TooltipBehavior _tooltip1; 25 | late TooltipBehavior _tooltip2; 26 | 27 | @override 28 | void initState() { 29 | _tooltip = TooltipBehavior(enable: true); 30 | _tooltip1 = TooltipBehavior(enable: true, header: "Rating"); 31 | _tooltip2 = TooltipBehavior(enable: true, header: "Rating"); 32 | super.initState(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Column( 38 | children: [ 39 | const Padding( 40 | padding: EdgeInsets.all(8.0), 41 | child: Text("Codeforces Analysis", 42 | style: TextStyle(color: Colors.white, fontSize: 20)), 43 | ), 44 | SfCircularChart( 45 | tooltipBehavior: _tooltip, 46 | legend: Legend(isVisible: true, textStyle: const TextStyle(color: Colors.white)), 47 | series: >[ 48 | DoughnutSeries( 49 | dataSource: widget.donutGraphData, 50 | xValueMapper: (CFDonutModel data, _) => data.tagName, 51 | yValueMapper: (CFDonutModel data, _) => data.problemsCount, 52 | ) 53 | ]), 54 | SfCartesianChart( 55 | primaryXAxis: CategoryAxis( 56 | majorGridLines: const MajorGridLines(width: 0), 57 | ), 58 | primaryYAxis: NumericAxis( 59 | majorGridLines: const MajorGridLines(width: 0), 60 | ), 61 | tooltipBehavior: _tooltip1, 62 | 63 | series: >[ 64 | ColumnSeries( 65 | dataSource: widget.barGraphData, 66 | xValueMapper: (CFBarModel data, _) { 67 | return data.rating; 68 | }, 69 | yValueMapper: (CFBarModel data, _) { 70 | return data.problemsCount; 71 | }, 72 | ) 73 | ]), 74 | SfCartesianChart( 75 | tooltipBehavior: _tooltip2, 76 | primaryYAxis: NumericAxis( 77 | majorGridLines: const MajorGridLines(width: 0), 78 | axisLine: const AxisLine(width: 0), 79 | ), 80 | primaryXAxis: DateTimeAxis( 81 | dateFormat: DateFormat("yyyy-MM-dd"), 82 | majorGridLines: const MajorGridLines(width: 0), 83 | axisLine: const AxisLine(width: 0), 84 | ), 85 | series: [ 86 | LineSeries( 87 | dataSource: widget.ratingGraphData, 88 | xValueMapper: (CFRatingModel data, _) => data.date, 89 | yValueMapper: (CFRatingModel data, _) => data.newRating) 90 | ], 91 | ), 92 | ], 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/home/view/widgets/drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_zoom_drawer/config.dart'; 3 | import 'package:flutter_zoom_drawer/flutter_zoom_drawer.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | import 'package:lottie/lottie.dart'; 6 | import 'package:programmerprofile/auth/controller/auth.dart'; 7 | import 'package:programmerprofile/auth/view/login_page.dart'; 8 | import 'package:programmerprofile/contests/view/contest_page.dart'; 9 | import 'package:programmerprofile/home/view/profile_page.dart'; 10 | // import 'package:programmerprofile/home/view/temp_home.dart'; 11 | import 'package:programmerprofile/userSearch/view/search_page.dart'; 12 | 13 | class DrawerTemplate extends StatefulWidget { 14 | final Widget body; 15 | final ZoomDrawerController z; 16 | const DrawerTemplate({Key? key, required this.body, required this.z}) 17 | : super(key: key); 18 | @override 19 | DrawerTemplateState createState() => DrawerTemplateState(); 20 | } 21 | 22 | class DrawerTemplateState extends State { 23 | bool isLoading = false; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return ZoomDrawer( 28 | controller: widget.z, 29 | borderRadius: 24, 30 | openCurve: Curves.fastOutSlowIn, 31 | slideWidth: MediaQuery.of(context).size.width * 0.65, 32 | duration: const Duration(milliseconds: 500), 33 | angle: 0.0, 34 | menuBackgroundColor: const Color.fromRGBO(0, 10, 56, 1), 35 | mainScreen: widget.body, 36 | menuScreen: Stack(children: [ 37 | Center( 38 | child: LottieBuilder.asset( 39 | "assets/animations/bg-1.json", 40 | ), 41 | ), 42 | Center( 43 | child: Column( 44 | mainAxisAlignment: MainAxisAlignment.center, 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | mainAxisSize: MainAxisSize.max, 47 | children: [ 48 | // Padding( 49 | // padding: const EdgeInsets.all(8.0), 50 | // child: TextButton.icon( 51 | // onPressed: (){ 52 | // // print("CLOSE"); 53 | // widget.z.close; 54 | // }, 55 | // icon: const FaIcon(FontAwesomeIcons.houseUser, 56 | // color: Colors.white), 57 | // label: const Text("Home")), 58 | // ), 59 | ListTile( 60 | leading: 61 | const FaIcon(FontAwesomeIcons.trophy, color: Colors.white), 62 | title: const Text( 63 | "Contests And Events", 64 | style: TextStyle(color: Colors.white), 65 | ), 66 | onTap: () => 67 | Navigator.pushNamed(context, ContestPage.routeName), 68 | ), 69 | 70 | ListTile( 71 | leading: 72 | const FaIcon(FontAwesomeIcons.user, color: Colors.white), 73 | title: const Text( 74 | "Profile", 75 | style: TextStyle(color: Colors.white), 76 | ), 77 | onTap: () => 78 | Navigator.pushNamed(context, ProfileScreen.routeName), 79 | ), 80 | ListTile( 81 | leading: 82 | const FaIcon(FontAwesomeIcons.search, color: Colors.white), 83 | title: const Text( 84 | "Search Users", 85 | style: TextStyle(color: Colors.white), 86 | ), 87 | onTap: () => 88 | Navigator.pushNamed(context, SearchUserScreen.routeName), 89 | ), 90 | 91 | ListTile( 92 | leading: const Icon(Icons.logout, color: Colors.white), 93 | title: const Text( 94 | "Logout", 95 | style: TextStyle(color: Colors.white), 96 | ), 97 | onTap: () { 98 | Auth().logout(); 99 | Navigator.pushReplacementNamed( 100 | context, LoginScreen.routeName); 101 | }, 102 | ) 103 | ], 104 | ), 105 | ), 106 | ]), 107 | ); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /lib/home/view/widgets/github_card1.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | import 'package:glassmorphism/glassmorphism.dart'; 4 | 5 | Widget githubCard1( 6 | {required String totalCommits, 7 | required String prs, 8 | required String issues, 9 | required String contributedTo}) { 10 | return GlassmorphicContainer( 11 | width: 350, 12 | height: 200, 13 | borderRadius: 20, 14 | blur: 20, 15 | alignment: Alignment.bottomCenter, 16 | border: 2, 17 | linearGradient: LinearGradient( 18 | begin: Alignment.topLeft, 19 | end: Alignment.bottomRight, 20 | colors: [ 21 | const Color(0xFFffffff).withOpacity(0.1), 22 | const Color(0xFFFFFFFF).withOpacity(0.05), 23 | ], 24 | stops: const [ 25 | 0.1, 26 | 1, 27 | ]), 28 | borderGradient: LinearGradient( 29 | begin: Alignment.topLeft, 30 | end: Alignment.bottomRight, 31 | colors: [ 32 | const Color(0xFFffffff).withOpacity(0.5), 33 | const Color((0xFFFFFFFF)).withOpacity(0.5), 34 | ], 35 | ), 36 | child: Padding( 37 | padding: const EdgeInsets.all(8.0), 38 | child: Row( 39 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 40 | children: [ 41 | Column( 42 | crossAxisAlignment: CrossAxisAlignment.start, 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | children: [ 45 | Padding( 46 | padding: const EdgeInsets.all(8.0), 47 | child: Row( 48 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 49 | children: [ 50 | const Text( 51 | "Total Commits :", 52 | style: TextStyle(color: Colors.white, fontSize: 18), 53 | ), 54 | Text( 55 | totalCommits, 56 | style: const TextStyle(color: Colors.white, fontSize: 18), 57 | ), 58 | ], 59 | ), 60 | ), 61 | Padding( 62 | padding: const EdgeInsets.all(8.0), 63 | child: Text( 64 | "Total PRs : $prs ", 65 | style: const TextStyle(color: Colors.white, fontSize: 18), 66 | ), 67 | ), 68 | Padding( 69 | padding: const EdgeInsets.all(8.0), 70 | child: Text( 71 | "Total Issues : $issues", 72 | style: const TextStyle(color: Colors.white, fontSize: 18), 73 | ), 74 | ), 75 | Padding( 76 | padding: const EdgeInsets.all(8.0), 77 | child: Text( 78 | "Contributed to: $contributedTo", 79 | style: const TextStyle(color: Colors.white, fontSize: 18), 80 | ), 81 | ) 82 | ], 83 | ), 84 | const Padding( 85 | padding: EdgeInsets.all(8.0), 86 | child: FaIcon( 87 | FontAwesomeIcons.github, 88 | color: Colors.white, 89 | size: 100, 90 | ), 91 | ) 92 | ], 93 | ), 94 | ), 95 | ); 96 | } 97 | -------------------------------------------------------------------------------- /lib/home/view/widgets/github_charts.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:programmerprofile/home/view/widgets/github_card1.dart'; 3 | import 'package:programmerprofile/home/view/widgets/github_streak_card.dart'; 4 | import 'package:syncfusion_flutter_charts/charts.dart'; 5 | import '../../model/github_language_model.dart'; 6 | 7 | class GitHubCharts extends StatefulWidget { 8 | final Map data; 9 | final List languagedata; 10 | const GitHubCharts( 11 | {required this.data, required this.languagedata, super.key}); 12 | 13 | @override 14 | State createState() => _GitHubChartsState(); 15 | } 16 | 17 | class _GitHubChartsState extends State { 18 | late TooltipBehavior _tooltip; 19 | @override 20 | void initState() { 21 | _tooltip = TooltipBehavior(enable: true); 22 | super.initState(); 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Column( 28 | children: [ 29 | const Padding( 30 | padding: EdgeInsets.all(8.0), 31 | child: Text("Github Analysis", 32 | style: TextStyle(color: Colors.white, fontSize: 20)), 33 | ), 34 | Column( 35 | children: [ 36 | githubCard1( 37 | totalCommits: widget.data["commits"]!, 38 | prs: widget.data["pullRequests"]!, 39 | issues: widget.data["issues"]!, 40 | contributedTo: widget.data["contributedTo"]!), 41 | Padding( 42 | padding: const EdgeInsets.only(top: 8.0, bottom: 8.0), 43 | child: GithubStreakGraph( 44 | currentStreakLength: widget.data["currentStreakLength"] ?? "0", 45 | longestStreakLength: widget.data["longestStreakLength"] ?? "0", 46 | currentStreakStartDate: widget.data["currentStreakStartDate"]!, 47 | longestStreakStartDate: widget.data["longestStreakStartDate"]!, 48 | longestStreakEndDate: widget.data["longestStreakEndDate"]!, 49 | ), 50 | ), 51 | SfCircularChart( 52 | legend: Legend( 53 | isVisible: true, 54 | textStyle: const TextStyle(color: Colors.white)), 55 | tooltipBehavior: _tooltip, 56 | series: >[ 57 | DoughnutSeries( 58 | dataSource: widget.languagedata, 59 | xValueMapper: (Language data, _) => data.name, 60 | yValueMapper: (Language data, _) => data.number, 61 | ) 62 | ]), 63 | ], 64 | ), 65 | ], 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/home/view/widgets/github_streak_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glassmorphism/glassmorphism.dart'; 3 | 4 | class GithubStreakGraph extends StatelessWidget { 5 | final String currentStreakLength; 6 | final String longestStreakLength; 7 | final String currentStreakStartDate; 8 | final String longestStreakStartDate; 9 | final String longestStreakEndDate; 10 | 11 | const GithubStreakGraph( 12 | {super.key, 13 | required this.currentStreakLength, 14 | required this.longestStreakLength, 15 | required this.currentStreakStartDate, 16 | required this.longestStreakStartDate, 17 | required this.longestStreakEndDate}); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return GlassmorphicContainer( 22 | width: 350, 23 | height: 200, 24 | borderRadius: 20, 25 | blur: 20, 26 | alignment: Alignment.bottomCenter, 27 | border: 2, 28 | linearGradient: LinearGradient( 29 | begin: Alignment.topLeft, 30 | end: Alignment.bottomRight, 31 | colors: [ 32 | const Color(0xFFffffff).withOpacity(0.1), 33 | const Color(0xFFFFFFFF).withOpacity(0.05), 34 | ], 35 | stops: const [ 36 | 0.1, 37 | 1, 38 | ]), 39 | borderGradient: LinearGradient( 40 | begin: Alignment.topLeft, 41 | end: Alignment.bottomRight, 42 | colors: [ 43 | const Color(0xFFffffff).withOpacity(0.5), 44 | const Color((0xFFFFFFFF)).withOpacity(0.5), 45 | ], 46 | ), 47 | child: Padding( 48 | padding: const EdgeInsets.all(8.0), 49 | child: Row( 50 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 51 | children: [ 52 | Column( 53 | crossAxisAlignment: CrossAxisAlignment.start, 54 | mainAxisAlignment: MainAxisAlignment.center, 55 | children: [ 56 | Padding( 57 | padding: const EdgeInsets.all(8.0), 58 | child: Text( 59 | "Current Streak: \n\n${currentStreakStartDate.substring(0, 10)} length: $currentStreakLength ", 60 | style: const TextStyle(color: Colors.white, fontSize: 18), 61 | ), 62 | ), 63 | // Padding( 64 | // padding: const EdgeInsets.all(8.0), 65 | // child: Text( 66 | // "Current Streak Length $currentStreakLength", 67 | // style: const TextStyle(color: Colors.white, fontSize: 18), 68 | // ), 69 | // ), 70 | Padding( 71 | padding: const EdgeInsets.all(8.0), 72 | child: Text( 73 | "Longest Streak \n\n${longestStreakStartDate.substring(0, 10)} - ${longestStreakEndDate.substring(0, 10)} $longestStreakLength days", 74 | style: const TextStyle(color: Colors.white, fontSize: 18), 75 | ), 76 | ), 77 | // Padding( 78 | // padding: const EdgeInsets.all(8.0), 79 | // child: Text( 80 | // "Longest Streak End Date ${longestStreakEndDate.substring(0, 10)}", 81 | // style: const TextStyle(color: Colors.white, fontSize: 18), 82 | // ), 83 | // ), 84 | // Padding( 85 | // padding: const EdgeInsets.all(8.0), 86 | // child: Text( 87 | // "Longest Streak length $longestStreakLength", 88 | // style: const TextStyle(color: Colors.white, fontSize: 18), 89 | // ), 90 | // ) 91 | ], 92 | ), 93 | ], 94 | ), 95 | ), 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/home/view/widgets/image_input.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:dio/dio.dart'; 3 | import 'package:flutter/material.dart'; 4 | // ignore: depend_on_referenced_packages 5 | import 'package:http_parser/http_parser.dart'; 6 | import 'package:image_picker/image_picker.dart'; 7 | import 'package:mime_type/mime_type.dart'; 8 | import 'package:shared_preferences/shared_preferences.dart'; 9 | 10 | class ImageInput extends StatefulWidget { 11 | //final Function onSelectImage; 12 | final String? url; 13 | const ImageInput({required this.url, super.key}); 14 | 15 | @override 16 | ImageInputState createState() => ImageInputState(); 17 | } 18 | 19 | class ImageInputState extends State { 20 | File? _storedImage; 21 | 22 | void _upload(File file, String token) async { 23 | String fileName = file.path.split('/').last; 24 | //print(fileName); 25 | 26 | String url = 27 | "https://graphenous.azurewebsites.net/api/upload/profile-picture"; 28 | 29 | String mimeType = mime(fileName)!; 30 | String mimee = mimeType.split('/')[0]; 31 | String type = mimeType.split('/')[1]; 32 | // print("API Call"); 33 | Dio dio = Dio(); 34 | dio.options.headers["Content-Type"] = "multipart/form-data"; 35 | dio.options.headers["Authorization"] = "Bearer $token"; 36 | FormData formData = FormData.fromMap({ 37 | 'file': await MultipartFile.fromFile(file.path, 38 | filename: fileName, contentType: MediaType(mimee, type)) 39 | }); 40 | dio.post(url, data: formData).then((response) { 41 | // print("Lol"); 42 | // print(response.toString()); 43 | }).catchError((e) {}); 44 | } 45 | 46 | Future _takePicture() async { 47 | final imageFile = await ImagePicker() 48 | .pickImage(source: ImageSource.gallery, maxWidth: 600); 49 | setState(() { 50 | // print("am setting state here"); 51 | _storedImage = File(imageFile!.path); 52 | }); 53 | 54 | if (imageFile == null) { 55 | return; 56 | } 57 | 58 | final prefs = await SharedPreferences.getInstance(); 59 | final String token = prefs.getString("token")!; 60 | // print(token); 61 | //Upload to api 62 | // print("API UPload"); 63 | _upload(File(imageFile.path), token); 64 | } 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | return Padding( 69 | padding: const EdgeInsets.all(15.0), 70 | child: Stack( 71 | alignment: AlignmentDirectional.bottomEnd, 72 | children: [ 73 | Container( 74 | width: 100, 75 | height: 100, 76 | alignment: Alignment.center, 77 | decoration: const BoxDecoration( 78 | borderRadius: BorderRadius.all(Radius.circular(200))), 79 | //decoration: BoxDecoration(border: Border.all(width: 1)), 80 | child: _storedImage != null 81 | ? Container( 82 | decoration: BoxDecoration( 83 | image: DecorationImage( 84 | image: FileImage( 85 | _storedImage! 86 | ) 87 | ), 88 | borderRadius: 89 | const BorderRadius.all(Radius.circular(200))), 90 | // child: Image.file( 91 | // _storedImage!, 92 | // fit: BoxFit.fill, 93 | // width: double.infinity, 94 | 95 | // ), 96 | ) 97 | : (widget.url == null 98 | ? const CircleAvatar( 99 | backgroundColor: Colors.white, 100 | foregroundColor: Color.fromRGBO(0, 10, 56, 1), 101 | radius: 50, 102 | child: Icon(Icons.person, size: 50)) 103 | : Container( 104 | decoration: BoxDecoration( 105 | image: DecorationImage( 106 | image: NetworkImage(widget.url!)), 107 | borderRadius: 108 | const BorderRadius.all(Radius.circular(200))), 109 | )), 110 | ), 111 | IconButton( 112 | onPressed: _takePicture, 113 | icon: const Icon(Icons.edit, color: Colors.white)) 114 | ], 115 | ), 116 | ); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /lib/home/view/widgets/lc_tags_chart.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:syncfusion_flutter_charts/charts.dart'; 3 | 4 | import '../../model/lc_contest_model.dart'; 5 | import '../../model/lc_language_model.dart'; 6 | import '../../model/lc_tags_model.dart'; 7 | 8 | class LCTagsGraph extends StatefulWidget { 9 | final List tags; 10 | final List contests; 11 | final List languagedata; 12 | const LCTagsGraph( 13 | {required this.tags, 14 | required this.contests, 15 | required this.languagedata, 16 | super.key}); 17 | @override 18 | State createState() => _LCTagsGraphState(); 19 | } 20 | 21 | class _LCTagsGraphState extends State { 22 | late TooltipBehavior _tooltip; 23 | late TooltipBehavior _tooltip1; 24 | late TooltipBehavior _tooltip2; 25 | @override 26 | initState() { 27 | super.initState(); 28 | _tooltip = TooltipBehavior(enable: true); 29 | _tooltip1 = TooltipBehavior(enable: true, header: "Rating"); 30 | _tooltip2 = TooltipBehavior(enable: true); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Column( 36 | children: [ 37 | const Padding( 38 | padding: EdgeInsets.all(8.0), 39 | child: Text("Leetcode Analysis", 40 | style: TextStyle(color: Colors.white, fontSize: 20)), 41 | ), 42 | SfCircularChart( 43 | tooltipBehavior: _tooltip2, 44 | legend: Legend( 45 | isVisible: true, 46 | textStyle: const TextStyle(color: Colors.white)), 47 | series: >[ 48 | DoughnutSeries( 49 | dataSource: widget.languagedata, 50 | xValueMapper: (data, _) => data.languageName, 51 | yValueMapper: (data, _) => data.problemsSolved, 52 | ) 53 | ]), 54 | SfCircularChart( 55 | tooltipBehavior: _tooltip, 56 | legend: Legend( 57 | isVisible: true, 58 | textStyle: const TextStyle(color: Colors.white)), 59 | series: >[ 60 | DoughnutSeries( 61 | dataSource: widget.tags, 62 | xValueMapper: (data, _) => data.tagName, 63 | yValueMapper: (data, _) => data.problemsCount, 64 | ) 65 | ]), 66 | SfCartesianChart( 67 | primaryXAxis: DateTimeAxis( 68 | majorGridLines: const MajorGridLines(width: 0), 69 | axisLine: const AxisLine(width: 0), 70 | ), 71 | primaryYAxis: NumericAxis( 72 | majorGridLines: const MajorGridLines(width: 0), 73 | axisLine: const AxisLine(width: 0)), 74 | tooltipBehavior: _tooltip1, 75 | series: >[ 76 | // Renders line chart 77 | LineSeries( 78 | dataSource: widget.contests, 79 | xValueMapper: (data, _) => data.startTime, 80 | yValueMapper: (data, _) => data.rating) 81 | ]), 82 | // SfCartesianChart( 83 | // tooltipBehavior: _tooltip1, 84 | // primaryXAxis: DateTimeAxis(), 85 | // series: [ 86 | // LineSeries( 87 | // dataSource: widget.contests, 88 | // xValueMapper: (data, _) => data.startTime, 89 | // yValueMapper: (data, _) => data.rating) 90 | // ], 91 | // ), 92 | ], 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:programmerprofile/auth/view/forgot_password_page.dart'; 3 | import 'package:programmerprofile/auth/view/sign_up_page.dart'; 4 | import 'package:programmerprofile/home/controller/user_provider.dart'; 5 | import 'package:programmerprofile/home/view/profile_page.dart'; 6 | //import 'package:programmerprofile/home/view/temp_home2.dart'; 7 | import 'package:programmerprofile/splash.dart'; 8 | import 'package:programmerprofile/home/view/temp_home.dart'; 9 | import 'package:programmerprofile/userSearch/view/search_page.dart'; 10 | import 'package:provider/provider.dart'; 11 | //import 'package:shared_preferences/shared_preferences.dart'; 12 | import 'auth/view/login_page.dart'; 13 | import 'auth/view/onboarding_page.dart'; 14 | import 'contests/view/contest_page.dart'; 15 | 16 | 17 | void main(){ 18 | WidgetsFlutterBinding.ensureInitialized(); 19 | runApp(const MyApp()); 20 | } 21 | class MyApp extends StatelessWidget { 22 | const MyApp({Key? key}) : super(key: key); 23 | // This widget is the root of your application. 24 | @override 25 | Widget build(BuildContext context) { 26 | return MaterialApp( 27 | title: 'Programmer Profile', 28 | home:MultiProvider( 29 | providers: [ 30 | ChangeNotifierProvider(create: (_)=> UserProvider()) 31 | ], 32 | child: const SplashScreen() 33 | ),//OnboardingPage(),//SplashScreen(), 34 | theme: ThemeData( 35 | // textTheme: const TextTheme( 36 | // titleSmall: 37 | // ) 38 | ), 39 | routes: { 40 | // '/': (ctx) => SplashScreen(), 41 | OnboardingPage.routeName : (ctx) => OnboardingPage(), 42 | SignUpScreen.routeName : (ctx) => const SignUpScreen(), 43 | LoginScreen.routeName : (ctx) => const LoginScreen(), 44 | ForgotPasswordScreen.routeName : (ctx) => const ForgotPasswordScreen(), 45 | Home.routeName : (ctx) => ChangeNotifierProvider( 46 | create: (_)=> UserProvider(), 47 | child: const Home() 48 | ), 49 | //MyHomePage.routeName : (ctx) => MyHomePage(), 50 | ProfileScreen.routeName : (ctx) => const ProfileScreen(), 51 | SearchUserScreen.routeName : (ctx) => const SearchUserScreen(), 52 | ContestPage.routeName : (ctx) => const ContestPage(), 53 | }, 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/notifications/controller/api.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:graphql_flutter/graphql_flutter.dart'; 3 | import 'package:programmerprofile/notifications/controller/queries.dart'; 4 | import 'package:programmerprofile/notifications/model/notifications.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | 7 | import '../../home/controller/client.dart'; 8 | 9 | class NotificationAPIs { 10 | Future?> getNotifications() async { 11 | final prefs = await SharedPreferences.getInstance(); 12 | final String token = prefs.getString("token")!; 13 | 14 | Map data = {}; 15 | 16 | final EndPointGithubAuth point = EndPointGithubAuth(); 17 | ValueNotifier client = point.getClientGithub(token); 18 | QueryResult result = await client.value.mutate(MutationOptions( 19 | document: gql(NotificationQuery.notifications()), 20 | )); 21 | 22 | if (result.hasException) { 23 | //print("Notification DED"); 24 | 25 | if (result.exception!.graphqlErrors.isEmpty) { 26 | //print("Internet is not found"); 27 | } else { 28 | //print(result.exception!.graphqlErrors[0].message.toString()); 29 | } 30 | } else { 31 | //print("Notification Success"); 32 | //print(result.data); 33 | 34 | List notifications = []; 35 | for (var x in result.data!["notifications"]["notifications"]) { 36 | //print( x["User"]["id"] + " "+x["User"]["name"]+" "+x["User"]["profilePicture"]); 37 | //print(x["OtherUser"].toString()); 38 | //print(x["OtherUser"]["id"] + " "+x["OtherUser"]["name"]+" "+x["OtherUser"]["profilePicture"]); 39 | notifications.add(NotificationModel( 40 | id: x["id"], 41 | description: x["description"], 42 | //createdAt: DateTime.parse(x["createdAt"].toString()), 43 | //seenAt: DateTime.parse(x["seenAt"].toString()), 44 | notificationType: x["notificationType"], 45 | status: x["seenStatus"], 46 | user: NotificationUser( 47 | id: x["User"]["id"], 48 | name: x["User"]["name"], 49 | profile: x["User"]["profilePicture"], 50 | description: x["User"]["description"], 51 | ), 52 | otherUser: NotificationUser( 53 | id: x["OtherUser"]["id"], 54 | name: x["OtherUser"]["name"], 55 | profile: x["OtherUser"]["profilePicture"], 56 | description: x["OtherUser"]["description"]), 57 | )); 58 | } 59 | //print("here"); 60 | //print(notifications.toString()); 61 | data.putIfAbsent("notifications", () => notifications); 62 | data.putIfAbsent("unseen-notifications", 63 | () => result.data!["notifications"]["unseenNotifications"]); 64 | return data; 65 | } 66 | return null; 67 | //Navigator.pushReplacementNamed(context, Home.routeName); 68 | } 69 | 70 | Future markAsRead(String notificationID) async { 71 | final prefs = await SharedPreferences.getInstance(); 72 | final String token = prefs.getString("token")!; 73 | 74 | final EndPointGithubAuth point = EndPointGithubAuth(); 75 | ValueNotifier client = point.getClientGithub(token); 76 | QueryResult result = await client.value.mutate(MutationOptions( 77 | document: gql(NotificationQuery.seeNotifications()), 78 | variables: { 79 | "input": { 80 | "notificationId": notificationID 81 | } 82 | } 83 | )); 84 | 85 | if (result.hasException) { 86 | //print("Notification DED"); 87 | 88 | if (result.exception!.graphqlErrors.isEmpty) { 89 | //print("Internet is not found"); 90 | } else { 91 | //print(result.exception!.graphqlErrors[0].message.toString()); 92 | } 93 | } else { 94 | //print("Notification Success"); 95 | //print(result.data); 96 | //print("Notification Success"); 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/notifications/controller/queries.dart: -------------------------------------------------------------------------------- 1 | class NotificationQuery { 2 | static String notifications() { 3 | return """ 4 | query Notifications { 5 | notifications { 6 | notifications { 7 | id 8 | description 9 | createdAt 10 | seenAt 11 | seenStatus 12 | User { 13 | id 14 | name 15 | profilePicture 16 | description 17 | } 18 | notificationType 19 | OtherUser { 20 | id 21 | name 22 | profilePicture 23 | description 24 | } 25 | } 26 | unseenNotifications 27 | } 28 | } 29 | 30 | """; 31 | } 32 | 33 | static String seeNotifications() { 34 | return """ 35 | mutation SeeNotification(\$input: SeeNotificationInput!) { 36 | seeNotification(input: \$input) 37 | } 38 | 39 | """; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/notifications/model/notifications.dart: -------------------------------------------------------------------------------- 1 | class NotificationModel{ 2 | String id; 3 | String description; 4 | //DateTime createdAt; 5 | String notificationType; 6 | bool status; 7 | //DateTime? seenAt; 8 | NotificationUser user; 9 | NotificationUser otherUser; 10 | 11 | NotificationModel({ 12 | required this.id, 13 | required this.description, 14 | //required this.createdAt, 15 | required this.notificationType, 16 | required this.status, 17 | //this.seenAt, 18 | required this.user, 19 | required this.otherUser 20 | }); 21 | } 22 | 23 | class NotificationUser{ 24 | String id; 25 | String name; 26 | String? profile; 27 | String? description; 28 | NotificationUser({ 29 | required this.id, 30 | required this.name, 31 | this.profile, 32 | this.description, 33 | }); 34 | } -------------------------------------------------------------------------------- /lib/notifications/view/notification_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | import 'package:programmerprofile/userSearch/view/new_user_page.dart'; 4 | import '../controller/api.dart'; 5 | import '../model/notifications.dart'; 6 | 7 | class NotificationScreen extends StatefulWidget { 8 | final List notifcations; 9 | const NotificationScreen({super.key, required this.notifcations}); 10 | 11 | @override 12 | State createState() => _NotificationScreenState(); 13 | } 14 | 15 | class _NotificationScreenState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | //print(widget.notifcations.isEmpty) 19 | return Scaffold( 20 | appBar: AppBar( 21 | backgroundColor: Colors.transparent, 22 | title: const Text("Notification"), 23 | leading: BackButton( 24 | color: Colors.white, 25 | onPressed: () { 26 | //Navigator.pushReplacementNamed( 27 | // context, Home.routeName); 28 | Navigator.pop(context); 29 | }, 30 | ), 31 | ), 32 | backgroundColor: const Color.fromRGBO(0, 10, 56, 1), 33 | body: SafeArea( 34 | child: Stack( 35 | children: [ 36 | LottieBuilder.asset("assets/animations/bg-1.json"), 37 | widget.notifcations.isNotEmpty 38 | ? Column( 39 | children: [ 40 | Padding( 41 | padding: const EdgeInsets.all(8.0), 42 | child: ListView.builder( 43 | shrinkWrap: true, 44 | itemCount: widget.notifcations.length, 45 | itemBuilder: (ctx, index) { 46 | return ListTile( 47 | tileColor: Colors.white, 48 | title: Text( 49 | widget.notifcations[index].description), 50 | leading: widget.notifcations[index] 51 | .otherUser.profile != 52 | null 53 | ? Image.network(widget 54 | .notifcations[index] 55 | .otherUser 56 | .profile!) 57 | : const Icon(Icons.person), 58 | trailing: SizedBox( 59 | height: 40, 60 | width: 40, 61 | child: IconButton( 62 | onPressed: () { 63 | //print("mark as read"); 64 | NotificationAPIs().markAsRead( 65 | widget.notifcations[index].id); 66 | }, 67 | icon: const Icon(Icons.check_circle), 68 | ), 69 | ), 70 | onTap: () { 71 | Navigator.push( 72 | ctx, 73 | MaterialPageRoute( 74 | builder: ((context) => 75 | NewUserScreen( 76 | id: widget 77 | .notifcations[index] 78 | .otherUser 79 | .id, 80 | name: widget 81 | .notifcations[index] 82 | .otherUser 83 | .name, 84 | profilepic: widget 85 | .notifcations[index] 86 | .otherUser 87 | .profile, 88 | description: widget 89 | .notifcations[index] 90 | .otherUser 91 | .description, 92 | isFollowing: true)))); 93 | }); 94 | }), 95 | ) 96 | ], 97 | ) 98 | : Column( 99 | mainAxisAlignment: MainAxisAlignment.center, 100 | children: [ 101 | Center( 102 | child: LottieBuilder.asset( 103 | "assets/images/4021-no-notification-state.json", 104 | height: 250), 105 | ), 106 | const Text( 107 | 'No notifications for now', 108 | style: TextStyle( 109 | color: Colors.white, 110 | fontSize: 20, 111 | ), 112 | ), 113 | ], 114 | ), 115 | ], 116 | ), 117 | )); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /lib/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:programmerprofile/home/view/temp_home.dart'; 3 | //import 'package:programmerprofile/home/view/temp_home2.dart'; 4 | import 'package:shared_preferences/shared_preferences.dart'; 5 | import 'auth/view/login_page.dart'; 6 | import 'auth/view/onboarding_page.dart'; 7 | 8 | class SplashScreen extends StatefulWidget { 9 | const SplashScreen({Key? key}) : super(key: key); 10 | static const String routeName = "/splashScreen"; 11 | @override 12 | Splash createState() => Splash(); 13 | } 14 | 15 | class Splash extends State { 16 | Future checkFirstSeen() async { 17 | SharedPreferences prefs = await SharedPreferences.getInstance(); 18 | bool seen = (prefs.getBool('seen') ?? false); 19 | //print(_seen); 20 | 21 | if (seen) { 22 | _handleStartScreen(); 23 | if (!mounted) return; 24 | Navigator.pushReplacementNamed(context, LoginScreen.routeName); 25 | } else { 26 | await prefs.setBool('seen', true); 27 | if (!mounted) return; 28 | Navigator.pushReplacementNamed(context, OnboardingPage.routeName); 29 | } 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | backgroundColor:const Color.fromARGB(255, 4, 24, 40), 36 | body: Container() 37 | ); 38 | } 39 | 40 | @override 41 | void initState() { 42 | super.initState(); 43 | checkFirstSeen(); 44 | } 45 | 46 | Future _handleStartScreen() async { 47 | final prefs = await SharedPreferences.getInstance(); 48 | //print(prefs.toString()); 49 | // print(prefs.getString('token')); 50 | if (!mounted) return; 51 | if (prefs.getString('token') == null) { 52 | Navigator.popAndPushNamed(context, LoginScreen.routeName); 53 | } else { 54 | // await Provider.of(context, listen: false).getUserData(); 55 | // await Provider.of(context, listen: false).getHeatMapData(); 56 | // await Provider.of(context, listen: false).getCFData(); 57 | // await Provider.of(context, listen: false).getGithubData(); 58 | // await Provider.of(context, listen: false).getLeetCodeData(); 59 | //print("fetched eveything moving on"); 60 | Navigator.popAndPushNamed(context, Home.routeName); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/styles.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Styles { 4 | static const githubColor = Color.fromARGB(255, 40, 136, 171); 5 | static final expansionColor = Colors.pink[400]; 6 | static InputDecoration textFieldStyle(String hintText) { 7 | return InputDecoration( 8 | border: OutlineInputBorder( 9 | borderRadius: BorderRadius.circular(10), 10 | borderSide: const BorderSide(color: Colors.white)), 11 | filled: true, 12 | fillColor: Colors.white, 13 | hintText: hintText); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/userSearch/controller/queries.dart: -------------------------------------------------------------------------------- 1 | class SearchQuery { 2 | static String searchQuery() { 3 | return """ 4 | query Search(\$input: SearchInput!) { 5 | search(input: \$input) { 6 | id 7 | name 8 | email 9 | profilePicture 10 | description 11 | isFollowing 12 | } 13 | } 14 | """; 15 | } 16 | 17 | static String toggleFollow(){ 18 | return """ 19 | mutation ToggleFollow(\$input: ToggleFollowInput!) { 20 | toggleFollow(input: \$input) 21 | } 22 | """; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/userSearch/model/search_result.dart: -------------------------------------------------------------------------------- 1 | class SearchResult { 2 | String id; 3 | String email; 4 | String name; 5 | String? photoUrl; 6 | String? description; 7 | bool isFollowing; 8 | 9 | SearchResult({ 10 | required this.id, 11 | required this.email, 12 | required this.name, 13 | required this.isFollowing, 14 | this.photoUrl, 15 | this.description 16 | }); 17 | 18 | } -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "programmerprofile") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.example.programmerprofile") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | # Generated plugin build rules, which manage building the plugins and adding 90 | # them to the application. 91 | include(flutter/generated_plugins.cmake) 92 | 93 | 94 | # === Installation === 95 | # By default, "installing" just makes a relocatable bundle in the build 96 | # directory. 97 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 98 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 99 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 100 | endif() 101 | 102 | # Start with a clean build bundle directory every time. 103 | install(CODE " 104 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 105 | " COMPONENT Runtime) 106 | 107 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 108 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 109 | 110 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 111 | COMPONENT Runtime) 112 | 113 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 114 | COMPONENT Runtime) 115 | 116 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 117 | COMPONENT Runtime) 118 | 119 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 120 | install(FILES "${bundled_library}" 121 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 122 | COMPONENT Runtime) 123 | endforeach(bundled_library) 124 | 125 | # Fully re-copy the assets directory on each build to avoid having stale files 126 | # from a previous install. 127 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 128 | install(CODE " 129 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 130 | " COMPONENT Runtime) 131 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 132 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 133 | 134 | # Install the AOT library on non-Debug builds only. 135 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 136 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 137 | COMPONENT Runtime) 138 | endif() 139 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 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}/linux 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}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "programmerprofile"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "programmerprofile"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /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/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import connectivity_plus_macos 9 | import path_provider_macos 10 | import shared_preferences_macos 11 | import url_launcher_macos 12 | 13 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 14 | ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) 15 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 16 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 17 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 18 | } 19 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/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 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /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 = programmerprofile 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.programmerprofile 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: programmerprofile 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.17.1 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | # flutter_animate: ^1.0.0 38 | provider: ^6.0.4 39 | # dio: ^4.0.6 40 | # url_launcher: ^6.1.6 41 | # fl_chart: ^0.55.2 42 | # local_auth: ^2.1.2 43 | shared_preferences: ^2.0.15 44 | google_fonts: ^3.0.1 45 | concentric_transition: ^1.0.1+1 46 | lottie: ^1.3.0 47 | graphql_flutter: ^5.1.0 48 | flutter_verification_code: ^1.1.6 49 | flutter_zoom_drawer: ^3.0.3 50 | url_launcher: ^6.1.6 51 | font_awesome_flutter: 52 | flutter_heatmap_calendar: ^1.0.5 53 | intl: ^0.17.0 54 | http: ^0.13.5 55 | image_picker: ^0.8.6 56 | dio: ^4.0.6 57 | flutter_markdown: 58 | simple_markdown_editor: ^0.2.0 59 | mime_type: ^1.0.0 60 | syncfusion_flutter_charts: ^20.3.52 61 | persistent_bottom_nav_bar: ^5.0.2 62 | bottom_navy_bar: ^6.0.0 63 | flutter_cards_reel: ^0.0.2 64 | glassmorphism: ^3.0.0 65 | 66 | 67 | 68 | dev_dependencies: 69 | flutter_test: 70 | sdk: flutter 71 | 72 | # The "flutter_lints" package below contains a set of recommended lints to 73 | # encourage good coding practices. The lint set provided by the package is 74 | # activated in the `analysis_options.yaml` file located at the root of your 75 | # package. See that file for information about deactivating specific lint 76 | # rules and activating additional ones. 77 | flutter_lints: ^2.0.0 78 | 79 | # For information on the generic Dart part of this file, see the 80 | # following page: https://dart.dev/tools/pub/pubspec 81 | 82 | # The following section is specific to Flutter packages. 83 | flutter: 84 | 85 | # The following line ensures that the Material Icons font is 86 | # included with your application, so that you can use the icons in 87 | # the material Icons class. 88 | uses-material-design: true 89 | 90 | # To add assets to your application, add an assets section, like this: 91 | assets: 92 | - assets/images/ 93 | - assets/animations/ 94 | # - images/a_dot_ham.jpeg 95 | 96 | # An image asset can refer to one or more resolution-specific "variants", see 97 | # https://flutter.dev/assets-and-images/#resolution-aware 98 | 99 | # For details regarding adding assets from package dependencies, see 100 | # https://flutter.dev/assets-and-images/#from-packages 101 | 102 | # To add custom fonts to your application, add a fonts section here, 103 | # in this "flutter" section. Each entry in this list should have a 104 | # "family" key with the font family name, and a "fonts" key with a 105 | # list giving the asset and other descriptors for the font. For 106 | # example: 107 | # fonts: 108 | # - family: Schyler 109 | # fonts: 110 | # - asset: fonts/Schyler-Regular.ttf 111 | # - asset: fonts/Schyler-Italic.ttf 112 | # style: italic 113 | # - family: Trajan Pro 114 | # fonts: 115 | # - asset: fonts/TrajanPro.ttf 116 | # - asset: fonts/TrajanPro_Bold.ttf 117 | # weight: 700 118 | # 119 | # For details regarding fonts from package dependencies, 120 | # see https://flutter.dev/custom-fonts/#from-packages 121 | -------------------------------------------------------------------------------- /screenshots/Programmer-profile-ContestsAndEvents.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-ContestsAndEvents.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-Dashboard-CFAnalysis.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-Dashboard-CFAnalysis.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-Dashboard-GitHubAnalysis.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-Dashboard-GitHubAnalysis.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-Dashboard-Heatmap.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-Dashboard-Heatmap.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-Dashboard-LeetCodeAnalysis.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-Dashboard-LeetCodeAnalysis.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-Menu-Drawer.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-Menu-Drawer.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-NewUserScreen.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-NewUserScreen.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-Notification.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-Notification.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-ProfileScreen.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-ProfileScreen.PNG -------------------------------------------------------------------------------- /screenshots/Programmer-profile-SearchUserScreen.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/screenshots/Programmer-profile-SearchUserScreen.PNG -------------------------------------------------------------------------------- /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:programmerprofile/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 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | programmerprofile 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "programmerprofile", 3 | "short_name": "programmerprofile", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(programmerprofile LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "programmerprofile") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(SET CMP0063 NEW) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | # Generated plugin build rules, which manage building the plugins and adding 56 | # them to the application. 57 | include(flutter/generated_plugins.cmake) 58 | 59 | 60 | # === Installation === 61 | # Support files are copied into place next to the executable, so that it can 62 | # run in place. This is done instead of making a separate bundle (as on Linux) 63 | # so that building and running from within Visual Studio will work. 64 | set(BUILD_BUNDLE_DIR "$") 65 | # Make the "install" step default, as it's required to run. 66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 69 | endif() 70 | 71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 73 | 74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 75 | COMPONENT Runtime) 76 | 77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 78 | COMPONENT Runtime) 79 | 80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 81 | COMPONENT Runtime) 82 | 83 | if(PLUGIN_BUNDLED_LIBRARIES) 84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 86 | COMPONENT Runtime) 87 | endif() 88 | 89 | # Fully re-copy the assets directory on each build to avoid having stale files 90 | # from a previous install. 91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 92 | install(CODE " 93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 94 | " COMPONENT Runtime) 95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 97 | 98 | # Install the AOT library on non-Debug builds only. 99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 100 | CONFIGURATIONS Profile;Release 101 | COMPONENT Runtime) 102 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 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 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /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 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | ConnectivityPlusWindowsPluginRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); 15 | UrlLauncherWindowsRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 17 | } 18 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | connectivity_plus_windows 7 | url_launcher_windows 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /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 | # Disable Windows macros that collide with C++ standard library functions. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 25 | 26 | # Add dependency libraries and include directories. Add any application-specific 27 | # dependencies here. 28 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 29 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 30 | 31 | # Run the Flutter tool portions of the build. This must not be removed. 32 | add_dependencies(${BINARY_NAME} flutter_assemble) 33 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "programmerprofile" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "programmerprofile" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "programmerprofile.exe" "\0" 98 | VALUE "ProductName", "programmerprofile" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /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 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.CreateAndShow(L"programmerprofile", 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkhileshManda/programmer-profile-flutter-app/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | --------------------------------------------------------------------------------