├── .github └── FUNDING.yml ├── .gitignore ├── .metadata ├── .vscode └── launch.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── programmersgateway │ │ │ │ └── sm1999 │ │ │ │ └── dev_portal │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ ├── dev_icon.png │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── dev_icon.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── dev_icon.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── dev_icon.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── dev_icon.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── dev_icon.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── settings_aar.gradle ├── assets └── sans_narrow.ttf ├── images ├── dev.jpg ├── explore_jobs.png ├── intro1.png ├── intro2.png ├── intro3.png ├── intro4.png ├── intro5.png └── productivity.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.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 180.png │ │ ├── 29.png │ │ ├── 40.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 80.png │ │ ├── 87.png │ │ ├── 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 │ └── main.m ├── lib ├── helpers │ └── secret_keys.dart ├── home_page.dart ├── home_page_content.dart ├── main.dart ├── models │ ├── github_profile.dart │ ├── jargon_data.dart │ ├── jobs.dart │ ├── people.dart │ ├── posts.dart │ ├── projects.dart │ └── tasks.dart ├── pages │ ├── books_page.dart │ ├── coding_tips.dart │ ├── connection_error.dart │ ├── new_post.dart │ └── posts_page.dart ├── routes │ └── route_generator.dart ├── screens │ ├── about_page.dart │ ├── byte_page.dart │ ├── carousel_tech_content.dart │ ├── edit_user_profile_page.dart │ ├── explore_jobs.dart │ ├── find_people.dart │ ├── forgot_password_page.dart │ ├── github_activity.dart │ ├── interview_page.dart │ ├── intro_slider.dart │ ├── jargons_dictionary.dart │ ├── login_page.dart │ ├── my_posts.dart │ ├── new_task.dart │ ├── popular_entities.dart │ ├── privacy_policy_page.dart │ ├── profile_image.dart │ ├── projects_ideas.dart │ ├── settings_page.dart │ ├── sign_up_page.dart │ ├── todo_list.dart │ ├── tools.dart │ ├── user_profile_page.dart │ └── view_profile.dart └── services │ ├── ProgressBar.dart │ └── authentication.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png └── Icon-512.png ├── index.html └── manifest.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ["9600064291@paytm"] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: cfc0082db7e4cb1ec9da9cbf29fb7ecc5788ca13 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "dev_portal", 9 | "request": "launch", 10 | "type": "dart" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing Guidelines 2 | 3 | Developers are highly welcome to contribute to this project by adding new features or filing bug reports. 4 | 5 | 1. Fork this repository 6 | 1. Clone the repo ```git clone ``` 7 | 1. CD into the specific directory. Create a new branch of the master ```git branch ``` 8 | 1. You can check which branch you are in, using ```git branch``` . Now checkout to the new branch created. ```git checkout ``` 9 | 1. When you are done coding, stage the changes by using the command ```git add``` . 10 | 1. Commit the changes made by you using the command ```git commit -m ""```. Give an appropriate message explaining the changes you made. 11 | 1. Push the changes using ```git push ``` 12 | 1. After you push the changes head over to the forked repo and a ```Compare & pull request``` button will appear. 13 | 1. Click on that button and you will be taken to a page where you can create a pull request. After you have submitted the PR, I will review your work and approve 14 | the PR and merge it with the master branch. 15 | 16 | *Note : **Contributions in any form (Code, Documentation, etc) submitted should be the own work of the contributor and plagiarism is highly discouraged.*** 17 | 18 | Happy Coding!!! 19 | 20 | 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Vaidhyanathan S M 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 | ## Dev Portal - Community Portal for Developers 2 | ![dev_portal](https://socialify.git.ci/smv1999/dev_portal/image?font=Source%20Code%20Pro&forks=1&issues=1&language=1&owner=1&pulls=1&stargazers=1&theme=Dark) 3 | 4 | ## Introduction 5 | Dev Portal is a Community Portal for Developers. It is an initiative to bring the developers across the world to connect with each other and it creates an environment for learning and growing together. 6 | Dev Portal provides you with all sorts of resources and facilities for improving your learning in the field of Software Development and also connect with fellow developers to encourage community learning. 7 | 8 | Install Dev Portal to enhance your software development journey! 9 | 10 | App live link is [here](https://play.google.com/store/apps/details?id=com.programmersgateway.sm1999.dev_portal) 11 | 12 | ## Features 13 | * Best coding practices and tips for writing cleaner code 14 | * Best books for improving coding skills 15 | * Make use of Interview Preparation Module 16 | * Create and manage To-do lists and Project Ideas 17 | * Explore Job Opportunities 18 | * Get access to Byte Sized Information 19 | * Share your thoughts with the developer community & much more! 20 | 21 | ## Want to Contribute to this repository? 22 | Head over to [Contributing Guidelines](https://github.com/smv1999/dev_portal/blob/master/CONTRIBUTING.md) to know more! 23 | 24 | ## ❤️ Project Admin 25 | 26 | | | 27 | | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | 28 | | **[Vaidhyanathan S M](https://www.linkedin.com/in/vaidhyanathansm/)** | 29 | 30 | *Need help? Feel free to contact me @ vaidhyanathan.sm@gmail.com* 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 FileNotFoundException("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: 'com.google.gms.google-services' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | lintOptions { 32 | disable 'InvalidPackage' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.programmersgateway.sm1999.dev_portal" 38 | minSdkVersion 21 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | multiDexEnabled true 43 | 44 | } 45 | 46 | buildTypes { 47 | release { 48 | // TODO: Add your own signing config for the release build. 49 | // Signing with the debug keys for now, so `flutter run --release` works. 50 | signingConfig signingConfigs.debug 51 | } 52 | } 53 | } 54 | 55 | flutter { 56 | source '../..' 57 | } 58 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "284553586407", 4 | "firebase_url": "https://dev-portal-174cd.firebaseio.com", 5 | "project_id": "dev-portal-174cd", 6 | "storage_bucket": "dev-portal-174cd.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:284553586407:android:95a528c8d6634d43d92442", 12 | "android_client_info": { 13 | "package_name": "com.programmersgateway.sm1999.dev_portal" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "284553586407-pp7890llp7tkn4gf4o3e8232v7a3rubn.apps.googleusercontent.com", 19 | "client_type": 1, 20 | "android_info": { 21 | "package_name": "com.programmersgateway.sm1999.dev_portal", 22 | "certificate_hash": "7e66b1dba55d325fd3d99241e912fae7c93e3bdd" 23 | } 24 | }, 25 | { 26 | "client_id": "284553586407-ftkfitp6h87ed6pd3ghetavlg1q7ou5s.apps.googleusercontent.com", 27 | "client_type": 3 28 | } 29 | ], 30 | "api_key": [ 31 | { 32 | "current_key": "AIzaSyCVdDpAWX6Iel78c2qK1h0we5259VsP2BM" 33 | } 34 | ], 35 | "services": { 36 | "appinvite_service": { 37 | "other_platform_oauth_client": [ 38 | { 39 | "client_id": "284553586407-ftkfitp6h87ed6pd3ghetavlg1q7ou5s.apps.googleusercontent.com", 40 | "client_type": 3 41 | } 42 | ] 43 | } 44 | } 45 | } 46 | ], 47 | "configuration_version": "1" 48 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | 10 | 11 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 35 | 39 | 44 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/programmersgateway/sm1999/dev_portal/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.programmersgateway.sm1999.dev_portal; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/dev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/drawable/dev_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/dev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-hdpi/dev_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/dev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-mdpi/dev_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/dev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xhdpi/dev_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/dev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xxhdpi/dev_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/dev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xxxhdpi/dev_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:4.0.2' 9 | classpath 'com.google.gms:google-services:4.3.4' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | jcenter() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /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-6.1.1-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 | 13 | -------------------------------------------------------------------------------- /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /assets/sans_narrow.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/assets/sans_narrow.ttf -------------------------------------------------------------------------------- /images/dev.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/dev.jpg -------------------------------------------------------------------------------- /images/explore_jobs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/explore_jobs.png -------------------------------------------------------------------------------- /images/intro1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/intro1.png -------------------------------------------------------------------------------- /images/intro2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/intro2.png -------------------------------------------------------------------------------- /images/intro3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/intro3.png -------------------------------------------------------------------------------- /images/intro4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/intro4.png -------------------------------------------------------------------------------- /images/intro5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/intro5.png -------------------------------------------------------------------------------- /images/productivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/images/productivity.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | 8.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 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /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.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"}]} -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/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 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | dev_portal 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/helpers/secret_keys.dart: -------------------------------------------------------------------------------- 1 | library secretkeys; 2 | 3 | const GITHUB_CLIENT_ID = "a4afdde6371f167ee900"; 4 | const GITHUB_CLIENT_SECRET = "2ffc096d539e546b66cc95dc26a9173bd36212c1"; -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:dev_portal/routes/route_generator.dart'; 2 | import 'package:dev_portal/screens/intro_slider.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:splashscreen/splashscreen.dart'; 6 | 7 | void main() => runApp(SplashScreenPage()); 8 | 9 | class SplashScreenPage extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | return MaterialApp( 13 | debugShowCheckedModeBanner: false, 14 | initialRoute: '/', 15 | onGenerateRoute: RouteGenerator.generateRoute, 16 | home: new MySplash(), 17 | theme: ThemeData(fontFamily: 'MyFont', primaryColor: Colors.white), 18 | ); 19 | } 20 | } 21 | 22 | class MySplash extends StatefulWidget { 23 | @override 24 | _MySplashState createState() => _MySplashState(); 25 | } 26 | 27 | class _MySplashState extends State { 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | backgroundColor: Colors.white, 32 | body: SplashScreen( 33 | title: new Text( 34 | 'Dev Portal', 35 | style: new TextStyle( 36 | fontWeight: FontWeight.bold, 37 | fontSize: 20.0, 38 | fontFamily: 'MyFont'), 39 | ), 40 | seconds: 3, 41 | navigateAfterSeconds: new IntroScreenPage(), 42 | image: new Image.asset('images/dev.jpg'), 43 | backgroundColor: Colors.white, 44 | styleTextUnderTheLoader: new TextStyle(), 45 | photoSize: 100.0, 46 | loaderColor: Colors.blue, 47 | loadingText: Text( 48 | 'Community Portal for Developers', 49 | style: GoogleFonts.ptSansNarrow(), 50 | ), 51 | ), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/models/github_profile.dart: -------------------------------------------------------------------------------- 1 | class GitHubProfile { 2 | String profileImage; 3 | String profileURL; 4 | int followers; 5 | int following; 6 | String name; 7 | String blog; 8 | int publicRepos; 9 | 10 | GitHubProfile( 11 | this.profileImage, 12 | this.profileURL, 13 | this.followers, 14 | this.following, 15 | this.name, 16 | this.blog, 17 | this.publicRepos, 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /lib/models/jargon_data.dart: -------------------------------------------------------------------------------- 1 | class JargonData { 2 | int id; 3 | String term; 4 | String definition; 5 | JargonData(this.id, this.term, this.definition); 6 | } 7 | -------------------------------------------------------------------------------- /lib/models/jobs.dart: -------------------------------------------------------------------------------- 1 | class Jobs { 2 | String jobType; 3 | String createdDate; 4 | String companyName; 5 | String companyURL; 6 | String location; 7 | String title; 8 | String description; 9 | String how_to_apply; 10 | String companyLogoURL; 11 | String jobURL; 12 | 13 | Jobs( 14 | this.jobType, 15 | this.createdDate, 16 | this.companyName, 17 | this.companyURL, 18 | this.location, 19 | this.title, 20 | this.description, 21 | this.how_to_apply, 22 | this.companyLogoURL, 23 | this.jobURL); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/models/people.dart: -------------------------------------------------------------------------------- 1 | class People { 2 | String imagePath; 3 | String firstName; 4 | String lastName; 5 | String employmentTitle; 6 | String userName; 7 | 8 | People(this.imagePath, this.firstName, this.lastName, this.employmentTitle, this.userName); 9 | } 10 | -------------------------------------------------------------------------------- /lib/models/posts.dart: -------------------------------------------------------------------------------- 1 | class Post { 2 | String datetime; 3 | String description; 4 | String name; 5 | String postpath; 6 | String publisher; 7 | String profileImage; 8 | 9 | Post(this.datetime, this.description, this.name, this.postpath, 10 | this.publisher, this.profileImage); 11 | } 12 | -------------------------------------------------------------------------------- /lib/models/projects.dart: -------------------------------------------------------------------------------- 1 | class Projects 2 | { 3 | String projectTitle; 4 | String projectDescription; 5 | 6 | Projects(this.projectTitle, this.projectDescription); 7 | } -------------------------------------------------------------------------------- /lib/models/tasks.dart: -------------------------------------------------------------------------------- 1 | class Tasks 2 | { 3 | String taskTitle; 4 | String taskDescription; 5 | String taskDeadline; 6 | String dateCreated; 7 | 8 | Tasks(this.taskTitle, this.taskDescription, this.taskDeadline, this.dateCreated); 9 | } -------------------------------------------------------------------------------- /lib/pages/books_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:url_launcher/url_launcher.dart'; 4 | 5 | 6 | class BooksPage extends StatefulWidget { 7 | @override 8 | _BooksPageState createState() => _BooksPageState(); 9 | } 10 | 11 | class _BooksPageState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Container( 15 | child: Padding( 16 | padding: EdgeInsets.all(15.0), 17 | child: ListView( 18 | shrinkWrap: true, 19 | children: [ 20 | SizedBox(height: 15.0,), 21 | Center(child:Text( 22 | 'Popular Books', 23 | style: TextStyle( 24 | fontSize: 30.0, 25 | fontFamily: 'MyFont' 26 | ), 27 | ), 28 | ), 29 | SizedBox(height: 15.0,), 30 | Container( 31 | child:GridView.count( 32 | physics: ScrollPhysics(), 33 | shrinkWrap: true, 34 | mainAxisSpacing: 25.0, 35 | crossAxisCount: 2, 36 | children: [ 37 | GestureDetector( 38 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book1.jpg?token=AKHIZQM4JUEGEBNWLOXCEP27GUZUY'), 39 | onTap: () => _openBookURL(1), 40 | ), 41 | GestureDetector( 42 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book2.jpg?token=AKHIZQLM76ECMP2M765WEMS7GU3EK'), 43 | onTap: () => _openBookURL(2), 44 | ), 45 | GestureDetector( 46 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book3.jpg?token=AKHIZQOI6NFOSVQAKW5JOKS7GU3KG'), 47 | onTap: () => _openBookURL(3), 48 | ), 49 | GestureDetector( 50 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book4.jpg?token=AKHIZQNWRB6EGOHROULYHG27GU3LU'), 51 | onTap: () => _openBookURL(4), 52 | ), 53 | GestureDetector( 54 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book5.jpg?token=AKHIZQNHHL7BGIDPHNSYBBK7GU3NQ'), 55 | onTap: () => _openBookURL(5), 56 | ), 57 | GestureDetector( 58 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book6.jpg?token=AKHIZQNJ4FMLZAX66CCVNVS7GU3O2'), 59 | onTap: () => _openBookURL(6), 60 | ), 61 | GestureDetector( 62 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book7.jpg?token=AKHIZQPXXWVCG4YB2JKYNSK7GU3QC'), 63 | onTap: () => _openBookURL(7), 64 | ), 65 | GestureDetector( 66 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book8.jpg?token=AKHIZQJVJZQQITMWPCUBS427GU3SI'), 67 | onTap: () => _openBookURL(8), 68 | ), 69 | GestureDetector( 70 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book9.jpg?token=AKHIZQNS42BUS2GOQWSQK6S7GU3TS'), 71 | onTap: () => _openBookURL(9), 72 | ), 73 | GestureDetector( 74 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/book10.jpg?token=AKHIZQJZDBGK4LWOBMXOLOK7GU3UO'), 75 | onTap: () => _openBookURL(10), 76 | ), 77 | ], 78 | ), 79 | ), 80 | SizedBox(height: 20.0,), 81 | Center(child:Text( 82 | "Popular Best Tech Movies", 83 | style: TextStyle( 84 | fontSize: 30.0, 85 | fontFamily: "MyFont" 86 | ), 87 | ), 88 | ), 89 | SizedBox(height: 15.0,), 90 | Container( 91 | child:GridView.count( 92 | physics: ScrollPhysics(), 93 | shrinkWrap: true, 94 | mainAxisSpacing: 25.0, 95 | crossAxisCount: 2, 96 | children: [ 97 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie1.jpg?token=AKHIZQNXUUWPQWIAW6AGUBC7GVXC6'), 98 | Container( 99 | height:100.0, 100 | child:Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie2.jpg?token=AKHIZQLW7YSUEHR5A5NJQIC7GVVSS'), 101 | ), 102 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie3.jpg?token=AKHIZQL3L5TY7UCG3UBPC2C7GVUZM'), 103 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie4.jpg?token=AKHIZQLKORCRFKRDVPBZ76K7GVU3K'), 104 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie5.jpg?token=AKHIZQN2ANMEKAJ44VOJNBK7GVXEY'), 105 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie6.jpg?token=AKHIZQIYKP2CMLGQQQ25BLC7GVVDA'), 106 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie7.jpg?token=AKHIZQNQKCUJUQRBJ5J7CDK7GVVGK'), 107 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/movie8.jpg?token=AKHIZQMI7TGYCNUPMUK4NPC7GVVXM'), 108 | 109 | ], 110 | ), 111 | ), 112 | ], 113 | ), 114 | ), 115 | ); 116 | } 117 | } 118 | 119 | void _openBookURL(int choice) async{ 120 | var url; 121 | switch(choice) 122 | { 123 | case 1: 124 | url = 'https://www.amazon.in/Pragmatic-Programmer-journey-mastery-Anniversary/dp/0135957052/ref=as_li_ss_tl?_encoding=UTF8&qid=1581972273&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=7d7bc7849584bd034c885e970153263c&language=en_US'; 125 | break; 126 | case 2: 127 | url = 'https://www.amazon.in/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=as_li_ss_tl?keywords=clean+code&qid=1581972195&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=8f76f14e5a27299c76415f7b76fca383&language=en_US'; 128 | break; 129 | case 3: 130 | url = 'https://www.amazon.in/Code-Complete-Practical-Handbook-Construction/dp/0735619670/ref=as_li_ss_tl?keywords=code+complete&qid=1581972119&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=04ded90404272a7ad18caa3ca663ee6f&language=en_US'; 131 | break; 132 | case 4: 133 | url = 'https://www.amazon.in/Refactoring-Improving-Existing-Addison-Wesley-Signature/dp/0134757599/ref=as_li_ss_tl?keywords=refactoring&qid=1581971932&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=88e49f76709c99275a2b3de81fde6c16&language=en_US'; 134 | break; 135 | case 5: 136 | url = 'https://www.amazon.in/Head-First-Design-Patterns-Brain-Friendly/dp/0596007124/ref=as_li_ss_tl?keywords=head+first+design+patterns&qid=1581971830&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=38d4d0ad91837df35be062b555c089b0&language=en_US'; 137 | break; 138 | case 6: 139 | url = 'https://www.amazon.in/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959/ref=as_li_ss_tl?keywords=mythical+man+month&qid=1581971745&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=19491bbda47a589ed411d6b862b90496&language=en_US'; 140 | break; 141 | case 7: 142 | url = 'https://www.amazon.in/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073/ref=as_li_ss_tl?keywords=clean+coder&qid=1581971654&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=7bf870e3ab68154ad04c3dc63293f5f6&language=en_US'; 143 | break; 144 | case 8: 145 | url = 'https://www.amazon.in/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052/ref=as_li_ss_tl?crid=PF12YCMSEVRA&keywords=working+effectively+with+legacy+code&qid=1581971577&s=books&sprefix=working+ef,stripbooks-intl-ship,237&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=5a3e625e7269ae68d09595fa64662486&language=en_US'; 146 | break; 147 | case 9: 148 | url = 'https://www.amazon.in/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/ref=as_li_ss_tl?keywords=design+patterns&qid=1581971481&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=367fa9e050c9ec6a623e2b0272c03259&language=en_US'; 149 | break; 150 | case 10: 151 | url = 'https://www.amazon.in/Cracking-Coding-Interview-Programming-Questions/dp/0984782850/ref=as_li_ss_tl?keywords=cracking+the+coding+interview&qid=1581971348&s=books&sr=1-1&linkCode=sl1&tag=daolf-20&linkId=a7d30aad79c08c0712b93ccfbd902d6d&language=en_US'; 152 | break; 153 | } 154 | 155 | if (await canLaunch(url)) { 156 | await launch(url); 157 | } else { 158 | throw 'Could not launch $url'; 159 | } 160 | } 161 | 162 | 163 | -------------------------------------------------------------------------------- /lib/pages/coding_tips.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_tindercard/flutter_tindercard.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:highlighter_coachmark/highlighter_coachmark.dart'; 6 | import 'package:shared_preferences/shared_preferences.dart'; 7 | import 'package:url_launcher/url_launcher.dart'; 8 | 9 | class CodingTipsPage extends StatefulWidget { 10 | @override 11 | _CodingTipsPageState createState() => _CodingTipsPageState(); 12 | } 13 | 14 | class _CodingTipsPageState extends State 15 | with TickerProviderStateMixin { 16 | List welcomeImages = [ 17 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips1.png", 18 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips2.png", 19 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips3.png", 20 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips4.png", 21 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips5.png", 22 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips6.png", 23 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips7.png", 24 | "https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/tips8.png", 25 | ]; 26 | GlobalKey _cardKey = GlobalObjectKey("card"); 27 | SharedPreferences prefs; 28 | bool _seen; 29 | @override 30 | void initState() { 31 | super.initState(); 32 | checkTipSeen(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | CardController controller; //Use this to trigger swap. 38 | 39 | return Container( 40 | child: SingleChildScrollView( 41 | child: Column( 42 | children: [ 43 | SizedBox( 44 | height: 30.0, 45 | ), 46 | Center( 47 | child: Text( 48 | 'Tips for Best Coding Style', 49 | style: TextStyle(fontSize: 35.0, fontFamily: 'MyFont'), 50 | ), 51 | ), 52 | Container( 53 | key: _cardKey, 54 | height: MediaQuery.of(context).size.height * 0.6, 55 | width: MediaQuery.of(context).size.height * 0.6, 56 | child: TinderSwapCard( 57 | swipeUp: true, 58 | swipeDown: true, 59 | orientation: AmassOrientation.BOTTOM, 60 | totalNum: welcomeImages.length, 61 | stackNum: 3, 62 | swipeEdge: 4.0, 63 | maxWidth: MediaQuery.of(context).size.width * 0.9, 64 | maxHeight: MediaQuery.of(context).size.width * 0.9, 65 | minWidth: MediaQuery.of(context).size.width * 0.8, 66 | minHeight: MediaQuery.of(context).size.width * 0.8, 67 | cardBuilder: (context, index) => Card( 68 | color: Colors.white, // white 69 | shadowColor: Colors.grey, 70 | child: Image.network('${welcomeImages[index]}'), 71 | ), 72 | cardController: controller = CardController(), 73 | swipeUpdateCallback: 74 | (DragUpdateDetails details, Alignment align) { 75 | /// Get swiping card's alignment 76 | if (align.x < 0) { 77 | //Card is LEFT swiping 78 | } else if (align.x > 0) { 79 | //Card is RIGHT swiping 80 | } 81 | }, 82 | swipeCompleteCallback: 83 | (CardSwipeOrientation orientation, int index) { 84 | /// Get orientation & index of swiped card! 85 | }, 86 | ), 87 | ), 88 | SizedBox( 89 | height: 10.0, 90 | ), 91 | Center( 92 | child: Text( 93 | "Articles on Best Coding Practices", 94 | style: TextStyle(fontSize: 30.0, fontFamily: "MyFont"), 95 | ), 96 | ), 97 | SizedBox( 98 | height: 10.0, 99 | ), 100 | Card( 101 | margin: const EdgeInsets.all(8.0), 102 | child: ListTile( 103 | onTap: () => openArticle(1), 104 | title: Text( 105 | 'Few simple Rules for good coding', 106 | style: GoogleFonts.ptSansNarrow(), 107 | ), 108 | leading: Container( 109 | width: 80, 110 | child: Image.network( 111 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/article1.jpg?token=AKHIZQNFJJWTTWO6YHXHWMC7G7J3O'), 112 | ), 113 | trailing: Icon( 114 | Icons.arrow_forward_ios, 115 | color: Colors.grey, 116 | ), 117 | ), 118 | ), 119 | SizedBox( 120 | height: 10.0, 121 | ), 122 | Card( 123 | margin: const EdgeInsets.all(8.0), 124 | child: ListTile( 125 | onTap: () => openArticle(2), 126 | title: Text( 127 | 'Best JavaScript coding practices', 128 | style: GoogleFonts.ptSansNarrow(), 129 | ), 130 | leading: Container( 131 | width: 80.0, 132 | child: Image.network( 133 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/article2.png?token=AKHIZQNIX5T5J5MCI2TWAE27G7LK2'), 134 | ), 135 | trailing: Icon( 136 | Icons.arrow_forward_ios, 137 | color: Colors.grey, 138 | ), 139 | ), 140 | ), 141 | SizedBox( 142 | height: 10.0, 143 | ), 144 | Card( 145 | margin: const EdgeInsets.all(8.0), 146 | child: ListTile( 147 | onTap: () => openArticle(3), 148 | title: Text( 149 | 'A summary of Java Coding Best practices', 150 | style: GoogleFonts.ptSansNarrow(), 151 | ), 152 | leading: Container( 153 | width: 80, 154 | child: Image.network( 155 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/article3.png?token=AKHIZQJF2CPMPK7X7RZIMSS7G7LOA'), 156 | ), 157 | trailing: Icon( 158 | Icons.arrow_forward_ios, 159 | color: Colors.grey, 160 | ), 161 | ), 162 | ), 163 | SizedBox( 164 | height: 10.0, 165 | ), 166 | Card( 167 | margin: const EdgeInsets.all(8.0), 168 | child: ListTile( 169 | onTap: () => openArticle(4), 170 | title: Text( 171 | 'Best coding practices-tips and more for Android', 172 | style: GoogleFonts.ptSansNarrow(), 173 | ), 174 | leading: Container( 175 | width: 80.0, 176 | child: Image.network( 177 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/article4.jpg?token=AKHIZQJDZSO3TPNNLDIPQWC7G7LTW'), 178 | ), 179 | trailing: Icon( 180 | Icons.arrow_forward_ios, 181 | color: Colors.grey, 182 | ), 183 | ), 184 | ), 185 | SizedBox( 186 | height: 15.0, 187 | ), 188 | ], 189 | ), 190 | ), 191 | ); 192 | } 193 | 194 | Future checkTipSeen() async { 195 | prefs = await SharedPreferences.getInstance(); 196 | _seen = (prefs.getBool('tipseen') ?? false); 197 | if (!_seen) { 198 | showCardTip(); 199 | await prefs.setBool('tipseen', true); 200 | } 201 | } 202 | 203 | void showCardTip() { 204 | CoachMark coachMarkFAB = CoachMark(); 205 | RenderBox target = _cardKey.currentContext.findRenderObject(); 206 | 207 | // you can change the shape of the mark 208 | Rect markRect = target.localToGlobal(Offset.zero) & target.size; 209 | markRect = Rect.fromCircle( 210 | center: markRect.center, radius: markRect.longestSide * 0.6); 211 | 212 | coachMarkFAB.show( 213 | targetContext: _cardKey.currentContext, 214 | markRect: markRect, 215 | children: [ 216 | Center( 217 | child: Text( 218 | "Swipe the Cards right/left to know more tips!", 219 | style: const TextStyle( 220 | fontSize: 21.0, 221 | fontFamily: 'MyFont', 222 | fontWeight: FontWeight.bold, 223 | color: Colors.yellow, 224 | ), 225 | ), 226 | ) 227 | ], 228 | duration: null, 229 | ); 230 | } 231 | 232 | void openArticle(int choice) async { 233 | var url; 234 | switch (choice) { 235 | case 1: 236 | url = 237 | 'https://hackernoon.com/few-simple-rules-for-good-coding-my-15-years-experience-96cb29d4acd9'; 238 | break; 239 | case 2: 240 | url = 241 | 'https://medium.com/javascript-in-plain-english/javascript-best-practices-for-beginners-b573cbc1ec0f'; 242 | break; 243 | case 3: 244 | url = 245 | 'https://medium.com/@rhamedy/a-short-summary-of-java-coding-best-practices-31283d0167d3'; 246 | break; 247 | case 4: 248 | url = 249 | 'https://medium.com/mindorks/best-coding-practices-tips-and-more-for-android-4ec03c7eeb2c'; 250 | break; 251 | } 252 | if (await canLaunch(url)) { 253 | await launch(url); 254 | } else { 255 | throw 'Could not launch $url'; 256 | } 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /lib/pages/connection_error.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | class ConnectionError extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Container( 8 | color: Colors.white, 9 | child: ListView(shrinkWrap: true, children: [ 10 | Padding( 11 | padding: EdgeInsets.all(40), 12 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/somethingwrong.png'), 13 | ), 14 | Center( 15 | child: Text( 16 | 'Something went wrong!', 17 | style: GoogleFonts.ptSansNarrow( 18 | textStyle: TextStyle(fontSize: 20, color: Colors.black)), 19 | )) 20 | ])); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/pages/new_post.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | import 'dart:io'; 3 | import 'package:intl/intl.dart'; 4 | import 'package:dev_portal/services/authentication.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:firebase_database/firebase_database.dart'; 7 | import 'package:firebase_storage/firebase_storage.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:google_fonts/google_fonts.dart'; 10 | import 'package:image_picker/image_picker.dart'; 11 | import 'package:toast/toast.dart'; 12 | 13 | class NewPost extends StatefulWidget { 14 | @override 15 | _NewPostState createState() => _NewPostState(); 16 | } 17 | 18 | class _NewPostState extends State { 19 | final _formKey = GlobalKey(); 20 | String post_description; 21 | Auth auth = new Auth(); 22 | File _image; 23 | final picker = ImagePicker(); 24 | FirebaseStorage _storage = FirebaseStorage.instance; 25 | DatabaseReference myPostRef, userNameRef; 26 | String imagePath, firstName, lastName, fullName, userName, profileImage; 27 | bool imageFlag = false; 28 | static int post_no = 0; 29 | Future getImage() async { 30 | final FirebaseUser user = await auth.getCurrentUser(); 31 | final userId = user.uid; 32 | final pickedFile = await picker.getImage(source: ImageSource.gallery); 33 | //Create a reference to the location you want to upload to in firebase 34 | StorageReference reference = 35 | _storage.ref().child(userId).child("PostImages/" + post_no.toString()); 36 | setState(() { 37 | try{ 38 | _image = File(pickedFile.path); 39 | } 40 | catch(e){ 41 | print(e); 42 | } 43 | }); 44 | //Upload the file to firebase 45 | 46 | try{ 47 | StorageUploadTask uploadTask = reference.putFile(_image); 48 | 49 | //Snapshot of the uploading task 50 | StorageTaskSnapshot taskSnapshot = await uploadTask.onComplete; 51 | Toast.show("Post Media Uploaded Successfully!", context, 52 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 53 | imagePath = await taskSnapshot.ref.getDownloadURL(); 54 | imageFlag = true; 55 | } 56 | catch(e){ 57 | print(e); 58 | } 59 | } 60 | 61 | @override 62 | void initState() { 63 | super.initState(); 64 | getInitialData(); 65 | } 66 | 67 | getInitialData() async { 68 | final FirebaseUser user = await auth.getCurrentUser(); 69 | final userId = user.uid; 70 | StorageReference reference = _storage.ref().child(userId).child("Images/"); 71 | DatabaseReference myRef = 72 | FirebaseDatabase.instance.reference().child('Profile').child(userId); 73 | myRef.once().then((DataSnapshot dataSnapshot) { 74 | setState(() { 75 | if (dataSnapshot.value != null) { 76 | firstName = dataSnapshot.value["firstname"]; 77 | lastName = dataSnapshot.value["lastname"]; 78 | fullName = firstName + " " + lastName; 79 | userName = dataSnapshot.value["username"]; 80 | profileImage = dataSnapshot.value["imagepath"]; 81 | } else { 82 | setState(() { 83 | // warning: fill your profile details before creating a post 84 | showCustomDialog( 85 | context, "Fill your profile details before creating a post!"); 86 | }); 87 | } 88 | }); 89 | }); 90 | } 91 | 92 | @override 93 | Widget build(BuildContext context) { 94 | ++post_no; 95 | return Center( 96 | child: Container( 97 | padding: EdgeInsets.all(10.0), 98 | child: Padding( 99 | padding: const EdgeInsets.all(8.0), 100 | child: Form( 101 | key: _formKey, 102 | child: SingleChildScrollView( 103 | child: Column( 104 | children: [ 105 | Padding( 106 | padding: EdgeInsets.all(10.0), 107 | child: (_image != null) 108 | ? GestureDetector( 109 | onTap: getImage, 110 | child: Container( 111 | height: 230.0, 112 | decoration: BoxDecoration( 113 | color: Colors.white, 114 | image: 115 | DecorationImage(image: FileImage(_image), fit: BoxFit.contain), 116 | border: Border.all( 117 | color: Colors.black, 118 | width: 3.0, 119 | ), 120 | ), 121 | ), 122 | ) 123 | : GestureDetector( 124 | onTap: getImage, 125 | child: Container( 126 | height: 230.0, 127 | decoration: BoxDecoration( 128 | color: Colors.white, 129 | image: 130 | DecorationImage(image: NetworkImage('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/new_post.gif'), fit: BoxFit.cover), 131 | border: Border.all( 132 | color: Colors.black, 133 | width: 3.0, 134 | ), 135 | ), 136 | ), 137 | ), 138 | ), 139 | SizedBox( 140 | height: 5.0, 141 | ), 142 | Text( 143 | 'Tap to select an Image', 144 | style: GoogleFonts.ptSansNarrow( 145 | textStyle: TextStyle( 146 | fontSize: 15.0, fontWeight: FontWeight.bold)), 147 | ), 148 | SizedBox( 149 | height: 8.0, 150 | ), 151 | TextFormField( 152 | maxLines: 1, 153 | validator: (val) => val.isEmpty 154 | ? 'Enter a Description of your post' 155 | : null, 156 | onChanged: (text) { 157 | setState(() { 158 | post_description = text; 159 | }); 160 | }, 161 | decoration: InputDecoration( 162 | hintText: 'Description', 163 | enabledBorder: OutlineInputBorder( 164 | borderSide: 165 | BorderSide(color: Colors.grey, width: 1.0), 166 | ), 167 | focusedBorder: OutlineInputBorder( 168 | borderSide: 169 | BorderSide(color: Colors.grey, width: 1.0), 170 | ), 171 | ), 172 | textAlign: TextAlign.left, 173 | keyboardType: TextInputType.text, 174 | style: TextStyle( 175 | fontSize: 16.0, 176 | height: 1.4, 177 | color: Colors.black, 178 | fontFamily: 'Montserrat')), 179 | SizedBox( 180 | height: 15, 181 | ), 182 | ButtonTheme( 183 | minWidth: 320, 184 | child: RaisedButton( 185 | child: Text( 186 | 'POST', 187 | style: GoogleFonts.ptSansNarrow( 188 | textStyle: 189 | TextStyle(fontWeight: FontWeight.bold)), 190 | ), 191 | onPressed: _submitPost, 192 | textColor: Colors.white, 193 | padding: EdgeInsets.fromLTRB(10, 18, 10, 18), 194 | elevation: 5.0, 195 | color: Colors.blue, 196 | splashColor: Colors.blueAccent, 197 | shape: RoundedRectangleBorder( 198 | borderRadius: new BorderRadius.circular(20.0))), 199 | ), 200 | ], 201 | ), 202 | )), 203 | ), 204 | )); 205 | } 206 | 207 | _submitPost() async { 208 | if (_formKey.currentState.validate()) { 209 | final FirebaseUser user = await auth.getCurrentUser(); 210 | final userId = user.uid; 211 | myPostRef = 212 | FirebaseDatabase.instance.reference().child("Posts").child(userId); 213 | dynamic currentTime = DateFormat.jm().format(DateTime.now()); 214 | dynamic date = DateFormat('yyyy-MM-dd').format(DateTime.now()); 215 | 216 | if (imageFlag) { 217 | HashMap profileMap = new HashMap(); 218 | profileMap.putIfAbsent('description', () => post_description); 219 | profileMap.putIfAbsent('postpath', () => imagePath); 220 | profileMap.putIfAbsent('name', () => fullName); 221 | profileMap.putIfAbsent('publisher', () => userName); 222 | profileMap.putIfAbsent('datetime', () => date + " " + currentTime); 223 | profileMap.putIfAbsent('profileimage', () => profileImage); 224 | myPostRef.push().set(profileMap); 225 | 226 | Toast.show("Your Post is successful", context, 227 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 228 | Navigator.of(context).pushReplacementNamed('/myposts'); 229 | } else { 230 | Toast.show("Uploading Please Wait...", context, 231 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 232 | } 233 | } 234 | } 235 | 236 | showCustomDialog(BuildContext context, String text) { 237 | Dialog errorDialog = Dialog( 238 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), 239 | child: Container( 240 | height: 300.0, 241 | width: 300.0, 242 | child: Padding( 243 | padding: const EdgeInsets.all(10.0), 244 | child: ListView( 245 | shrinkWrap: true, 246 | children: [ 247 | SizedBox( 248 | height: 100, 249 | width: 100, 250 | child: Icon( 251 | Icons.warning_sharp, 252 | size: 80, 253 | color: Colors.blue, 254 | ), 255 | ), 256 | Padding( 257 | padding: EdgeInsets.all(10.0), 258 | child: Text( 259 | text, 260 | textAlign: TextAlign.justify, 261 | style: GoogleFonts.ptSansNarrow( 262 | textStyle: TextStyle(fontSize: 17)), 263 | ), 264 | ), 265 | Padding( 266 | padding: EdgeInsets.all(10.0), 267 | child: RaisedButton( 268 | child: Text( 269 | 'Go to Profile', 270 | style: GoogleFonts.ptSansNarrow( 271 | textStyle: TextStyle(fontWeight: FontWeight.bold)), 272 | ), 273 | onPressed: () { 274 | Navigator.pushNamedAndRemoveUntil( 275 | context, "/profile", ModalRoute.withName('/profile')); 276 | }, 277 | textColor: Colors.white, 278 | padding: EdgeInsets.fromLTRB(10, 18, 10, 18), 279 | elevation: 5.0, 280 | color: Colors.blue, 281 | splashColor: Colors.blueAccent, 282 | ), 283 | ) 284 | ], 285 | ), 286 | ), 287 | ), 288 | ); 289 | showDialog( 290 | context: context, 291 | builder: (BuildContext context) => errorDialog, 292 | barrierDismissible: false); 293 | } 294 | } 295 | -------------------------------------------------------------------------------- /lib/pages/posts_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:dev_portal/services/ProgressBar.dart'; 3 | import 'package:dev_portal/services/authentication.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:firebase_database/firebase_database.dart'; 6 | import 'package:firebase_storage/firebase_storage.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:google_fonts/google_fonts.dart'; 9 | import 'package:image_picker/image_picker.dart'; 10 | import 'package:toast/toast.dart'; 11 | import 'package:dev_portal/models/posts.dart'; 12 | 13 | class PostsPage extends StatefulWidget { 14 | @override 15 | _PostsPageState createState() => _PostsPageState(); 16 | } 17 | 18 | class _PostsPageState extends State { 19 | Auth auth = new Auth(); 20 | FirebaseStorage _storage = FirebaseStorage.instance; 21 | DatabaseReference myfollowingRef, myPeopleRef, postsRef; 22 | Future f; 23 | ProgressBar _sendingMsgProgressBar; 24 | 25 | @override 26 | void initState() { 27 | // TODO: implement initState 28 | super.initState(); 29 | _sendingMsgProgressBar = ProgressBar(); 30 | WidgetsBinding.instance.addPostFrameCallback((_) { 31 | // Add Your Code here. 32 | showSendingProgressBar(); 33 | }); 34 | f = retrievePostsData(); 35 | } 36 | 37 | @override 38 | void dispose() { 39 | _sendingMsgProgressBar.hide(); 40 | super.dispose(); 41 | } 42 | 43 | void showSendingProgressBar() { 44 | _sendingMsgProgressBar.show(context); 45 | } 46 | 47 | void hideSendingProgressBar() { 48 | _sendingMsgProgressBar.hide(); 49 | } 50 | 51 | @override 52 | Widget build(BuildContext context) { 53 | return Container( 54 | child: ListView( 55 | shrinkWrap: true, 56 | children: [ 57 | SizedBox( 58 | height: 20.0, 59 | ), 60 | FutureBuilder( 61 | future: f, 62 | builder: (context, snapshot) { 63 | if (snapshot.data != null) { 64 | if (snapshot.data.length != 0) { 65 | return ListView.builder( 66 | reverse: true, 67 | shrinkWrap: true, 68 | physics: NeverScrollableScrollPhysics(), 69 | itemCount: snapshot.data.length, 70 | itemBuilder: (context, index) { 71 | return Card( 72 | margin: EdgeInsets.all(8.0), 73 | child: Container( 74 | padding: EdgeInsets.all(10.0), 75 | child: ListView( 76 | physics: NeverScrollableScrollPhysics(), 77 | shrinkWrap: true, 78 | children: [ 79 | ListTile( 80 | subtitle: 81 | Text(snapshot.data[index].datetime), 82 | title: Text(snapshot.data[index].name), 83 | leading: 84 | snapshot.data[index].profileImage != 85 | null 86 | ? InkWell( 87 | child: CircleAvatar( 88 | backgroundColor: Colors.white, 89 | radius: 30.0, 90 | child: CircleAvatar( 91 | radius: 28.0, 92 | backgroundImage: 93 | new NetworkImage(snapshot 94 | .data[index] 95 | .profileImage), 96 | backgroundColor: Colors.white, 97 | ), 98 | )) 99 | : InkWell( 100 | child: CircleAvatar( 101 | backgroundColor: Colors.white, 102 | radius: 30.0, 103 | child: CircleAvatar( 104 | radius: 28.0, 105 | backgroundImage: NetworkImage( 106 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/newimage.png'), 107 | backgroundColor: Colors.white, 108 | ), 109 | )), 110 | ), 111 | SizedBox( 112 | height: 5.0, 113 | ), 114 | Container( 115 | height: 230.0, 116 | decoration: BoxDecoration( 117 | color: Colors.white, 118 | image: DecorationImage( 119 | image: NetworkImage( 120 | snapshot.data[index].postpath), 121 | fit: BoxFit.contain), 122 | border: Border.all( 123 | color: Colors.black, 124 | width: 3.0, 125 | ), 126 | ), 127 | ), 128 | SizedBox( 129 | height: 10.0, 130 | ), 131 | Text(snapshot.data[index].description, 132 | style: GoogleFonts.ptSansNarrow( 133 | textStyle: TextStyle(fontSize: 15.0))) 134 | ], 135 | ), 136 | ), 137 | ); 138 | }); 139 | } 140 | return Container( 141 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/data_not_found.png'), 142 | ); 143 | } else if (snapshot.hasError) { 144 | return Text("${snapshot.error}"); 145 | } 146 | return Container(); 147 | }), 148 | ], 149 | ), 150 | ); 151 | } 152 | 153 | Future> retrievePostsData() async { 154 | final FirebaseUser user = await auth.getCurrentUser(); 155 | final userId = user.uid; 156 | myfollowingRef = FirebaseDatabase.instance 157 | .reference() 158 | .child('Follow') 159 | .child(userId) 160 | .child('following'); 161 | 162 | List posts = []; 163 | myfollowingRef.once().then((DataSnapshot dataSnapshot) { 164 | setState(() { 165 | if (dataSnapshot.value != null) { 166 | for (var snapshot in dataSnapshot.value.values) { 167 | myPeopleRef = 168 | FirebaseDatabase.instance.reference().child('Profile'); 169 | myPeopleRef.once().then((DataSnapshot dataSnapshot) { 170 | for (var snap in dataSnapshot.value.values) { 171 | if (snap["username"] == snapshot["userid"]) { 172 | var addFollowerUserId = dataSnapshot.value.keys.firstWhere( 173 | (k) => dataSnapshot.value[k] == snap, 174 | orElse: () => null); 175 | postsRef = FirebaseDatabase.instance 176 | .reference() 177 | .child("Posts") 178 | .child(addFollowerUserId); 179 | postsRef.once().then((DataSnapshot dataSnapshot) { 180 | setState(() { 181 | if (dataSnapshot.value != null) { 182 | for (var snapshot in dataSnapshot.value.values) { 183 | Post task = Post( 184 | snapshot["datetime"], 185 | snapshot["description"], 186 | snapshot["name"], 187 | snapshot["postpath"], 188 | snapshot["publisher"], 189 | snapshot["profileimage"]); 190 | 191 | posts.add(task); 192 | } 193 | } 194 | return posts; 195 | }); 196 | }); 197 | } 198 | } 199 | }); 200 | } 201 | } 202 | }); 203 | }); 204 | setState(() { 205 | hideSendingProgressBar(); 206 | }); 207 | return posts; 208 | } 209 | } 210 | -------------------------------------------------------------------------------- /lib/routes/route_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:dev_portal/home_page.dart'; 2 | import 'package:dev_portal/main.dart'; 3 | import 'package:dev_portal/pages/posts_page.dart'; 4 | import 'package:dev_portal/screens/about_page.dart'; 5 | import 'package:dev_portal/screens/byte_page.dart'; 6 | import 'package:dev_portal/pages/connection_error.dart'; 7 | import 'package:dev_portal/screens/github_activity.dart'; 8 | import 'package:dev_portal/screens/jargons_dictionary.dart'; 9 | import 'package:dev_portal/screens/tools.dart'; 10 | import 'package:dev_portal/screens/explore_jobs.dart'; 11 | import 'package:dev_portal/screens/find_people.dart'; 12 | import 'package:dev_portal/screens/forgot_password_page.dart'; 13 | import 'package:dev_portal/screens/interview_page.dart'; 14 | import 'package:dev_portal/screens/my_posts.dart'; 15 | import 'package:dev_portal/pages/new_post.dart'; 16 | import 'package:dev_portal/screens/new_task.dart'; 17 | import 'package:dev_portal/screens/popular_entities.dart'; 18 | import 'package:dev_portal/screens/projects_ideas.dart'; 19 | import 'package:dev_portal/screens/settings_page.dart'; 20 | import 'package:dev_portal/screens/login_page.dart'; 21 | import 'package:dev_portal/screens/intro_slider.dart'; 22 | import 'package:dev_portal/screens/edit_user_profile_page.dart'; 23 | import 'package:dev_portal/screens/privacy_policy_page.dart'; 24 | import 'package:dev_portal/screens/todo_list.dart'; 25 | import 'package:dev_portal/screens/user_profile_page.dart'; 26 | import 'package:dev_portal/screens/sign_up_page.dart'; 27 | import 'package:flutter/cupertino.dart'; 28 | import 'package:flutter/material.dart'; 29 | import 'package:intro_slider/intro_slider.dart'; 30 | 31 | class RouteGenerator { 32 | static Route generateRoute(RouteSettings settings) { 33 | // Getting arguments passed in while calling Navigator.pushNamed 34 | 35 | switch (settings.name) { 36 | case '/': 37 | return MaterialPageRoute(builder: (_) => SplashScreenPage()); 38 | case '/login': 39 | // Validation of correct data type 40 | return MaterialPageRoute(builder: (_) => MyLoginPage()); 41 | case '/signup': 42 | return MaterialPageRoute(builder: (_) => MyRegisterPage()); 43 | case '/home': 44 | return MaterialPageRoute(builder: (_) => MyHomePage()); 45 | case '/forgotpassword': 46 | return MaterialPageRoute(builder: (_) => ForgotPasswordPage()); 47 | case '/settings': 48 | return MaterialPageRoute(builder: (_) => SettingsPage()); 49 | case '/editprofile': 50 | return MaterialPageRoute(builder: (_) => EditUserProfile()); 51 | case '/profile': 52 | return MaterialPageRoute(builder: (_) => UserProfile()); 53 | case '/introslider': 54 | return MaterialPageRoute(builder: (_) => IntroScreenPage()); 55 | case '/about': 56 | return MaterialPageRoute(builder: (_) => AboutPage()); 57 | case '/policy': 58 | return MaterialPageRoute(builder: (_) => PrivacyPolicyPage()); 59 | case '/newpost': 60 | return MaterialPageRoute(builder: (_) => NewPost()); 61 | case '/posts': 62 | return MaterialPageRoute(builder: (_) => PostsPage()); 63 | case '/bytepage': 64 | return MaterialPageRoute(builder: (_) => BytePage()); 65 | case '/interviewpage': 66 | return MaterialPageRoute(builder: (_) => InterviewPage()); 67 | case '/tools': 68 | return MaterialPageRoute(builder: (_) => Tools()); 69 | case '/connectionerror': 70 | return MaterialPageRoute(builder: (_) => ConnectionError()); 71 | case '/findpeople': 72 | return MaterialPageRoute(builder: (_) => FindPeople()); 73 | case '/jobs': 74 | return MaterialPageRoute(builder: (_) => ExploreJobs()); 75 | case '/todolist': 76 | return MaterialPageRoute(builder: (_) => TodoList()); 77 | case '/projects': 78 | return MaterialPageRoute(builder: (_) => ProjectIdeas()); 79 | case '/newtask': 80 | return MaterialPageRoute(builder: (_) => NewTask()); 81 | case '/popular': 82 | return MaterialPageRoute(builder: (_) => Popular()); 83 | case '/myposts': 84 | return MaterialPageRoute(builder: (_) => MyPosts()); 85 | case '/jargonsdictionary': 86 | return MaterialPageRoute(builder: (_) => JargonDictionary()); 87 | case '/githubactivity': 88 | return MaterialPageRoute(builder: (_) => GitHubActivity()); 89 | 90 | 91 | default: 92 | // If there is no such named route in the switch statement, e.g. /third 93 | return _errorRoute(); 94 | } 95 | } 96 | 97 | static Route _errorRoute() { 98 | return MaterialPageRoute(builder: (_) { 99 | return Scaffold( 100 | appBar: AppBar( 101 | title: Text('Error'), 102 | ), 103 | body: Center( 104 | child: Text('You are on a wrong page!'), 105 | ), 106 | ); 107 | }); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /lib/screens/about_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | 5 | class AboutPage extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | elevation: 0, 11 | backgroundColor: Colors.blue, 12 | title: Text( 13 | 'About Dev Portal', 14 | style: TextStyle( 15 | fontFamily: 'MyFont', 16 | color: Colors.white, 17 | fontWeight: FontWeight.bold 18 | ), 19 | ), 20 | iconTheme: IconThemeData(color: Colors.white), 21 | centerTitle: true, 22 | ), 23 | body:Padding( 24 | padding: EdgeInsets.all(20.0), 25 | child:SingleChildScrollView( 26 | child:Column( 27 | crossAxisAlignment: CrossAxisAlignment.center, 28 | children: [ 29 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/about.png', height: 80,), 30 | SizedBox(height: 15,), 31 | Text('Dev Portal is a Community Portal for Developers. It is an initiative to bring the developers across the world to connect with each' 32 | ' other and it creates an environment for learning and growing together.\n\n' 33 | 'The salient features of this platform include: \n• Best coding Practices and tips for writing cleaner code' 34 | '\n• Best books for improving coding skills \n• Make use of Interview Preparation Module' 35 | '\n• Create and Manage To-do lists and Project Ideas \n• Explore Job Opportunities' 36 | '\n• Get access to byte sized information\n• Share your thoughts with the community\n\n' 37 | 'Dev Portal provides you with all sorts of resources and facilities for improving your learning in ' 38 | 'the field of Software Development and also connect with fellow developers to encourage community learning.' 39 | ' Feel free to check out all the possibilities offered by our platform and bring to our notice' 40 | ' if you find any bug or have any suggestions for improvements!\n\n' 41 | 'At your service, always!',textAlign: TextAlign.justify, 42 | style: GoogleFonts.ptSansNarrow(textStyle: TextStyle( 43 | fontSize: 17.0 44 | ),) 45 | ) 46 | ], 47 | ), 48 | ), 49 | ), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/screens/explore_jobs.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:url_launcher/url_launcher.dart'; 4 | import 'package:webfeed/domain/rss_feed.dart'; 5 | import 'package:http/http.dart' as http; 6 | 7 | class ExploreJobs extends StatefulWidget { 8 | @override 9 | _ExploreJobsState createState() => _ExploreJobsState(); 10 | } 11 | 12 | class _ExploreJobsState extends State { 13 | static const String FEED_URL = 14 | "https://weworkremotely.com/categories/remote-programming-jobs.rss"; 15 | RssFeed _feed; 16 | String _title = ""; 17 | static const String loadingFeedMsg = 'Loading Jobs ...'; 18 | static const String feedLoadErrorMsg = 'Error Loading Jobs!'; 19 | static const String feedOpenErrorMsg = 'Error Opening Jobs!'; 20 | GlobalKey _refreshKey; 21 | 22 | updateTitle(title) { 23 | setState(() { 24 | _title = title; 25 | }); 26 | } 27 | 28 | updateFeed(feed) { 29 | setState(() { 30 | _feed = feed; 31 | }); 32 | } 33 | 34 | load() async { 35 | updateTitle(loadingFeedMsg); 36 | loadFeed().then((result) { 37 | if (result == null || result.toString().isEmpty) { 38 | updateTitle(feedLoadErrorMsg); 39 | return; 40 | } 41 | updateFeed(result); 42 | updateTitle(_feed.title); 43 | }); 44 | } 45 | 46 | Future openFeed(String url) async { 47 | if (await canLaunch(url)) { 48 | await launch( 49 | url, 50 | forceSafariVC: true, 51 | forceWebView: false, 52 | ); 53 | return; 54 | } 55 | updateTitle(feedOpenErrorMsg); 56 | } 57 | 58 | Future loadFeed() async { 59 | try { 60 | final client = http.Client(); 61 | final response = await client.get(FEED_URL); 62 | 63 | return RssFeed.parse(response.body); 64 | } catch (exception) { 65 | // 66 | } 67 | return null; 68 | } 69 | 70 | title(title) { 71 | return Text( 72 | title, 73 | style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.w500), 74 | maxLines: 2, 75 | overflow: TextOverflow.ellipsis, 76 | ); 77 | } 78 | 79 | subtitle(subTitle) { 80 | return Text( 81 | subTitle, 82 | style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w100), 83 | maxLines: 1, 84 | overflow: TextOverflow.ellipsis, 85 | ); 86 | } 87 | 88 | thumbnail(imageUrl) { 89 | return Padding( 90 | padding: EdgeInsets.only(left: 15.0), 91 | child: Image.network(imageUrl, 92 | height: 50, width: 70, alignment: Alignment.center, fit: BoxFit.fill), 93 | ); 94 | } 95 | 96 | rightIcon() { 97 | return Icon( 98 | Icons.keyboard_arrow_right, 99 | color: Colors.grey, 100 | size: 30.0, 101 | ); 102 | } 103 | 104 | list() { 105 | var images = [ 106 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/job1.png', 107 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/job2.jpeg', 108 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/job3.jpg', 109 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/job4.jpg', 110 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/job5.jpg' 111 | ]; 112 | 113 | final _random = new Random(); 114 | 115 | return ListView.builder( 116 | itemCount: _feed.items.length, 117 | itemBuilder: (BuildContext context, int index) { 118 | final item = _feed.items[index]; 119 | return ListTile( 120 | title: title(item.title), 121 | subtitle: subtitle(item.pubDate.toString()), 122 | leading: thumbnail(images[_random.nextInt(images.length)]), 123 | trailing: rightIcon(), 124 | contentPadding: EdgeInsets.all(5.0), 125 | onTap: () => openFeed(item.link), 126 | ); 127 | }, 128 | ); 129 | } 130 | 131 | isFeedEmpty() { 132 | return null == _feed || null == _feed.items; 133 | } 134 | 135 | body() { 136 | return isFeedEmpty() 137 | ? Center( 138 | child: CircularProgressIndicator(), 139 | ) 140 | : RefreshIndicator( 141 | key: _refreshKey, 142 | child: list(), 143 | onRefresh: () => load(), 144 | ); 145 | } 146 | 147 | @override 148 | void initState() { 149 | // TODO: implement initState 150 | super.initState(); 151 | updateTitle("Dev Portal"); 152 | load(); 153 | } 154 | 155 | @override 156 | Widget build(BuildContext context) { 157 | return Scaffold( 158 | appBar: AppBar( 159 | elevation: 0, 160 | backgroundColor: Colors.blue, 161 | title: Text( 162 | _title, 163 | style: TextStyle( 164 | color: Colors.white, 165 | fontFamily: 'MyFont', 166 | fontWeight: FontWeight.bold), 167 | ), 168 | centerTitle: true, 169 | iconTheme: IconThemeData(color: Colors.white), 170 | ), 171 | body: body(), 172 | ); 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /lib/screens/forgot_password_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:dev_portal/services/authentication.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:toast/toast.dart'; 6 | 7 | class ForgotPasswordPage extends StatefulWidget { 8 | @override 9 | _ForgotPasswordPageState createState() => _ForgotPasswordPageState(); 10 | } 11 | 12 | class _ForgotPasswordPageState extends State { 13 | final _formKey = GlobalKey(); 14 | String email; 15 | Auth auth = new Auth(); 16 | @override 17 | Widget build(BuildContext context) { 18 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 19 | return Scaffold( 20 | appBar: AppBar( 21 | elevation: 0, 22 | automaticallyImplyLeading: false, 23 | title: Text( 24 | 'Forgot Password', 25 | style: TextStyle( 26 | fontFamily: 'MyFont', 27 | color: Colors.white, 28 | fontWeight: FontWeight.bold 29 | ), 30 | ), 31 | backgroundColor: Colors.blue, 32 | centerTitle: true, 33 | ), 34 | body: Center( 35 | child: Padding( 36 | padding: const EdgeInsets.all(20.0), 37 | child: Form( 38 | key: _formKey, 39 | child: ListView( 40 | shrinkWrap: true, 41 | children: [ 42 | Image.asset( 43 | 'images/dev.jpg', 44 | height: 180, 45 | width: 180, 46 | alignment: Alignment.center, 47 | ), 48 | SizedBox( 49 | height: 20.0, 50 | ), 51 | TextFormField( 52 | maxLines: 1, 53 | validator: (val) => 54 | val.isEmpty ? 'Enter an email' : null, 55 | onChanged: (text) { 56 | setState(() { 57 | email = text; 58 | }); 59 | }, 60 | decoration: InputDecoration( 61 | enabledBorder: OutlineInputBorder( 62 | borderSide: 63 | BorderSide(color: Colors.grey, width: 1.0), 64 | borderRadius: BorderRadius.circular(20.0)), 65 | focusedBorder: OutlineInputBorder( 66 | borderSide: 67 | BorderSide(color: Colors.grey, width: 1.0), 68 | borderRadius: BorderRadius.circular(20.0)), 69 | hintText: 'Email', hintStyle: GoogleFonts.ptSansNarrow()), 70 | textAlign: TextAlign.left, 71 | keyboardType: TextInputType.emailAddress, 72 | style: TextStyle( 73 | fontSize: 16.0, 74 | height: 1.4, 75 | color: Colors.black, 76 | fontFamily: 'MyFont')), 77 | SizedBox( 78 | height: 15.0, 79 | ), 80 | SizedBox( 81 | width: double.infinity, 82 | child: RaisedButton( 83 | child: Text('Send Password Reset Email', 84 | style: GoogleFonts.ptSansNarrow(textStyle: TextStyle(fontSize: 18)), 85 | ), 86 | onPressed: _sendPasswordResetEmail, 87 | color: Colors.blue, 88 | splashColor: Colors.blueAccent, 89 | textColor: Colors.white, 90 | padding: EdgeInsets.fromLTRB(10, 18, 10, 18), 91 | elevation: 5.0, 92 | shape: RoundedRectangleBorder( 93 | borderRadius: new BorderRadius.circular(20.0)), 94 | ), 95 | ), 96 | ], 97 | ), 98 | ), 99 | ), 100 | ), 101 | ); 102 | } 103 | 104 | void _sendPasswordResetEmail() { 105 | if (_formKey.currentState.validate()) { 106 | if (auth.sendPasswordResetEmail(email) != null) { 107 | Toast.show("Password reset email sent!", context, 108 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 109 | Navigator.of(context).pushNamed('/login'); 110 | } 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/screens/intro_slider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intro_slider/intro_slider.dart'; 3 | import 'package:intro_slider/slide_object.dart'; 4 | import 'package:shared_preferences/shared_preferences.dart'; 5 | 6 | class IntroScreenPage extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | return IntroScreen(); 10 | } 11 | } 12 | 13 | class IntroScreen extends StatefulWidget { 14 | @override 15 | _IntroScreenState createState() => _IntroScreenState(); 16 | } 17 | 18 | class _IntroScreenState extends State { 19 | // with AfterLayoutMixin 20 | List slides = new List(); 21 | bool _seen = false; 22 | @override 23 | void initState() { 24 | super.initState(); 25 | WidgetsBinding.instance.addPostFrameCallback((_) async { 26 | // Add Your Code here. 27 | setState(() { 28 | checkFirstSeen(); 29 | }); 30 | }); 31 | slides.add( 32 | new Slide( 33 | title: "Write Better Code", 34 | description: "Best Coding Practices and tips for writing cleaner code", 35 | pathImage: "images/intro1.png", 36 | styleTitle: TextStyle( 37 | color: Colors.black, 38 | fontWeight: FontWeight.bold, 39 | fontSize: 30, 40 | fontFamily: 'MyFont'), 41 | styleDescription: 42 | TextStyle(color: Colors.black, fontSize: 18, fontFamily: 'MyFont'), 43 | backgroundColor: Colors.white, 44 | ), 45 | ); 46 | slides.add( 47 | new Slide( 48 | title: "Read what matters", 49 | description: "Best books for improving coding skills", 50 | pathImage: "images/intro2.png", 51 | styleTitle: TextStyle( 52 | color: Colors.black, 53 | fontWeight: FontWeight.bold, 54 | fontSize: 30, 55 | fontFamily: 'MyFont'), 56 | styleDescription: 57 | TextStyle(color: Colors.black, fontSize: 18, fontFamily: 'MyFont'), 58 | backgroundColor: Colors.white, 59 | ), 60 | ); 61 | slides.add( 62 | new Slide( 63 | title: "Interview Preparation Module", 64 | description: "Quality content to help you prepare for interviews", 65 | pathImage: "images/intro4.png", 66 | styleTitle: TextStyle( 67 | color: Colors.black, 68 | fontWeight: FontWeight.bold, 69 | fontSize: 30, 70 | fontFamily: 'MyFont'), 71 | styleDescription: 72 | TextStyle(color: Colors.black, fontSize: 18, fontFamily: 'MyFont'), 73 | backgroundColor: Colors.white, 74 | ), 75 | ); 76 | slides.add( 77 | new Slide( 78 | title: "Manage your productivity", 79 | description: "Create and Manage To-do lists and Project Ideas", 80 | pathImage: "images/productivity.png", 81 | styleTitle: TextStyle( 82 | color: Colors.black, 83 | fontWeight: FontWeight.bold, 84 | fontSize: 30, 85 | fontFamily: 'MyFont'), 86 | styleDescription: 87 | TextStyle(color: Colors.black, fontSize: 18, fontFamily: 'MyFont'), 88 | backgroundColor: Colors.white, 89 | ), 90 | ); 91 | slides.add( 92 | new Slide( 93 | title: "Explore Job Opportunities", 94 | description: "Stay updated with Tech jobs", 95 | pathImage: "images/explore_jobs.png", 96 | styleTitle: TextStyle( 97 | color: Colors.black, 98 | fontWeight: FontWeight.bold, 99 | fontSize: 30, 100 | fontFamily: 'MyFont'), 101 | styleDescription: 102 | TextStyle(color: Colors.black, fontSize: 18, fontFamily: 'MyFont'), 103 | backgroundColor: Colors.white, 104 | ), 105 | ); 106 | slides.add( 107 | new Slide( 108 | title: "Have a Byte", 109 | description: "Get access to high-quality byte sized content", 110 | pathImage: "images/intro3.png", 111 | styleTitle: TextStyle( 112 | color: Colors.black, 113 | fontWeight: FontWeight.bold, 114 | fontSize: 30, 115 | fontFamily: 'MyFont'), 116 | styleDescription: 117 | TextStyle(color: Colors.black, fontSize: 18, fontFamily: 'MyFont'), 118 | backgroundColor: Colors.white, 119 | ), 120 | ); 121 | slides.add( 122 | new Slide( 123 | title: "Engage with the community", 124 | description: "Share your thoughts with the community", 125 | pathImage: "images/intro5.png", 126 | styleTitle: TextStyle( 127 | color: Colors.black, 128 | fontWeight: FontWeight.bold, 129 | fontSize: 30, 130 | fontFamily: 'MyFont'), 131 | styleDescription: 132 | TextStyle(color: Colors.black, fontSize: 18, fontFamily: 'MyFont'), 133 | backgroundColor: Colors.white, 134 | ), 135 | ); 136 | } 137 | 138 | Future onDonePress() async { 139 | // Do what you want 140 | final navigator = Navigator.of(context); 141 | await navigator.pushNamedAndRemoveUntil('/login', (r) => false); 142 | navigator.pop(); 143 | } 144 | 145 | Future checkFirstSeen() async { 146 | SharedPreferences prefs = await SharedPreferences.getInstance(); 147 | _seen = (prefs.getBool('seen') ?? false); 148 | 149 | if (_seen) { 150 | Navigator.of(context).pushNamedAndRemoveUntil('/login', (r) => false); 151 | } else { 152 | await prefs.setBool('seen', true); 153 | } 154 | } 155 | 156 | @override 157 | Widget build(BuildContext context) { 158 | return !_seen ? 159 | new IntroSlider( 160 | slides: this.slides, 161 | onDonePress: this.onDonePress, 162 | styleNameSkipBtn: 163 | TextStyle(color: Colors.black, fontFamily: 'MyFont'), 164 | styleNamePrevBtn: 165 | TextStyle(color: Colors.black, fontFamily: 'MyFont'), 166 | styleNameDoneBtn: 167 | TextStyle(color: Colors.black, fontFamily: 'MyFont'), 168 | ) 169 | : new Container( 170 | color: Colors.white, 171 | child: Center( 172 | child: CircularProgressIndicator( 173 | backgroundColor: Colors.blue 174 | ), 175 | ), 176 | ); 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /lib/screens/jargons_dictionary.dart: -------------------------------------------------------------------------------- 1 | import 'package:dev_portal/models/jargon_data.dart'; 2 | import 'package:dev_portal/services/ProgressBar.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'dart:convert'; 8 | 9 | class JargonDictionary extends StatefulWidget { 10 | @override 11 | _JargonDictionaryState createState() => _JargonDictionaryState(); 12 | } 13 | 14 | class _JargonDictionaryState extends State { 15 | final _scaffoldKey = GlobalKey(); 16 | Future f; 17 | SharedPreferences prefs; 18 | bool _seen; 19 | ProgressBar progressBar; 20 | Icon searchIcon = new Icon( 21 | Icons.search, 22 | color: Colors.white, 23 | ); 24 | final TextEditingController _searchQuery = new TextEditingController(); 25 | bool _isSearching; 26 | String _searchText = ""; 27 | Widget appBarTitle = new Text( 28 | 'Jargon Dictionary', 29 | style: TextStyle( 30 | color: Colors.white, fontFamily: 'MyFont', fontWeight: FontWeight.bold), 31 | ); 32 | 33 | _JargonDictionaryState() { 34 | _searchQuery.addListener(() { 35 | if (_searchQuery.text.isEmpty) { 36 | setState(() { 37 | _isSearching = false; 38 | _searchText = ""; 39 | }); 40 | } else { 41 | setState(() { 42 | _isSearching = true; 43 | _searchText = _searchQuery.text; 44 | }); 45 | } 46 | }); 47 | } 48 | 49 | @override 50 | void initState() { 51 | // TODO: implement initState 52 | super.initState(); 53 | _isSearching = false; 54 | progressBar = ProgressBar(); 55 | WidgetsBinding.instance.addPostFrameCallback((_) { 56 | showSendingProgressBar(); 57 | checkTipSeen(); 58 | }); 59 | f = retrieveJargonsData(); 60 | } 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | return WillPopScope( 65 | onWillPop: () { 66 | Navigator.of(context).pushNamedAndRemoveUntil('/tools', (_) => false); 67 | return; 68 | }, 69 | child: Scaffold( 70 | key: _scaffoldKey, 71 | appBar: AppBar( 72 | elevation: 0, 73 | backgroundColor: Colors.blue, 74 | automaticallyImplyLeading: false, 75 | title: appBarTitle, 76 | centerTitle: true, 77 | iconTheme: IconThemeData(color: Colors.black), 78 | actions: [ 79 | new IconButton( 80 | icon: searchIcon, 81 | onPressed: () { 82 | setState(() { 83 | if (this.searchIcon.icon == Icons.search) { 84 | this.searchIcon = 85 | new Icon(Icons.close, color: Colors.white); 86 | this.appBarTitle = new TextField( 87 | controller: _searchQuery, 88 | style: new TextStyle( 89 | color: Colors.white, 90 | ), 91 | decoration: new InputDecoration( 92 | prefixIcon: 93 | new Icon(Icons.search, color: Colors.white), 94 | hintText: "Search...", 95 | hintStyle: new TextStyle(color: Colors.white)), 96 | ); 97 | } else { 98 | this._searchQuery.clear(); 99 | this.searchIcon = 100 | new Icon(Icons.search, color: Colors.white); 101 | this.appBarTitle = new Text( 102 | 'Jargon Dictionary', 103 | style: TextStyle( 104 | color: Colors.white, 105 | fontFamily: 'MyFont', 106 | fontWeight: FontWeight.bold), 107 | ); 108 | } 109 | }); 110 | }, 111 | ) 112 | ], 113 | ), 114 | body: Container( 115 | color: Colors.white60, 116 | child: ListView( 117 | shrinkWrap: true, 118 | children: [ 119 | SizedBox( 120 | height: 20.0, 121 | ), 122 | FutureBuilder( 123 | future: f, 124 | builder: (context, snapshot) { 125 | if (snapshot.data != null) { 126 | if (snapshot.data.length != 0) { 127 | hideSendingProgressBar(); 128 | return _isSearching ? ListView.builder( 129 | itemCount: snapshot.data.length, 130 | itemBuilder: (context, index) { 131 | return snapshot.data[index].term.toLowerCase().contains(_searchText.toLowerCase()) ? Card( 132 | margin: const EdgeInsets.all(8.0), 133 | child: ListTile( 134 | subtitle: Text( 135 | snapshot.data[index].definition, 136 | style: GoogleFonts.ptSansNarrow( 137 | textStyle: TextStyle(fontSize: 18)), 138 | textAlign: TextAlign.justify, 139 | ), 140 | title: Text( 141 | snapshot.data[index].term, 142 | style: GoogleFonts.ptSansNarrow( 143 | textStyle: TextStyle(fontSize: 22)), 144 | ), 145 | ), 146 | elevation: 3, 147 | ) : new Container(); 148 | }, 149 | shrinkWrap: true, 150 | physics: NeverScrollableScrollPhysics(), 151 | ) : ListView.builder( 152 | itemCount: snapshot.data.length, 153 | itemBuilder: (context, index) { 154 | return Card( 155 | margin: const EdgeInsets.all(8.0), 156 | child: ListTile( 157 | subtitle: Text( 158 | snapshot.data[index].definition, 159 | style: GoogleFonts.ptSansNarrow( 160 | textStyle: TextStyle(fontSize: 18)), 161 | textAlign: TextAlign.justify, 162 | ), 163 | title: Text( 164 | snapshot.data[index].term, 165 | style: GoogleFonts.ptSansNarrow( 166 | textStyle: TextStyle(fontSize: 22)), 167 | ), 168 | ), 169 | elevation: 3, 170 | ); 171 | }, 172 | shrinkWrap: true, 173 | physics: NeverScrollableScrollPhysics(), 174 | ); 175 | } 176 | return Container( 177 | child: Image.network( 178 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/data_not_found.png'), 179 | ); 180 | } else if (snapshot.hasError) { 181 | hideSendingProgressBar(); 182 | return Text("${snapshot.error}"); 183 | } 184 | return Container(); 185 | }, 186 | ) 187 | ], 188 | ), 189 | ), 190 | )); 191 | } 192 | 193 | @override 194 | void dispose() { 195 | progressBar.hide(); 196 | super.dispose(); 197 | } 198 | 199 | void showSendingProgressBar() { 200 | progressBar.show(context); 201 | } 202 | 203 | void hideSendingProgressBar() { 204 | progressBar.hide(); 205 | } 206 | 207 | Future checkTipSeen() async { 208 | prefs = await SharedPreferences.getInstance(); 209 | _seen = (prefs.getBool('dictionarysheetseen') ?? false); 210 | if (!_seen) { 211 | showBottomSheetDialog(); 212 | await prefs.setBool('dictionarysheetseen', true); 213 | } 214 | } 215 | 216 | void showBottomSheetDialog() { 217 | showModalBottomSheet( 218 | context: context, 219 | builder: (context) { 220 | return Container( 221 | color: Color(0xFF737373), 222 | height: 250, 223 | child: Container( 224 | padding: EdgeInsets.all(20.0), 225 | child: SingleChildScrollView( 226 | child: Column( 227 | children: [ 228 | SizedBox( 229 | height: 10.0, 230 | ), 231 | Image.network( 232 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/getting_started.png', 233 | height: 80, 234 | ), 235 | SizedBox( 236 | height: 5.0, 237 | ), 238 | Text( 239 | 'Getting Started', 240 | style: GoogleFonts.ptSansNarrow( 241 | textStyle: TextStyle( 242 | fontSize: 18, fontWeight: FontWeight.bold)), 243 | ), 244 | SizedBox( 245 | height: 10.0, 246 | ), 247 | Text( 248 | 'You can view the list of programming jargons here and search them by typing it in the search bar.', 249 | style: GoogleFonts.ptSansNarrow( 250 | textStyle: TextStyle( 251 | fontSize: 18, 252 | )), 253 | textAlign: TextAlign.justify, 254 | ), 255 | ], 256 | ), 257 | ), 258 | decoration: BoxDecoration( 259 | color: Theme.of(context).canvasColor, 260 | borderRadius: BorderRadius.only( 261 | topLeft: const Radius.circular(10), 262 | topRight: const Radius.circular(10), 263 | ), 264 | ), 265 | ), 266 | ); 267 | }); 268 | } 269 | 270 | Future> retrieveJargonsData() async { 271 | final response = 272 | await http.get('https://programmingjargons.deta.dev/get-jargons'); 273 | List jargonDataList = []; 274 | if (response.statusCode == 200) { 275 | // If the server did return a 200 OK response, 276 | // then parse the JSON. 277 | var jsonData = json.decode(response.body); 278 | 279 | for (var i = 0; i < jsonData.length; i++) { 280 | JargonData jargonData = JargonData( 281 | jsonData[i]["id"], 282 | jsonData[i]["term"], 283 | jsonData[i]["definition"], 284 | ); 285 | jargonDataList.add(jargonData); 286 | } 287 | return jargonDataList; 288 | } else { 289 | // If the server did not return a 200 OK response, 290 | // then throw an exception. 291 | throw Exception('Failed to load album'); 292 | } 293 | } 294 | } 295 | -------------------------------------------------------------------------------- /lib/screens/login_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:dev_portal/home_page.dart'; 2 | import 'package:dev_portal/services/authentication.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'package:google_fonts/google_fonts.dart'; 7 | import 'package:toast/toast.dart'; 8 | 9 | // Main Login Page 10 | class MyLoginPage extends StatefulWidget { 11 | MyLoginPageState createState() => MyLoginPageState(); 12 | } 13 | 14 | class MyLoginPageState extends State { 15 | String email, password; 16 | final _formKey = GlobalKey(); 17 | Auth auth = new Auth(); 18 | bool _obscureText = true; 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | // TODO: implement build 23 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 24 | 25 | @override 26 | void initState() { 27 | super.initState(); 28 | } 29 | 30 | return FutureBuilder( 31 | future: FirebaseAuth.instance.currentUser(), 32 | builder: (BuildContext context, AsyncSnapshot snapshot) { 33 | if (snapshot.hasData) { 34 | FirebaseUser user = snapshot.data; // this is your user instance 35 | /// is because there is user already logged 36 | return MyHomePage(); 37 | } 38 | 39 | /// other way there is no user logged. 40 | return Scaffold( 41 | backgroundColor: Colors.white, 42 | appBar: AppBar( 43 | elevation: 0, 44 | automaticallyImplyLeading: false, 45 | title: Text( 46 | 'Login', 47 | style: TextStyle( 48 | color: Colors.white, 49 | fontWeight: FontWeight.bold, 50 | fontFamily: 'MyFont'), 51 | ), 52 | centerTitle: true, 53 | backgroundColor: Colors.blue, 54 | ), 55 | body: Center( 56 | child: Container( 57 | color: Colors.white, 58 | child: Padding( 59 | padding: const EdgeInsets.all(20.0), 60 | child: Form( 61 | key: _formKey, 62 | child: ListView( 63 | shrinkWrap: true, 64 | children: [ 65 | Image.asset('images/dev.jpg', 66 | alignment: Alignment.center, 67 | width: 180, 68 | height: 180), 69 | SizedBox(height: 15.0), 70 | TextFormField( 71 | maxLines: 1, 72 | validator: (val) => 73 | val.isEmpty ? 'Enter an Email' : null, 74 | onChanged: (text) { 75 | setState(() { 76 | email = text; 77 | }); 78 | }, 79 | decoration: InputDecoration( 80 | enabledBorder: OutlineInputBorder( 81 | borderSide: BorderSide( 82 | color: Colors.grey, width: 1.0), 83 | borderRadius: BorderRadius.circular(20.0)), 84 | focusedBorder: OutlineInputBorder( 85 | borderSide: BorderSide( 86 | color: Colors.grey, width: 1.0), 87 | borderRadius: BorderRadius.circular(20.0)), 88 | hintText: 'Email', 89 | hintStyle: GoogleFonts.ptSansNarrow()), 90 | textAlign: TextAlign.left, 91 | keyboardType: TextInputType.emailAddress, 92 | style: TextStyle( 93 | fontSize: 16.0, 94 | height: 1.4, 95 | color: Colors.black, 96 | fontFamily: 'MyFont')), 97 | SizedBox( 98 | height: 10.0, 99 | ), 100 | TextFormField( 101 | maxLines: 1, 102 | validator: (val) => val.length < 6 103 | ? 'Password must be at least 6 chars long' 104 | : null, 105 | onChanged: (text) { 106 | setState(() { 107 | password = text; 108 | }); 109 | }, 110 | decoration: InputDecoration( 111 | enabledBorder: OutlineInputBorder( 112 | borderSide: 113 | BorderSide(color: Colors.grey, width: 1.0), 114 | borderRadius: BorderRadius.circular(20.0)), 115 | focusedBorder: OutlineInputBorder( 116 | borderSide: 117 | BorderSide(color: Colors.grey, width: 1.0), 118 | borderRadius: BorderRadius.circular(20.0)), 119 | hintText: 'Password', 120 | hintStyle: GoogleFonts.ptSansNarrow(), 121 | suffixIcon: IconButton( 122 | icon: Icon( 123 | // Based on passwordVisible state choose the icon 124 | _obscureText 125 | ? Icons.visibility 126 | : Icons.visibility_off, 127 | color: Colors.blue, 128 | ), 129 | onPressed: () { 130 | // Update the state i.e. toogle the state of passwordVisible variable 131 | setState(() { 132 | _obscureText = !_obscureText; 133 | }); 134 | }, 135 | ), 136 | ), 137 | textAlign: TextAlign.left, 138 | style: TextStyle( 139 | fontSize: 16.0, 140 | height: 1.4, 141 | color: Colors.black, 142 | fontFamily: 'MyFont'), 143 | keyboardType: TextInputType.visiblePassword, 144 | obscureText: _obscureText, 145 | ), 146 | SizedBox( 147 | height: 15.0, 148 | ), 149 | SizedBox( 150 | width: double.infinity, 151 | child: RaisedButton( 152 | child: Text( 153 | 'LOGIN', 154 | style: TextStyle(fontSize: 18), 155 | ), 156 | onPressed: _computeResult, 157 | color: Colors.blue, 158 | splashColor: Colors.blueAccent, 159 | textColor: Colors.white, 160 | padding: EdgeInsets.fromLTRB(10, 18, 10, 18), 161 | elevation: 5.0, 162 | shape: RoundedRectangleBorder( 163 | borderRadius: new BorderRadius.circular(20.0)), 164 | ), 165 | ), 166 | SizedBox( 167 | height: 20.0, 168 | ), 169 | Center( 170 | child: GestureDetector( 171 | onTap: () { 172 | Navigator.of(context) 173 | .pushNamed('/forgotpassword'); 174 | }, 175 | child: Text( 176 | "Forgot Password?", 177 | style: TextStyle( 178 | fontSize: 18, 179 | color: Colors.black54, 180 | ), 181 | ), 182 | ), 183 | ), 184 | SizedBox( 185 | height: 18.0, 186 | ), 187 | Center( 188 | child: GestureDetector( 189 | onTap: () { 190 | Navigator.of(context).pushNamed('/signup'); 191 | }, 192 | child: Text( 193 | "Don't have an Account? Sign Up", 194 | style: TextStyle( 195 | fontSize: 18, 196 | color: Colors.black54, 197 | fontFamily: 'MyFont'), 198 | ), 199 | ), 200 | ), 201 | ], 202 | ), 203 | ), 204 | ), 205 | ), 206 | ), 207 | ); 208 | }); 209 | } 210 | 211 | void _computeResult() async { 212 | if (_formKey.currentState.validate()) { 213 | if ((await auth.signIn(email, password)) != null) { 214 | if ((await auth.getCurrentUser()) != null) { 215 | Toast.show("Login Successful!", context, 216 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 217 | Navigator.of(context).pushNamedAndRemoveUntil('/home', (r) => false); 218 | } 219 | else { 220 | Navigator.of(context).pushNamed('/connectionerror'); 221 | } 222 | } 223 | } 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /lib/screens/my_posts.dart: -------------------------------------------------------------------------------- 1 | import 'package:dev_portal/models/posts.dart'; 2 | import 'package:dev_portal/services/ProgressBar.dart'; 3 | import 'package:dev_portal/services/authentication.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:firebase_database/firebase_database.dart'; 6 | import 'package:firebase_storage/firebase_storage.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:google_fonts/google_fonts.dart'; 9 | 10 | class MyPosts extends StatefulWidget { 11 | @override 12 | _MyPostsState createState() => _MyPostsState(); 13 | } 14 | 15 | class _MyPostsState extends State { 16 | ProgressBar _sendingMsgProgressBar; 17 | FirebaseStorage _storage = FirebaseStorage.instance; 18 | DatabaseReference myPostRef; 19 | Auth auth = new Auth(); 20 | Future f; 21 | 22 | @override 23 | void initState() { 24 | // TODO: implement initState 25 | super.initState(); 26 | f = retrievePostData(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return WillPopScope( 32 | onWillPop: () { 33 | Navigator.of(context).pushNamedAndRemoveUntil('/home', (_) => false); 34 | }, 35 | child: Scaffold( 36 | appBar: AppBar( 37 | elevation: 0, // to remove the shadow effect 38 | backgroundColor: Colors.blue, 39 | centerTitle: true, 40 | iconTheme: IconThemeData(color: Colors.white), // for the back button 41 | title: Text( 42 | 'My Posts', 43 | style: TextStyle( 44 | color: Colors.white, 45 | fontFamily: 'MyFont', 46 | fontWeight: FontWeight.bold), 47 | ), 48 | ), 49 | body: Container( 50 | child: ListView( 51 | shrinkWrap: true, 52 | children: [ 53 | SizedBox( 54 | height: 20.0, 55 | ), 56 | FutureBuilder( 57 | future: f, 58 | builder: (context, snapshot) { 59 | if (snapshot.data != null) { 60 | if (snapshot.data.length != 0) { 61 | return ListView.builder( 62 | reverse: true, 63 | shrinkWrap: true, 64 | physics: NeverScrollableScrollPhysics(), 65 | itemCount: snapshot.data.length, 66 | itemBuilder: (context, index) { 67 | return Card( 68 | margin: EdgeInsets.all(8.0), 69 | child: Container( 70 | padding: EdgeInsets.all(15.0), 71 | child: ListView( 72 | physics: NeverScrollableScrollPhysics(), 73 | shrinkWrap: true, 74 | children: [ 75 | ListTile( 76 | subtitle: 77 | Text(snapshot.data[index].datetime), 78 | title: Text(snapshot.data[index].name), 79 | leading: snapshot 80 | .data[index].profileImage != 81 | null 82 | ? InkWell( 83 | child: CircleAvatar( 84 | backgroundColor: Colors.white, 85 | radius: 30.0, 86 | child: CircleAvatar( 87 | radius: 28.0, 88 | backgroundImage: 89 | new NetworkImage(snapshot 90 | .data[index] 91 | .profileImage), 92 | backgroundColor: Colors.white, 93 | ), 94 | )) 95 | : InkWell( 96 | child: CircleAvatar( 97 | backgroundColor: Colors.white, 98 | radius: 30.0, 99 | child: CircleAvatar( 100 | radius: 28.0, 101 | backgroundImage: NetworkImage( 102 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/newimage.png'), 103 | backgroundColor: Colors.white, 104 | ), 105 | )), 106 | ), 107 | SizedBox( 108 | height: 5.0, 109 | ), 110 | Container( 111 | height: 230.0, 112 | decoration: BoxDecoration( 113 | color: Colors.white, 114 | image: DecorationImage( 115 | image: NetworkImage(snapshot 116 | .data[index].postpath), 117 | fit: BoxFit.contain), 118 | border: Border.all( 119 | color: Colors.black, 120 | width: 3.0, 121 | ), 122 | ), 123 | ), 124 | SizedBox( 125 | height: 10.0, 126 | ), 127 | Text(snapshot.data[index].description, 128 | style: GoogleFonts.ptSansNarrow( 129 | textStyle: 130 | TextStyle(fontSize: 15.0))) 131 | ], 132 | ), 133 | ), 134 | ); 135 | }); 136 | } 137 | return Container( 138 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/data_not_found.png'), 139 | ); 140 | } else if (snapshot.hasError) { 141 | return Text("${snapshot.error}"); 142 | } 143 | return Container(); 144 | }), 145 | ], 146 | ), 147 | ), 148 | ), 149 | ); 150 | } 151 | 152 | Future> retrievePostData() async { 153 | final FirebaseUser user = await auth.getCurrentUser(); 154 | final userId = user.uid; 155 | List posts = []; 156 | myPostRef = 157 | FirebaseDatabase.instance.reference().child("Posts").child(userId); 158 | myPostRef.once().then((DataSnapshot dataSnapshot) { 159 | setState(() { 160 | if (dataSnapshot.value != null) { 161 | for (var snapshot in dataSnapshot.value.values) { 162 | Post task = Post( 163 | snapshot["datetime"], 164 | snapshot["description"], 165 | snapshot["name"], 166 | snapshot["postpath"], 167 | snapshot["publisher"], 168 | snapshot["profileimage"]); 169 | 170 | posts.add(task); 171 | } 172 | } 173 | return posts; 174 | }); 175 | }); 176 | return posts; 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /lib/screens/new_task.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | import 'package:intl/intl.dart'; 3 | import 'package:dev_portal/services/authentication.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:firebase_database/firebase_database.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:google_fonts/google_fonts.dart'; 8 | import 'package:toast/toast.dart'; 9 | 10 | class NewTask extends StatefulWidget { 11 | @override 12 | _NewTaskState createState() => _NewTaskState(); 13 | } 14 | 15 | class _NewTaskState extends State { 16 | final _formKey = GlobalKey(); 17 | Auth auth = new Auth(); 18 | String taskTitle, taskDescription, taskDeadline, dateCreated; 19 | final TextEditingController controller = TextEditingController(text: ''); 20 | DatabaseReference myTaskRef; 21 | 22 | DateTime selectedDate = DateTime.now(); 23 | 24 | Future selectDate(BuildContext context) async { 25 | final DateTime picked = await showDatePicker( 26 | context: context, 27 | initialDate: selectedDate, 28 | firstDate: DateTime(1900), 29 | lastDate: DateTime(2101), 30 | ); 31 | if (picked != null && picked != selectedDate) 32 | setState(() { 33 | selectedDate = picked; 34 | }); 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Scaffold( 40 | appBar: AppBar( 41 | elevation: 0, 42 | backgroundColor: Colors.blue, 43 | title: Text( 44 | 'New Task', 45 | style: TextStyle( 46 | color: Colors.white, 47 | fontFamily: 'MyFont', 48 | fontWeight: FontWeight.bold), 49 | ), 50 | centerTitle: true, 51 | iconTheme: IconThemeData(color: Colors.white), 52 | actions: [ 53 | Padding( 54 | padding: EdgeInsets.only(right: 20.0), 55 | child: GestureDetector( 56 | onTap: 57 | // Submit Profile Details 58 | () => _saveTaskData(context), 59 | child: Icon(Icons.check_circle), 60 | )), 61 | ], 62 | actionsIconTheme: IconThemeData(color: Colors.white), 63 | ), 64 | body: Padding( 65 | padding: const EdgeInsets.all(10.0), 66 | child: Form( 67 | key: _formKey, 68 | child: ListView( 69 | shrinkWrap: true, 70 | children: [ 71 | SizedBox( 72 | height: 30, 73 | ), 74 | TextFormField( 75 | validator: (val) => val.isEmpty ? 'Enter a title' : null, 76 | onChanged: (text) { 77 | setState(() { 78 | taskTitle = text; 79 | }); 80 | }, 81 | decoration: InputDecoration( 82 | enabledBorder: OutlineInputBorder( 83 | borderSide: BorderSide(color: Colors.grey, width: 1.0), 84 | ), 85 | focusedBorder: OutlineInputBorder( 86 | borderSide: BorderSide(color: Colors.grey, width: 1.0), 87 | ), 88 | hintText: 'Task Title', 89 | hintStyle: GoogleFonts.ptSansNarrow()), 90 | textAlign: TextAlign.left, 91 | keyboardType: TextInputType.text, 92 | style: TextStyle( 93 | fontSize: 16.0, 94 | height: 1.2, 95 | color: Colors.black, 96 | fontFamily: 'MyFont')), 97 | SizedBox( 98 | height: 15.0, 99 | ), 100 | TextFormField( 101 | validator: (val) => 102 | val.isEmpty ? 'Enter a description' : null, 103 | onChanged: (text) { 104 | setState(() { 105 | taskDescription = text; 106 | }); 107 | }, 108 | decoration: InputDecoration( 109 | enabledBorder: OutlineInputBorder( 110 | borderSide: BorderSide(color: Colors.grey, width: 1.0), 111 | ), 112 | focusedBorder: OutlineInputBorder( 113 | borderSide: BorderSide(color: Colors.grey, width: 1.0), 114 | ), 115 | hintText: 'What is to be done?', 116 | hintStyle: GoogleFonts.ptSansNarrow()), 117 | textAlign: TextAlign.left, 118 | keyboardType: TextInputType.text, 119 | style: TextStyle( 120 | fontSize: 16.0, 121 | height: 1.2, 122 | color: Colors.black, 123 | fontFamily: 'MyFont')), 124 | SizedBox( 125 | height: 15.0, 126 | ), 127 | TextFormField( 128 | controller: controller, 129 | maxLines: 1, 130 | maxLength: 10, 131 | validator: (val) => 132 | val.isEmpty ? 'Enter your Deadline' : null, 133 | onTap: () => { 134 | selectDate(context), 135 | controller.text = 136 | "${selectedDate.toLocal()}".split(' ')[0], 137 | taskDeadline = "${selectedDate.toLocal()}".split(' ')[0] 138 | }, 139 | onChanged: (text) { 140 | setState(() { 141 | taskDeadline = "${selectedDate.toLocal()}".split(' ')[0]; 142 | }); 143 | }, 144 | decoration: InputDecoration( 145 | hintText: 'Enter Due Date', 146 | enabledBorder: OutlineInputBorder( 147 | borderSide: BorderSide(color: Colors.grey, width: 1.0), 148 | ), 149 | focusedBorder: OutlineInputBorder( 150 | borderSide: BorderSide(color: Colors.grey, width: 1.0), 151 | ), 152 | ), 153 | textAlign: TextAlign.left, 154 | keyboardType: TextInputType.datetime, 155 | style: TextStyle( 156 | fontSize: 16.0, 157 | height: 1.2, 158 | color: Colors.black, 159 | fontFamily: 'MyFont')), 160 | SizedBox( 161 | height: 30.0, 162 | ), 163 | ], 164 | ), 165 | ), 166 | ), 167 | ); 168 | } 169 | 170 | void _saveTaskData(BuildContext context) async { 171 | if (_formKey.currentState.validate()) { 172 | final FirebaseUser user = await auth.getCurrentUser(); 173 | final userId = user.uid; 174 | myTaskRef = 175 | FirebaseDatabase.instance.reference().child('Tasks').child(userId); 176 | 177 | dynamic currentTime = DateFormat.jm().format(DateTime.now()); 178 | dynamic date = DateFormat('yyyy-MM-dd').format(DateTime.now()); 179 | 180 | dateCreated = date + currentTime; 181 | 182 | HashMap taskMap = new HashMap(); 183 | taskMap.putIfAbsent('title', () => taskTitle); 184 | taskMap.putIfAbsent('description', () => taskDescription); 185 | taskMap.putIfAbsent('deadline', () => taskDeadline); 186 | taskMap.putIfAbsent('created', () => dateCreated); 187 | 188 | 189 | myTaskRef.push().set(taskMap); 190 | 191 | Toast.show("Task Saved Successfully!", context, 192 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 193 | Navigator.of(context).pushReplacementNamed('/todolist'); 194 | } 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /lib/screens/popular_entities.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_email_sender/flutter_email_sender.dart'; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:pie_chart/pie_chart.dart'; 5 | import 'package:rating_dialog/rating_dialog.dart'; 6 | import 'package:shared_preferences/shared_preferences.dart'; 7 | import 'package:url_launcher/url_launcher.dart'; 8 | 9 | class Popular extends StatefulWidget { 10 | @override 11 | _PopularState createState() => _PopularState(); 12 | } 13 | 14 | class _PopularState extends State { 15 | SharedPreferences prefs; 16 | bool _seen; 17 | Map langs = { 18 | "Python": 40, 19 | "Java": 25, 20 | "JavaScript": 15, 21 | "C#": 10, 22 | "C/C++": 6, 23 | "PHP": 4 24 | }; 25 | Map ides = { 26 | "Visual Studio": 30, 27 | "Eclipse": 25, 28 | "VS Code": 15, 29 | "Android Studio": 15, 30 | "pyCharm": 10, 31 | "IntelliJ": 5 32 | }; 33 | 34 | Map databases = { 35 | "Oracle": 30, 36 | "MySQL": 20, 37 | "SQL Server": 15, 38 | "MS Access": 15, 39 | "MongoDB": 10, 40 | "PostgreSQL": 10 41 | }; 42 | 43 | List colorList = [ 44 | Colors.blueAccent, 45 | Colors.blue, 46 | Colors.blueGrey, 47 | Colors.lightBlue, 48 | Colors.lightBlueAccent, 49 | Colors.cyan 50 | ]; 51 | 52 | @override 53 | void initState() { 54 | // TODO: implement initState 55 | super.initState(); 56 | WidgetsBinding.instance.addPostFrameCallback((_) { 57 | // Add Your Code here. 58 | checkTipSeen(); 59 | }); 60 | } 61 | 62 | Future checkTipSeen() async { 63 | prefs = await SharedPreferences.getInstance(); 64 | _seen = (prefs.getBool('ratingseen') ?? false); 65 | if (!_seen) { 66 | showRatingDialog(); 67 | } 68 | } 69 | 70 | @override 71 | Widget build(BuildContext context) { 72 | return Scaffold( 73 | appBar: AppBar( 74 | elevation: 0, 75 | backgroundColor: Colors.blue, 76 | title: Text( 77 | 'Dev Portal', 78 | style: TextStyle( 79 | color: Colors.white, 80 | fontFamily: 'MyFont', 81 | fontWeight: FontWeight.bold), 82 | ), 83 | centerTitle: true, 84 | iconTheme: IconThemeData(color: Colors.white), 85 | ), 86 | body: Container( 87 | child: ListView( 88 | shrinkWrap: true, 89 | children: [ 90 | SizedBox( 91 | height: 10.0, 92 | ), 93 | Text( 94 | 'Popularity of Programming Languages', 95 | style: GoogleFonts.ptSansNarrow( 96 | textStyle: 97 | TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), 98 | textAlign: TextAlign.center, 99 | ), 100 | SizedBox( 101 | height: 8, 102 | ), 103 | PieChart( 104 | dataMap: langs, 105 | animationDuration: Duration(milliseconds: 800), 106 | chartLegendSpacing: 45, 107 | chartRadius: MediaQuery.of(context).size.width / 3.2, 108 | colorList: colorList, 109 | initialAngleInDegree: 0, 110 | legendOptions: LegendOptions( 111 | showLegendsInRow: false, 112 | legendPosition: LegendPosition.right, 113 | showLegends: true, 114 | legendShape: BoxShape.circle, 115 | legendTextStyle: TextStyle( 116 | fontWeight: FontWeight.bold, 117 | ), 118 | ), 119 | chartValuesOptions: ChartValuesOptions( 120 | showChartValueBackground: false, 121 | showChartValues: true, 122 | showChartValuesInPercentage: true, 123 | showChartValuesOutside: true, 124 | ), 125 | ), 126 | SizedBox( 127 | height: 25.0, 128 | ), 129 | Text( 130 | 'Popularity of IDEs', 131 | style: GoogleFonts.ptSansNarrow( 132 | textStyle: 133 | TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), 134 | textAlign: TextAlign.center, 135 | ), 136 | SizedBox( 137 | height: 8, 138 | ), 139 | PieChart( 140 | dataMap: ides, 141 | animationDuration: Duration(milliseconds: 800), 142 | chartLegendSpacing: 45, 143 | chartRadius: MediaQuery.of(context).size.width / 3.2, 144 | colorList: colorList, 145 | initialAngleInDegree: 0, 146 | legendOptions: LegendOptions( 147 | showLegendsInRow: false, 148 | legendPosition: LegendPosition.right, 149 | showLegends: true, 150 | legendShape: BoxShape.circle, 151 | legendTextStyle: TextStyle( 152 | fontWeight: FontWeight.bold, 153 | ), 154 | ), 155 | chartValuesOptions: ChartValuesOptions( 156 | showChartValueBackground: false, 157 | showChartValues: true, 158 | showChartValuesInPercentage: true, 159 | showChartValuesOutside: true, 160 | ), 161 | ), 162 | SizedBox( 163 | height: 25.0, 164 | ), 165 | Text( 166 | 'Popularity of DBs', 167 | style: GoogleFonts.ptSansNarrow( 168 | textStyle: 169 | TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), 170 | textAlign: TextAlign.center, 171 | ), 172 | SizedBox( 173 | height: 8, 174 | ), 175 | PieChart( 176 | dataMap: databases, 177 | animationDuration: Duration(milliseconds: 800), 178 | chartLegendSpacing: 45, 179 | chartRadius: MediaQuery.of(context).size.width / 3.2, 180 | colorList: colorList, 181 | initialAngleInDegree: 0, 182 | legendOptions: LegendOptions( 183 | showLegendsInRow: false, 184 | legendPosition: LegendPosition.right, 185 | showLegends: true, 186 | legendShape: BoxShape.circle, 187 | legendTextStyle: TextStyle( 188 | fontWeight: FontWeight.bold, 189 | ), 190 | ), 191 | chartValuesOptions: ChartValuesOptions( 192 | showChartValueBackground: false, 193 | showChartValues: true, 194 | showChartValuesInPercentage: true, 195 | showChartValuesOutside: true, 196 | ), 197 | ), 198 | SizedBox( 199 | height: 30.0, 200 | ), 201 | Center( 202 | child: Text( 203 | 'Source: PYPL and Google Trends', 204 | style: TextStyle(fontStyle: FontStyle.italic), 205 | ), 206 | ), 207 | SizedBox( 208 | height: 10.0, 209 | ), 210 | ], 211 | ))); 212 | } 213 | 214 | void showRatingDialog() { 215 | showDialog( 216 | context: context, 217 | barrierDismissible: false, // set to false if you want to force a rating 218 | builder: (context) { 219 | return RatingDialog( 220 | icon: const Icon( 221 | Icons.star, 222 | size: 100, 223 | color: Colors.blue, 224 | ), // set your own image/icon widget 225 | title: "Do you enjoy using Dev Portal?", 226 | description: "Tap a star to give your rating.", 227 | submitButton: "SUBMIT", 228 | alternativeButton: "Contact us instead?", // optional 229 | positiveComment: "We are so happy to hear 😍", // optional 230 | negativeComment: "We're sad to hear 😭", // optional 231 | accentColor: Colors.blue, // optional 232 | onSubmitPressed: (int rating) { 233 | prefs.setBool('ratingseen', true); 234 | _rateOurApp(); 235 | }, 236 | onAlternativePressed: () { 237 | prefs.setBool('ratingseen', true); 238 | _reportIssue(); 239 | }, 240 | ); 241 | }); 242 | } 243 | 244 | void _rateOurApp() async { 245 | const url = 246 | 'https://play.google.com/store/apps/details?id=com.programmersgateway.sm1999.dev_portal'; 247 | if (await canLaunch(url)) { 248 | await launch(url); 249 | } else { 250 | throw 'Could not launch $url'; 251 | } 252 | } 253 | 254 | void _reportIssue() async { 255 | final Email email = Email( 256 | body: 257 | 'I would like to bring the following about Dev Portal to your notice:', 258 | subject: 'Issue Report - Dev Portal', 259 | recipients: ['devteamprogrammersgateway@gmail.com'], 260 | isHTML: false, 261 | ); 262 | 263 | await FlutterEmailSender.send(email); 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /lib/screens/privacy_policy_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_html/flutter_html.dart'; 3 | import 'package:flutter_html/style.dart'; 4 | 5 | class PrivacyPolicyPage extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | elevation: 0, 11 | backgroundColor: Colors.blue, 12 | title: Text( 13 | 'Privacy Policy', 14 | style: TextStyle( 15 | color: Colors.white, 16 | fontFamily: 'MyFont', 17 | fontWeight: FontWeight.bold 18 | ), 19 | ), 20 | iconTheme: IconThemeData(color: Colors.white), 21 | centerTitle: true, 22 | ), 23 | body: Padding( 24 | padding: EdgeInsets.all(10.0), 25 | child: SingleChildScrollView( 26 | child:Column( 27 | crossAxisAlignment: CrossAxisAlignment.center, 28 | children: [ 29 | Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/privacy.png', height: 80,), 30 | SizedBox(height: 15,), 31 | Html( 32 | data: """ 33 | 34 | 35 | 36 | 37 | 38 | Privacy Policy 39 | 40 | 41 | 42 | Privacy Policy

