├── .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 | | Dashboard Heatmap |
29 | Leetcode Analysis |
30 | Codeforces Analysis |
31 | GitHub Analysis |
32 | Notification Screen |
33 | Profile Screen |
34 | Contest and Events Screen |
35 | Search Users Screen |
36 | New Users Screen |
37 |
38 |
39 |  |
40 |  |
41 |  |
42 |  |
43 |  |
44 |  |
45 |  |
46 |  |
47 |  |
48 |
49 |
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 |
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