43 | Programmers Gateway built the Dev Portal app as 44 | a Free app. This SERVICE is provided by 45 | Programmers Gateway at no cost and is intended for use as 46 | is. 47 |

48 | This page is used to inform visitors regarding our 49 | policies with the collection, use, and disclosure of Personal 50 | Information if anyone decided to use our Service. 51 |

52 | If you choose to use our Service, then you agree to 53 | the collection and use of information in relation to this 54 | policy. The Personal Information that we collect is 55 | used for providing and improving the Service. We will not use or share your information with 56 | anyone except as described in this Privacy Policy. 57 |

58 | The terms used in this Privacy Policy have the same meanings 59 | as in our Terms and Conditions, which is accessible at 60 | Dev Portal unless otherwise defined in this Privacy Policy. 61 |

Information Collection and Use

62 | For a better experience, while using our Service, we 63 | may require you to provide us with certain personally 64 | identifiable information. The information that 65 | we request will be retained by us and used as described in this privacy policy. 66 |

67 | The app does use third party services that may collect 68 | information used to identify you. 69 |

70 | Link to privacy policy of third party service providers used 71 | by the app 72 |

Log Data

73 | We want to inform you that whenever you 74 | use our Service, in a case of an error in the app 75 | we collect data and information (through third party 76 | products) on your phone called Log Data. This Log Data may 77 | include information such as your device Internet Protocol 78 | (“IP”) address, device name, operating system version, the 79 | configuration of the app when utilizing our Service, 80 | the time and date of your use of the Service, and other 81 | statistics. 82 |

Cookies

83 | Cookies are files with a small amount of data that are 84 | commonly used as anonymous unique identifiers. These are sent 85 | to your browser from the websites that you visit and are 86 | stored on your device's internal memory. 87 |

88 | This Service does not use these “cookies” explicitly. However, 89 | the app may use third party code and libraries that use 90 | “cookies” to collect information and improve their services. 91 | You have the option to either accept or refuse these cookies 92 | and know when a cookie is being sent to your device. If you 93 | choose to refuse our cookies, you may not be able to use some 94 | portions of this Service. 95 |

Service Providers

96 | We may employ third-party companies and 97 | individuals due to the following reasons: 98 |

  • To facilitate our Service;
  • To provide the Service on our behalf;
  • To perform Service-related services; or
  • To assist us in analyzing how our Service is used.

99 | We want to inform users of this Service 100 | that these third parties have access to your Personal 101 | Information. The reason is to perform the tasks assigned to 102 | them on our behalf. However, they are obligated not to 103 | disclose or use the information for any other purpose. 104 |

Security

105 | We value your trust in providing us your 106 | Personal Information, thus we are striving to use commercially 107 | acceptable means of protecting it. But remember that no method 108 | of transmission over the internet, or method of electronic 109 | storage is 100% secure and reliable, and we cannot 110 | guarantee its absolute security. 111 |

Links to Other Sites

112 | This Service may contain links to other sites. If you click on 113 | a third-party link, you will be directed to that site. Note 114 | that these external sites are not operated by us. 115 | Therefore, we strongly advise you to review the 116 | Privacy Policy of these websites. We have 117 | no control over and assume no responsibility for the content, 118 | privacy policies, or practices of any third-party sites or 119 | services. 120 |

Children’s Privacy

121 | These Services do not address anyone under the age of 13. 122 | We do not knowingly collect personally 123 | identifiable information from children under 13. In the case 124 | we discover that a child under 13 has provided 125 | us with personal information, we immediately 126 | delete this from our servers. If you are a parent or guardian 127 | and you are aware that your child has provided us with 128 | personal information, please contact us so that 129 | we will be able to do necessary actions. 130 |

Changes to This Privacy Policy

131 | We may update our Privacy Policy from 132 | time to time. Thus, you are advised to review this page 133 | periodically for any changes. We will 134 | notify you of any changes by posting the new Privacy Policy on 135 | this page. 136 |

This policy is effective as of 2020-07-31

Contact Us

137 | If you have any questions or suggestions about our 138 | Privacy Policy, do not hesitate to contact us at devteamprogrammersgateway@gmail.com. 139 |

140 | 141 | 142 | """, 143 | style: { 144 | "body": Style( 145 | fontSize: FontSize(17.0), 146 | ) 147 | }, 148 | ) 149 | ], 150 | ), 151 | ), 152 | ), 153 | ); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /lib/screens/profile_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProfileImage extends StatefulWidget { 4 | final String image, name; 5 | ProfileImage({Key key, @required this.image, @required this.name}) 6 | : super(key: key); 7 | @override 8 | _ProfileImageState createState() => _ProfileImageState(); 9 | } 10 | 11 | class _ProfileImageState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | elevation: 0, 17 | backgroundColor: Colors.blue, 18 | title: Text( 19 | widget.name, 20 | style: TextStyle( 21 | color: Colors.white, 22 | fontFamily: 'MyFont', 23 | fontWeight: FontWeight.bold), 24 | ), 25 | centerTitle: true, 26 | iconTheme: IconThemeData(color: Colors.white), 27 | ), 28 | body: Container( 29 | padding: EdgeInsets.all(10.0), 30 | alignment: Alignment.center, 31 | child: CircleAvatar( 32 | backgroundColor: Colors.white, 33 | radius: 130.0, 34 | child: CircleAvatar( 35 | radius: 128.0, 36 | backgroundImage: new NetworkImage(widget.image), 37 | backgroundColor: Colors.white, 38 | ), 39 | )), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/screens/settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_email_sender/flutter_email_sender.dart'; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:share/share.dart'; 5 | import 'package:url_launcher/url_launcher.dart'; 6 | 7 | class SettingsPage extends StatefulWidget { 8 | @override 9 | _SettingsPageState createState() => _SettingsPageState(); 10 | } 11 | 12 | class _SettingsPageState extends State { 13 | bool isSwitched = false; 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | elevation: 0, // to remove the shadow effect 19 | backgroundColor: Colors.blue, 20 | centerTitle: true, 21 | iconTheme: IconThemeData(color: Colors.white), // for the back button 22 | title: Text( 23 | 'Settings', 24 | style: TextStyle( 25 | color: Colors.white, 26 | fontFamily: 'MyFont', 27 | fontWeight: FontWeight.bold), 28 | ), 29 | ), 30 | body: Container( 31 | color: Colors.white70, 32 | child: SingleChildScrollView( 33 | child: Column( 34 | crossAxisAlignment: CrossAxisAlignment.center, 35 | children: [ 36 | SizedBox( 37 | height: 8.0, 38 | ), 39 | Image.asset('images/dev.jpg', 40 | alignment: Alignment.center, width: 180, height: 180), 41 | SizedBox( 42 | height: 8.0, 43 | ), 44 | Text( 45 | 'Made in India', 46 | textAlign: TextAlign.center, 47 | style: GoogleFonts.ptSansNarrow( 48 | textStyle: TextStyle(fontSize: 20.0)), 49 | ), 50 | SizedBox( 51 | height: 8.0, 52 | ), 53 | Text( 54 | 'Version 1.0.6', 55 | textAlign: TextAlign.center, 56 | style: GoogleFonts.ptSansNarrow( 57 | textStyle: TextStyle(fontSize: 12.0)), 58 | ), 59 | Card( 60 | margin: const EdgeInsets.all(8.0), 61 | child: ListTile( 62 | onTap: _about, 63 | title: Text( 64 | 'About Dev Portal', 65 | style: GoogleFonts.ptSansNarrow(), 66 | ), 67 | leading: Icon( 68 | Icons.info, 69 | color: Colors.blue, 70 | ), 71 | trailing: Icon( 72 | Icons.arrow_forward_ios, 73 | color: Colors.grey, 74 | ), 75 | ), 76 | ), 77 | // Card( 78 | // margin: const EdgeInsets.all(8.0), 79 | // child: ListTile( 80 | // title: Text('Switch to Dark Mode', 81 | // style: GoogleFonts.ptSansNarrow(), 82 | // ), 83 | // trailing: Switch( 84 | // value: isSwitched, 85 | // onChanged: (value){ 86 | // setState(() { 87 | // isSwitched = value; 88 | // print(isSwitched); 89 | // }); 90 | // }, 91 | // activeTrackColor: Colors.black, // black54 92 | // activeColor: Colors.grey, 93 | // ), 94 | // leading: Icon(Icons.compare_arrows, color: Colors.black), 95 | // ), 96 | // ), 97 | Card( 98 | margin: const EdgeInsets.all(8.0), 99 | child: ListTile( 100 | onTap: _shareApp, 101 | title: Text( 102 | 'Share Our App', 103 | style: GoogleFonts.ptSansNarrow(), 104 | ), 105 | leading: Icon( 106 | Icons.share, 107 | color: Colors.blue, 108 | ), 109 | trailing: Icon( 110 | Icons.arrow_forward_ios, 111 | color: Colors.grey, 112 | ), 113 | ), 114 | ), 115 | Card( 116 | margin: const EdgeInsets.all(8.0), 117 | child: ListTile( 118 | onTap: _rateOurApp, 119 | title: Text( 120 | 'Rate Our App', 121 | style: GoogleFonts.ptSansNarrow(), 122 | ), 123 | leading: Icon( 124 | Icons.star, 125 | color: Colors.blue, 126 | ), 127 | trailing: Icon(Icons.arrow_forward_ios, color: Colors.grey), 128 | ), 129 | ), 130 | Card( 131 | margin: const EdgeInsets.all(8.0), 132 | child: ListTile( 133 | onTap: _ourOtherApps, 134 | title: Text( 135 | 'Our Other Apps', 136 | style: GoogleFonts.ptSansNarrow(), 137 | ), 138 | leading: Icon( 139 | Icons.apps, 140 | color: Colors.blue, 141 | ), 142 | trailing: Icon( 143 | Icons.arrow_forward_ios, 144 | color: Colors.grey, 145 | ), 146 | ), 147 | ), 148 | Card( 149 | margin: const EdgeInsets.all(8.0), 150 | child: ListTile( 151 | onTap: privacyPolicy, 152 | title: Text( 153 | 'Privacy Policy', 154 | style: GoogleFonts.ptSansNarrow(), 155 | ), 156 | leading: Icon( 157 | Icons.security, 158 | color: Colors.blue, 159 | ), 160 | trailing: Icon( 161 | Icons.arrow_forward_ios, 162 | color: Colors.grey, 163 | ), 164 | ), 165 | ), 166 | Card( 167 | margin: const EdgeInsets.all(8.0), 168 | child: ListTile( 169 | onTap: _sendEmail, 170 | title: Text( 171 | 'Contact Us', 172 | style: GoogleFonts.ptSansNarrow(), 173 | ), 174 | leading: Icon( 175 | Icons.contact_mail, 176 | color: Colors.blue, 177 | ), 178 | trailing: Icon( 179 | Icons.arrow_forward_ios, 180 | color: Colors.grey, 181 | ), 182 | ), 183 | ), 184 | Card( 185 | margin: const EdgeInsets.all(8.0), 186 | child: ListTile( 187 | onTap: _reportIssue, 188 | title: Text( 189 | 'Report an issue', 190 | style: GoogleFonts.ptSansNarrow(), 191 | ), 192 | leading: Icon( 193 | Icons.bug_report, 194 | color: Colors.blue, 195 | ), 196 | trailing: Icon( 197 | Icons.arrow_forward_ios, 198 | color: Colors.grey, 199 | ), 200 | ), 201 | ), 202 | SizedBox( 203 | height: 15.0, 204 | ), 205 | Center( 206 | child: Text( 207 | 'from', 208 | style: GoogleFonts.ptSansNarrow(), 209 | )), 210 | Center( 211 | child: Text( 212 | "Programmers Gateway", 213 | style: TextStyle(fontSize: 25.0, fontFamily: "MyFont"), 214 | ), 215 | ), 216 | SizedBox( 217 | height: 10.0, 218 | ) 219 | ], 220 | ), 221 | ), 222 | ), 223 | ); 224 | } 225 | 226 | privacyPolicy() { 227 | Navigator.of(context).pushNamed('/policy'); 228 | } 229 | 230 | void _shareApp() { 231 | final RenderBox box = context.findRenderObject(); 232 | 233 | Share.share( 234 | 'Check out the app here: https://play.google.com/store/apps/details?id=com.programmersgateway.sm1999.dev_portal', 235 | subject: 'A Community Portal for Developers', 236 | sharePositionOrigin: box.localToGlobal(Offset.zero) & box.size); 237 | } 238 | 239 | void _rateOurApp() async { 240 | const url = 241 | 'https://play.google.com/store/apps/details?id=com.programmersgateway.sm1999.dev_portal'; 242 | if (await canLaunch(url)) { 243 | await launch(url); 244 | } else { 245 | throw 'Could not launch $url'; 246 | } 247 | } 248 | 249 | void _ourOtherApps() async { 250 | const url = 251 | 'https://play.google.com/store/apps/developer?id=Programmers+Gateway'; 252 | if (await canLaunch(url)) { 253 | await launch(url); 254 | } else { 255 | throw 'Could not launch $url'; 256 | } 257 | } 258 | 259 | void _sendEmail() async { 260 | final Email email = Email( 261 | recipients: ['devteamprogrammersgateway@gmail.com'], 262 | isHTML: false, 263 | ); 264 | 265 | await FlutterEmailSender.send(email); 266 | } 267 | 268 | void _reportIssue() async { 269 | final Email email = Email( 270 | body: 271 | 'I would like to bring the following about Dev Portal to your notice:', 272 | subject: 'Issue Report - Dev Portal', 273 | recipients: ['devteamprogrammersgateway@gmail.com'], 274 | isHTML: false, 275 | ); 276 | 277 | await FlutterEmailSender.send(email); 278 | } 279 | 280 | _about() { 281 | Navigator.of(context).pushNamed('/about'); 282 | } 283 | } 284 | -------------------------------------------------------------------------------- /lib/screens/sign_up_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:dev_portal/services/authentication.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:toast/toast.dart'; 6 | 7 | // Main Register Page 8 | class MyRegisterPage extends StatefulWidget { 9 | MyRegisterPageState createState() => MyRegisterPageState(); 10 | } 11 | 12 | class MyRegisterPageState extends State { 13 | String email, password; 14 | final _formKey = GlobalKey(); 15 | Auth auth = new Auth(); 16 | bool _obscureText = true; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | // TODO: implement build 21 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 22 | return Scaffold( 23 | appBar: AppBar( 24 | elevation: 0, 25 | automaticallyImplyLeading: false, 26 | title: Text( 27 | 'Sign Up', 28 | style: TextStyle(color: Colors.white, 29 | fontFamily: 'MyFont', 30 | fontWeight: FontWeight.bold 31 | ), 32 | ), 33 | centerTitle: true, 34 | backgroundColor: Colors.blue, 35 | ), 36 | body: Center( 37 | child: Container( 38 | child: Padding( 39 | padding: const EdgeInsets.all(20.0), 40 | child: Form( 41 | key: _formKey, 42 | child: ListView( 43 | shrinkWrap: true, 44 | children: [ 45 | Image.asset('images/dev.jpg', 46 | alignment: Alignment.center, width: 180, height: 180), 47 | SizedBox(height: 15.0), 48 | TextFormField( 49 | validator: (val) => val.isEmpty ? 'Enter an Email' : null, 50 | onChanged: (text) { 51 | setState(() { 52 | email = text; 53 | }); 54 | }, 55 | decoration: InputDecoration( 56 | enabledBorder: OutlineInputBorder( 57 | borderSide: 58 | BorderSide(color: Colors.grey, width: 1.0), 59 | borderRadius: BorderRadius.circular(32.0)), 60 | focusedBorder: OutlineInputBorder( 61 | borderSide: 62 | BorderSide(color: Colors.grey, width: 1.0), 63 | borderRadius: BorderRadius.circular(32.0)), 64 | hintText: 'Email', hintStyle: GoogleFonts.ptSansNarrow()), 65 | textAlign: TextAlign.left, 66 | keyboardType: TextInputType.emailAddress, 67 | style: TextStyle( 68 | fontSize: 16.0, 69 | height: 1.2, 70 | color: Colors.black, 71 | fontFamily: 'MyFont')), 72 | SizedBox( 73 | height: 10.0, 74 | ), 75 | TextFormField( 76 | validator: (val) => val.length < 6 77 | ? 'Password must be at least 6 chars long' 78 | : null, 79 | onChanged: (text) { 80 | setState(() { 81 | password = text; 82 | }); 83 | }, 84 | decoration: InputDecoration( 85 | enabledBorder: OutlineInputBorder( 86 | borderSide: 87 | BorderSide(color: Colors.grey, width: 1.0), 88 | borderRadius: BorderRadius.circular(32.0)), 89 | focusedBorder: OutlineInputBorder( 90 | borderSide: 91 | BorderSide(color: Colors.grey, width: 1.0), 92 | borderRadius: BorderRadius.circular(32.0)), 93 | hintText: 'Password', hintStyle: GoogleFonts.ptSansNarrow(), 94 | suffixIcon: IconButton( 95 | icon: Icon( 96 | // Based on passwordVisible state choose the icon 97 | _obscureText 98 | ? Icons.visibility 99 | : Icons.visibility_off, 100 | color: Colors.blue, 101 | ), 102 | onPressed: () { 103 | // Update the state i.e. toogle the state of passwordVisible variable 104 | setState(() { 105 | _obscureText = !_obscureText; 106 | }); 107 | }, 108 | ), 109 | ), 110 | textAlign: TextAlign.left, 111 | style: TextStyle( 112 | fontSize: 16.0, 113 | height: 1.2, 114 | color: Colors.black, 115 | fontFamily: 'MyFont'), 116 | keyboardType: TextInputType.visiblePassword, 117 | obscureText: _obscureText, 118 | ), 119 | SizedBox( 120 | height: 15.0, 121 | ), 122 | SizedBox( 123 | width: double.infinity, 124 | child: RaisedButton( 125 | child: Text('REGISTER', style: GoogleFonts.ptSansNarrow(textStyle: TextStyle(fontSize: 18)),), 126 | onPressed: _computeResult, 127 | color: Colors.blue, 128 | splashColor: Colors.blueAccent, 129 | textColor: Colors.white, 130 | padding: EdgeInsets.fromLTRB(10, 18, 10, 18), 131 | elevation: 5.0, 132 | shape: RoundedRectangleBorder( 133 | borderRadius: new BorderRadius.circular(30.0)), 134 | ), 135 | ), 136 | SizedBox( 137 | height: 20.0, 138 | ), 139 | Center( 140 | child: GestureDetector( 141 | onTap: () { 142 | Navigator.of(context).pushReplacementNamed('/login'); 143 | }, 144 | child: Text("Already have an Account? Log In", 145 | style: TextStyle( 146 | fontSize: 18, 147 | color: Colors.black54, 148 | fontFamily: 'MyFont' 149 | ), 150 | ), 151 | ), 152 | ), 153 | ], 154 | ), 155 | ), 156 | ), 157 | ), 158 | ), 159 | ); 160 | } 161 | 162 | void _computeResult() { 163 | if (_formKey.currentState.validate()) { 164 | if (auth.signUp(email, password) != null) { 165 | Toast.show("Sign Up Successful!", context, 166 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 167 | Navigator.of(context).pushReplacementNamed('/login'); 168 | } 169 | else{ 170 | Toast.show("Something went wrong!", context, duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 171 | } 172 | } 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /lib/screens/todo_list.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | import 'package:dev_portal/models/tasks.dart'; 3 | import 'package:dev_portal/services/authentication.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:firebase_database/firebase_database.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:google_fonts/google_fonts.dart'; 8 | import 'package:shared_preferences/shared_preferences.dart'; 9 | import 'package:toast/toast.dart'; 10 | 11 | class TodoList extends StatefulWidget { 12 | @override 13 | _TodoListState createState() => _TodoListState(); 14 | } 15 | 16 | class _TodoListState extends State { 17 | String taskTitle, taskDescription, taskDeadline, dateCreated; 18 | final _formKey = GlobalKey(); 19 | DatabaseReference mytaskRef; 20 | Auth auth = new Auth(); 21 | Future f; 22 | final _scaffoldKey = GlobalKey(); 23 | SharedPreferences prefs; 24 | bool _seen; 25 | @override 26 | void initState() { 27 | // TODO: implement initState 28 | super.initState(); 29 | WidgetsBinding.instance.addPostFrameCallback((_) => checkTipSeen()); 30 | f = retrieveTaskData(); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return WillPopScope( 36 | onWillPop: () { 37 | Navigator.of(context).pushNamedAndRemoveUntil('/tools', (_) => false); 38 | return; 39 | }, 40 | child:Scaffold( 41 | key: _scaffoldKey, 42 | floatingActionButton: FloatingActionButton( 43 | child: SizedBox.expand( 44 | child: FittedBox(fit: BoxFit.contain, child: Icon(Icons.add)), 45 | ), 46 | backgroundColor: Colors.blue, 47 | foregroundColor: Colors.white, 48 | onPressed: () { 49 | // Respond to button press 50 | 51 | // open a new screen to add new task 52 | Navigator.of(context).pushNamed('/newtask'); 53 | }, 54 | ), 55 | appBar: AppBar( 56 | elevation: 0, 57 | backgroundColor: Colors.blue, 58 | automaticallyImplyLeading: false, 59 | title: Text( 60 | 'To Do List', 61 | style: TextStyle( 62 | color: Colors.white, 63 | fontFamily: 'MyFont', 64 | fontWeight: FontWeight.bold), 65 | ), 66 | centerTitle: true, 67 | iconTheme: IconThemeData(color: Colors.black), 68 | ), 69 | body: Container( 70 | color: Colors.white60, 71 | child:ListView( 72 | shrinkWrap: true, 73 | children: [ 74 | SizedBox( 75 | height: 20.0, 76 | ), 77 | FutureBuilder( 78 | future: f, 79 | builder: (context, snapshot) { 80 | if (snapshot.data != null) { 81 | if (snapshot.data.length != 0) { 82 | return ListView.builder( 83 | itemCount: snapshot.data.length, 84 | itemBuilder: (context, index) { 85 | return Dismissible( 86 | key: UniqueKey(), 87 | child: Card( 88 | margin: const EdgeInsets.all(8.0), 89 | child: ListTile( 90 | subtitle: Text( 91 | snapshot.data[index].taskDescription + 92 | "\n" + 93 | snapshot.data[index].dateCreated + 94 | "\n" + 95 | snapshot.data[index].taskDeadline), 96 | title: Text( 97 | snapshot.data[index].taskTitle, 98 | style: GoogleFonts.ptSansNarrow(), 99 | ), 100 | ), 101 | ), 102 | onDismissed: (direction) { 103 | // Remove the item from the data source. 104 | setState(() { 105 | String delTitle = snapshot.data[index].taskTitle; 106 | String delDescription = 107 | snapshot.data[index].taskDescription; 108 | String delDeadline = 109 | snapshot.data[index].taskDeadline; 110 | String delCreated = 111 | snapshot.data[index].dateCreated; 112 | snapshot.data.removeAt(index); 113 | deleteTaskData(delTitle, context, delDescription, 114 | delDeadline, delCreated); 115 | }); 116 | }, 117 | // Show a grey background as the item is swiped away. 118 | background: Container( 119 | padding: EdgeInsets.all(20.0), 120 | alignment: Alignment.centerRight, 121 | color: Colors.grey, 122 | child: Icon( 123 | Icons.delete, 124 | color: Colors.white, 125 | ), 126 | ), 127 | ); 128 | }, 129 | shrinkWrap: true, 130 | physics: NeverScrollableScrollPhysics(), 131 | ); 132 | } 133 | return Container( 134 | child: Image.network('https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/data_not_found.png'), 135 | ); 136 | } else if (snapshot.hasError) { 137 | return Text("${snapshot.error}"); 138 | } 139 | return Container(); 140 | }, 141 | ) 142 | ], 143 | ), 144 | ), 145 | ), 146 | ); 147 | } 148 | 149 | Future checkTipSeen() async { 150 | prefs = await SharedPreferences.getInstance(); 151 | _seen = (prefs.getBool('todosheetseen') ?? false); 152 | if (!_seen) { 153 | showBottomSheetDialog(); 154 | await prefs.setBool('todosheetseen', true); 155 | } 156 | } 157 | 158 | void showBottomSheetDialog() { 159 | showModalBottomSheet( 160 | context: context, 161 | builder: (context) { 162 | return Container( 163 | color: Color(0xFF737373), 164 | height: 250, 165 | child: Container( 166 | padding: EdgeInsets.all(20.0), 167 | child: SingleChildScrollView( 168 | child: Column( 169 | children: [ 170 | SizedBox( 171 | height: 10.0, 172 | ), 173 | Image.network( 174 | 'https://raw.githubusercontent.com/smv1999/FlutterNetworkImagesDP/master/getting_started.png', 175 | height: 80, 176 | ), 177 | SizedBox( 178 | height: 5.0, 179 | ), 180 | Text( 181 | 'Getting Started', 182 | style: GoogleFonts.ptSansNarrow( 183 | textStyle: TextStyle( 184 | fontSize: 18, fontWeight: FontWeight.bold)), 185 | ), 186 | SizedBox( 187 | height: 10.0, 188 | ), 189 | Text( 190 | 'You can view the list of to-dos created here and delete them by swiping left on each item of the list.', 191 | style: GoogleFonts.ptSansNarrow( 192 | textStyle: TextStyle( 193 | fontSize: 18, 194 | )), 195 | textAlign: TextAlign.justify, 196 | ), 197 | ], 198 | ), 199 | ), 200 | decoration: BoxDecoration( 201 | color: Theme.of(context).canvasColor, 202 | borderRadius: BorderRadius.only( 203 | topLeft: const Radius.circular(10), 204 | topRight: const Radius.circular(10), 205 | ), 206 | ), 207 | ), 208 | ); 209 | }); 210 | } 211 | 212 | Future> retrieveTaskData() async { 213 | final FirebaseUser user = await auth.getCurrentUser(); 214 | final userId = user.uid; 215 | List tasks = []; 216 | 217 | mytaskRef = 218 | FirebaseDatabase.instance.reference().child('Tasks').child(userId); 219 | mytaskRef.once().then((DataSnapshot dataSnapshot) { 220 | setState(() { 221 | if (dataSnapshot.value != null) { 222 | for (var snapshot in dataSnapshot.value.values) { 223 | Tasks task = Tasks(snapshot["title"], snapshot["description"], 224 | snapshot["deadline"], snapshot["created"]); 225 | 226 | tasks.add(task); 227 | } 228 | } 229 | return tasks; 230 | }); 231 | }); 232 | return tasks; 233 | } 234 | 235 | deleteTaskData(var delTitle, BuildContext context, var delDescription, 236 | var delDeadline, var delCreated) async { 237 | final FirebaseUser user = await auth.getCurrentUser(); 238 | final userId = user.uid; 239 | FirebaseDatabase.instance 240 | .reference() 241 | .child('Tasks') 242 | .child(userId) 243 | .once() 244 | .then((DataSnapshot dataSnapshot) { 245 | for (var snapshot in dataSnapshot.value.values) { 246 | if (snapshot["title"] == delTitle) { 247 | _scaffoldKey.currentState.showSnackBar(SnackBar( 248 | content: Text(snapshot["title"] + " deleted"), 249 | action: SnackBarAction( 250 | label: "UNDO", 251 | onPressed: () => setState( 252 | () => { 253 | undoDeleteTask( 254 | delTitle, delDescription, delDeadline, delCreated) 255 | }, 256 | ) // this is what you needed 257 | ), 258 | )); 259 | var taskKey = dataSnapshot.value.keys.firstWhere( 260 | (k) => dataSnapshot.value[k] == snapshot, 261 | orElse: () => null); 262 | FirebaseDatabase.instance 263 | .reference() 264 | .child('Tasks') 265 | .child(userId) 266 | .child(taskKey) 267 | .remove(); 268 | } 269 | } 270 | }); 271 | } 272 | 273 | undoDeleteTask( 274 | var delTitle, var delDescription, var delDeadline, var delCreated) async { 275 | taskTitle = delTitle; 276 | taskDescription = delDescription; 277 | taskDeadline = delDeadline; 278 | dateCreated = delCreated; 279 | FirebaseUser user = await auth.getCurrentUser(); 280 | final userId = user.uid; 281 | mytaskRef = 282 | FirebaseDatabase.instance.reference().child('Tasks').child(userId); 283 | 284 | HashMap taskMap = new HashMap(); 285 | taskMap.putIfAbsent('title', () => taskTitle); 286 | taskMap.putIfAbsent('description', () => taskDescription); 287 | taskMap.putIfAbsent('deadline', () => taskDeadline); 288 | taskMap.putIfAbsent('created', () => dateCreated); 289 | 290 | mytaskRef.push().set(taskMap); 291 | 292 | Toast.show("Undo Successful!", context, 293 | duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); 294 | f = retrieveTaskData(); 295 | } 296 | } 297 | -------------------------------------------------------------------------------- /lib/services/ProgressBar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProgressBar { 4 | 5 | OverlayEntry _progressOverlayEntry; 6 | 7 | void show(BuildContext context){ 8 | _progressOverlayEntry = _createdProgressEntry(context); 9 | Overlay.of(context).insert(_progressOverlayEntry); 10 | } 11 | 12 | void hide(){ 13 | if(_progressOverlayEntry != null){ 14 | _progressOverlayEntry.remove(); 15 | _progressOverlayEntry = null; 16 | } 17 | } 18 | 19 | OverlayEntry _createdProgressEntry(BuildContext context) => 20 | OverlayEntry( 21 | builder: (BuildContext context) => 22 | Stack( 23 | children: [ 24 | Container( 25 | color: Colors.white70.withOpacity(0.4), 26 | ), 27 | Center( 28 | child: CircularProgressIndicator(), 29 | ) 30 | ], 31 | 32 | ) 33 | ); 34 | 35 | double screenHeight(BuildContext context) => 36 | MediaQuery.of(context).size.height; 37 | 38 | double screenWidth(BuildContext context) => 39 | MediaQuery.of(context).size.width; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /lib/services/authentication.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:flutter/services.dart'; 4 | 5 | abstract class BaseAuth { 6 | Future signIn(String email, String password); 7 | 8 | Future signUp(String email, String password); 9 | 10 | Future getCurrentUser(); 11 | 12 | 13 | Future signOut(); 14 | 15 | } 16 | class Auth implements BaseAuth { 17 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 18 | 19 | Future signIn(String email, String password) async { 20 | try{ 21 | AuthResult result = await _firebaseAuth.signInWithEmailAndPassword( 22 | email: email, password: password); 23 | FirebaseUser user = result.user; 24 | return user.uid; 25 | } 26 | on PlatformException catch (e) 27 | { 28 | print(e.toString()); 29 | return e.code; 30 | } 31 | } 32 | 33 | Future signUp(String email, String password) async { 34 | try{ 35 | AuthResult result = await _firebaseAuth.createUserWithEmailAndPassword( 36 | email: email, password: password); 37 | FirebaseUser user = result.user; 38 | return user.uid; 39 | } 40 | on PlatformException catch (e) 41 | { 42 | print(e.toString()); 43 | return e.code; 44 | } 45 | } 46 | 47 | Future getCurrentUser() async { 48 | FirebaseUser user = await _firebaseAuth.currentUser(); 49 | return user; 50 | } 51 | 52 | Future signOut() async { 53 | return _firebaseAuth.signOut(); 54 | } 55 | 56 | Future sendPasswordResetEmail(String email) async { 57 | return _firebaseAuth.sendPasswordResetEmail(email: email); 58 | } 59 | } -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: dev_portal 2 | description: A new Flutter application. 3 | 4 | 5 | publish_to: 'none' 6 | version: 1.0.6+7 7 | 8 | environment: 9 | sdk: ">=2.7.0 <3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | firebase_core: ^0.4.0+9 15 | firebase_auth: ^0.14.0+5 16 | firebase_database: ^3.1.6 17 | firebase_storage: ^3.1.6 18 | progress_dialog: ^1.2.4 19 | carousel_slider: ^2.2.1 20 | toast: ^0.1.5 21 | intro_slider: ^2.3.1 22 | shared_preferences: ^0.5.8 23 | after_layout: ^1.0.7 24 | cupertino_icons: ^0.1.3 25 | image_picker: ^0.6.7+4 26 | splashscreen: ^1.2.0 27 | url_launcher: ^5.5.0 28 | share: 0.6.4+3 29 | flutter_email_sender: ^3.0.1 30 | flutter_html: ^1.0.0 31 | google_fonts: ^1.1.0 32 | flutter_tindercard: ^0.1.9 33 | highlighter_coachmark: ^0.0.3 34 | bottom_navy_bar: ^5.5.0 35 | pie_chart: ^4.0.1 36 | flutter_full_pdf_viewer: ^1.0.6 37 | share_extend: ^1.1.9 38 | font_awesome_flutter: ^8.10.0 39 | flushbar: ^1.10.4 40 | provider: ^4.3.2+2 41 | http: ^0.12.2 42 | webfeed: ^0.6.0 43 | rating_dialog: ^1.0.0 44 | google_sign_in: ^4.5.6 45 | uni_links: ^0.4.0 46 | material_design_icons_flutter: ^4.0.5855 47 | dev_dependencies: 48 | flutter_test: 49 | sdk: flutter 50 | 51 | 52 | flutter: 53 | 54 | 55 | uses-material-design: true 56 | 57 | fonts: 58 | - family: MyFont 59 | fonts: 60 | - asset: assets/sans_narrow.ttf 61 | assets: 62 | - images/ 63 | 64 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:dev_portal/screens/sign_up_page.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_test/flutter_test.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(MyRegisterPage()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smv1999/dev_portal/f206fcd8ee39104d5427d80fc61eab2bd715190f/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | dev_portal 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dev_portal", 3 | "short_name": "dev_portal", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter application.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | --------------------------------------------------------------------------------