├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── release │ │ └── app-release.aab │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── me │ │ │ │ └── vitask │ │ │ │ └── vitasklite │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── settings_aar.gradle ├── images ├── blue.png ├── favicon.png ├── icon1.png └── side.jpg ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ └── _ │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 180.png │ │ ├── 29.png │ │ ├── 40.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 80.png │ │ └── 87.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── Widgets │ ├── drawer_tile.dart │ ├── linear_gradient.dart │ └── show_toast.dart ├── api.dart ├── constants.dart ├── database │ ├── MoodleModel.dart │ ├── Moodle_DAO.dart │ ├── StudentModel.dart │ ├── Student_DAO.dart │ └── database_setup.dart ├── functions │ ├── calculate_attendance.dart │ ├── logout.dart │ ├── navigate_moodle.dart │ ├── notifications.dart │ └── test_internet.dart ├── main.dart └── screens │ ├── acadhistory.dart │ ├── attendance.dart │ ├── bunk_meter.dart │ ├── classacad.dart │ ├── dashboard.dart │ ├── gpa_calculator.dart │ ├── marks.dart │ ├── marksheet.dart │ ├── moodle.dart │ ├── moodle_login.dart │ ├── profile.dart │ ├── splash_screen.dart │ ├── splash_screen2.dart │ ├── timetable.dart │ ├── tt.dart │ └── welcome_screen.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshots ├── abhishek.jpeg ├── attendance.jpg ├── bunk_meter.jpg ├── dashboard.jpg ├── gpa_calculator.jpg ├── marks.jpg ├── mayank.png ├── moodle.jpg ├── profile.jpg ├── timetable.jpg └── welcome_screen.jpg └── test └── widget_test.dart /.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 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Exceptions to above rules. 37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 38 | -------------------------------------------------------------------------------- /.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: 9f5ff2306bb3e30b2b98eee79cd231b1336f41f4 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VITask Lite 2 | 3 | ## Available on Play Store! 4 | 5 | VITask mobile application made for the students of VIT Chennai for their VTOP login. 6 | 7 | Get it on Google Play 8 | 9 | ## Screenshots 10 | 11 | 12 | 13 | 14 | # Installation 15 | 16 | * Download the Flutter SDK from https://flutter.dev/docs/get-started/install/windows 17 | * Extract the downloaded SDK and add the location of the bin file inside the flutter package to your path variables. 18 | * Install the flutter plugin into your Android Studio to be able to run Flutter apps. 19 | * You're ready to go. 20 | * Note: The above installation guidelines are only for windows. 21 | 22 | ## Contributing Guidelines 23 | 24 | #### Fork this repo and clone the forked repo into your PC. 25 | #### This repo is frequently updated so make sure you always pull the latest version. 26 | 27 | ### For updating a forked repo 28 | * `git remote add upstream https://github.com/mayanktolani19/vitask-flutter.git` 29 | * `git fetch upstream` 30 | * `git checkout master` 31 | * `git rebase upstream/master` 32 | * `git push` 33 | 34 | ### Making changes to your forked repo 35 | * `git add .` 36 | * `git commit -m""` 37 | * `git push` 38 | * After committing your changes, make Pull Request. 39 | 40 | ## Our Team 41 | Mayank | Abhishek TK 42 | ------------- | ------------- 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | /key.properties -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.1' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | def keystoreProperties = new Properties() 29 | def keystorePropertiesFile = rootProject.file('key.properties') 30 | if (keystorePropertiesFile.exists()) { 31 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 32 | } 33 | 34 | android { 35 | compileSdkVersion 29 36 | 37 | sourceSets { 38 | main.java.srcDirs += 'src/main/kotlin' 39 | } 40 | 41 | lintOptions { 42 | disable 'InvalidPackage' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "me.vitask.vitasklite" 48 | minSdkVersion 16 49 | targetSdkVersion 29 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 53 | } 54 | 55 | signingConfigs { 56 | release { 57 | keyAlias keystoreProperties['keyAlias'] 58 | keyPassword keystoreProperties['keyPassword'] 59 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null 60 | storePassword keystoreProperties['storePassword'] 61 | } 62 | } 63 | 64 | buildTypes { 65 | release { 66 | minifyEnabled false 67 | shrinkResources false 68 | // TODO: Add your own signing config for the release build. 69 | // Signing with the debug keys for now, so `flutter run --release` works. 70 | signingConfig signingConfigs.release 71 | } 72 | } 73 | } 74 | 75 | flutter { 76 | source '../..' 77 | } 78 | 79 | dependencies { 80 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 81 | testImplementation 'junit:junit:4.12' 82 | androidTestImplementation 'androidx.test:runner:1.1.1' 83 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 84 | } 85 | -------------------------------------------------------------------------------- /android/app/release/app-release.aab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/android/app/release/app-release.aab -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/me/vitask/vitasklite/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package me.vitask.vitasklite 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.android.FlutterActivity 5 | import io.flutter.embedding.engine.FlutterEngine 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { 10 | GeneratedPluginRegistrant.registerWith(flutterEngine); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=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-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /images/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/images/blue.png -------------------------------------------------------------------------------- /images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/images/favicon.png -------------------------------------------------------------------------------- /images/icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/images/icon1.png -------------------------------------------------------------------------------- /images/side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/images/side.jpg -------------------------------------------------------------------------------- /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 "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 82 | install! 'cocoapods', :disable_input_output_paths => true 83 | 84 | post_install do |installer| 85 | installer.pods_project.targets.each do |target| 86 | target.build_configurations.each do |config| 87 | config.build_settings['ENABLE_BITCODE'] = 'NO' 88 | end 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - FMDB (2.7.5): 4 | - FMDB/standard (= 2.7.5) 5 | - FMDB/standard (2.7.5) 6 | - sqflite (0.0.1): 7 | - Flutter 8 | - FMDB (~> 2.7.2) 9 | 10 | DEPENDENCIES: 11 | - Flutter (from `Flutter`) 12 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 13 | 14 | SPEC REPOS: 15 | trunk: 16 | - FMDB 17 | 18 | EXTERNAL SOURCES: 19 | Flutter: 20 | :path: Flutter 21 | sqflite: 22 | :path: ".symlinks/plugins/sqflite/ios" 23 | 24 | SPEC CHECKSUMS: 25 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 26 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 27 | sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 28 | 29 | PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 30 | 31 | COCOAPODS: 1.8.4 32 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 836365E191C9145EFDF9287A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B85D4E0DFEE7103C727ECFB /* Pods_Runner.framework */; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 0791592681CB3AD9F834329C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 44 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 45 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 47 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 48 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 49 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 50 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 53 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 54 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 9B85D4E0DFEE7103C727ECFB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | B1D87A700F811E927CEC233F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 57 | F50797EA5B92CE50B5C8A3F3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 66 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 67 | 836365E191C9145EFDF9287A /* Pods_Runner.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 9740EEB11CF90186004384FC /* Flutter */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 3B80C3931E831B6300D905FE /* App.framework */, 78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 79 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 80 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 81 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 82 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 83 | ); 84 | name = Flutter; 85 | sourceTree = ""; 86 | }; 87 | 97C146E51CF9000F007C117D = { 88 | isa = PBXGroup; 89 | children = ( 90 | 9740EEB11CF90186004384FC /* Flutter */, 91 | 97C146F01CF9000F007C117D /* Runner */, 92 | 97C146EF1CF9000F007C117D /* Products */, 93 | D266EC6883A17A930F3F3ACA /* Pods */, 94 | A48340E7A3249BC05741FE5C /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 97C146EF1CF9000F007C117D /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146EE1CF9000F007C117D /* Runner.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 97C146F01CF9000F007C117D /* Runner */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 110 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 111 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 112 | 97C147021CF9000F007C117D /* Info.plist */, 113 | 97C146F11CF9000F007C117D /* Supporting Files */, 114 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 115 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 116 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 117 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 118 | ); 119 | path = Runner; 120 | sourceTree = ""; 121 | }; 122 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | ); 126 | name = "Supporting Files"; 127 | sourceTree = ""; 128 | }; 129 | A48340E7A3249BC05741FE5C /* Frameworks */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 9B85D4E0DFEE7103C727ECFB /* Pods_Runner.framework */, 133 | ); 134 | name = Frameworks; 135 | sourceTree = ""; 136 | }; 137 | D266EC6883A17A930F3F3ACA /* Pods */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | B1D87A700F811E927CEC233F /* Pods-Runner.debug.xcconfig */, 141 | 0791592681CB3AD9F834329C /* Pods-Runner.release.xcconfig */, 142 | F50797EA5B92CE50B5C8A3F3 /* Pods-Runner.profile.xcconfig */, 143 | ); 144 | name = Pods; 145 | path = Pods; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 97C146ED1CF9000F007C117D /* Runner */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 154 | buildPhases = ( 155 | 4DF57184B820EB65C8137BB0 /* [CP] Check Pods Manifest.lock */, 156 | 9740EEB61CF901F6004384FC /* Run Script */, 157 | 97C146EA1CF9000F007C117D /* Sources */, 158 | 97C146EB1CF9000F007C117D /* Frameworks */, 159 | 97C146EC1CF9000F007C117D /* Resources */, 160 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 161 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 162 | 95E2CA8463C4F1F9ED726F80 /* [CP] Embed Pods Frameworks */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ); 168 | name = Runner; 169 | productName = Runner; 170 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 171 | productType = "com.apple.product-type.application"; 172 | }; 173 | /* End PBXNativeTarget section */ 174 | 175 | /* Begin PBXProject section */ 176 | 97C146E61CF9000F007C117D /* Project object */ = { 177 | isa = PBXProject; 178 | attributes = { 179 | LastUpgradeCheck = 1020; 180 | ORGANIZATIONNAME = "The Chromium Authors"; 181 | TargetAttributes = { 182 | 97C146ED1CF9000F007C117D = { 183 | CreatedOnToolsVersion = 7.3.1; 184 | LastSwiftMigration = 1100; 185 | }; 186 | }; 187 | }; 188 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 189 | compatibilityVersion = "Xcode 3.2"; 190 | developmentRegion = en; 191 | hasScannedForEncodings = 0; 192 | knownRegions = ( 193 | en, 194 | Base, 195 | ); 196 | mainGroup = 97C146E51CF9000F007C117D; 197 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 198 | projectDirPath = ""; 199 | projectRoot = ""; 200 | targets = ( 201 | 97C146ED1CF9000F007C117D /* Runner */, 202 | ); 203 | }; 204 | /* End PBXProject section */ 205 | 206 | /* Begin PBXResourcesBuildPhase section */ 207 | 97C146EC1CF9000F007C117D /* Resources */ = { 208 | isa = PBXResourcesBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 212 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 213 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 214 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXResourcesBuildPhase section */ 219 | 220 | /* Begin PBXShellScriptBuildPhase section */ 221 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 222 | isa = PBXShellScriptBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | ); 226 | inputPaths = ( 227 | ); 228 | name = "Thin Binary"; 229 | outputPaths = ( 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | shellPath = /bin/sh; 233 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 234 | }; 235 | 4DF57184B820EB65C8137BB0 /* [CP] Check Pods Manifest.lock */ = { 236 | isa = PBXShellScriptBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | ); 240 | inputFileListPaths = ( 241 | ); 242 | inputPaths = ( 243 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 244 | "${PODS_ROOT}/Manifest.lock", 245 | ); 246 | name = "[CP] Check Pods Manifest.lock"; 247 | outputFileListPaths = ( 248 | ); 249 | outputPaths = ( 250 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | shellPath = /bin/sh; 254 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 255 | showEnvVarsInLog = 0; 256 | }; 257 | 95E2CA8463C4F1F9ED726F80 /* [CP] Embed Pods Frameworks */ = { 258 | isa = PBXShellScriptBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | ); 262 | inputPaths = ( 263 | ); 264 | name = "[CP] Embed Pods Frameworks"; 265 | outputPaths = ( 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | shellPath = /bin/sh; 269 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 270 | showEnvVarsInLog = 0; 271 | }; 272 | 9740EEB61CF901F6004384FC /* Run Script */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | inputPaths = ( 278 | ); 279 | name = "Run Script"; 280 | outputPaths = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 285 | }; 286 | /* End PBXShellScriptBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | 97C146EA1CF9000F007C117D /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 294 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXVariantGroup section */ 301 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 302 | isa = PBXVariantGroup; 303 | children = ( 304 | 97C146FB1CF9000F007C117D /* Base */, 305 | ); 306 | name = Main.storyboard; 307 | sourceTree = ""; 308 | }; 309 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 310 | isa = PBXVariantGroup; 311 | children = ( 312 | 97C147001CF9000F007C117D /* Base */, 313 | ); 314 | name = LaunchScreen.storyboard; 315 | sourceTree = ""; 316 | }; 317 | /* End PBXVariantGroup section */ 318 | 319 | /* Begin XCBuildConfiguration section */ 320 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 335 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 336 | CLANG_WARN_EMPTY_BODY = YES; 337 | CLANG_WARN_ENUM_CONVERSION = YES; 338 | CLANG_WARN_INFINITE_RECURSION = YES; 339 | CLANG_WARN_INT_CONVERSION = YES; 340 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 342 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 344 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 345 | CLANG_WARN_STRICT_PROTOTYPES = YES; 346 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 347 | CLANG_WARN_UNREACHABLE_CODE = YES; 348 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 349 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 350 | COPY_PHASE_STRIP = NO; 351 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 352 | ENABLE_NS_ASSERTIONS = NO; 353 | ENABLE_STRICT_OBJC_MSGSEND = YES; 354 | GCC_C_LANGUAGE_STANDARD = gnu99; 355 | GCC_NO_COMMON_BLOCKS = YES; 356 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 357 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 358 | GCC_WARN_UNDECLARED_SELECTOR = YES; 359 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 360 | GCC_WARN_UNUSED_FUNCTION = YES; 361 | GCC_WARN_UNUSED_VARIABLE = YES; 362 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 363 | MTL_ENABLE_DEBUG_INFO = NO; 364 | SDKROOT = iphoneos; 365 | SUPPORTED_PLATFORMS = iphoneos; 366 | TARGETED_DEVICE_FAMILY = "1,2"; 367 | VALIDATE_PRODUCT = YES; 368 | }; 369 | name = Profile; 370 | }; 371 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 372 | isa = XCBuildConfiguration; 373 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 374 | buildSettings = { 375 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 376 | CLANG_ENABLE_MODULES = YES; 377 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 378 | ENABLE_BITCODE = NO; 379 | FRAMEWORK_SEARCH_PATHS = ( 380 | "$(inherited)", 381 | "$(PROJECT_DIR)/Flutter", 382 | ); 383 | INFOPLIST_FILE = Runner/Info.plist; 384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 385 | LIBRARY_SEARCH_PATHS = ( 386 | "$(inherited)", 387 | "$(PROJECT_DIR)/Flutter", 388 | ); 389 | PRODUCT_BUNDLE_IDENTIFIER = com.mayanktolani.vitask; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 392 | SWIFT_VERSION = 5.0; 393 | VERSIONING_SYSTEM = "apple-generic"; 394 | }; 395 | name = Profile; 396 | }; 397 | 97C147031CF9000F007C117D /* Debug */ = { 398 | isa = XCBuildConfiguration; 399 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | CLANG_ANALYZER_NONNULL = YES; 403 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 404 | CLANG_CXX_LIBRARY = "libc++"; 405 | CLANG_ENABLE_MODULES = YES; 406 | CLANG_ENABLE_OBJC_ARC = YES; 407 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 408 | CLANG_WARN_BOOL_CONVERSION = YES; 409 | CLANG_WARN_COMMA = YES; 410 | CLANG_WARN_CONSTANT_CONVERSION = YES; 411 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 412 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 413 | CLANG_WARN_EMPTY_BODY = YES; 414 | CLANG_WARN_ENUM_CONVERSION = YES; 415 | CLANG_WARN_INFINITE_RECURSION = YES; 416 | CLANG_WARN_INT_CONVERSION = YES; 417 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 418 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 419 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 420 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 421 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 422 | CLANG_WARN_STRICT_PROTOTYPES = YES; 423 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 424 | CLANG_WARN_UNREACHABLE_CODE = YES; 425 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 426 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 427 | COPY_PHASE_STRIP = NO; 428 | DEBUG_INFORMATION_FORMAT = dwarf; 429 | ENABLE_STRICT_OBJC_MSGSEND = YES; 430 | ENABLE_TESTABILITY = YES; 431 | GCC_C_LANGUAGE_STANDARD = gnu99; 432 | GCC_DYNAMIC_NO_PIC = NO; 433 | GCC_NO_COMMON_BLOCKS = YES; 434 | GCC_OPTIMIZATION_LEVEL = 0; 435 | GCC_PREPROCESSOR_DEFINITIONS = ( 436 | "DEBUG=1", 437 | "$(inherited)", 438 | ); 439 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 440 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 441 | GCC_WARN_UNDECLARED_SELECTOR = YES; 442 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 443 | GCC_WARN_UNUSED_FUNCTION = YES; 444 | GCC_WARN_UNUSED_VARIABLE = YES; 445 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 446 | MTL_ENABLE_DEBUG_INFO = YES; 447 | ONLY_ACTIVE_ARCH = YES; 448 | SDKROOT = iphoneos; 449 | TARGETED_DEVICE_FAMILY = "1,2"; 450 | }; 451 | name = Debug; 452 | }; 453 | 97C147041CF9000F007C117D /* Release */ = { 454 | isa = XCBuildConfiguration; 455 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 456 | buildSettings = { 457 | ALWAYS_SEARCH_USER_PATHS = NO; 458 | CLANG_ANALYZER_NONNULL = YES; 459 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 460 | CLANG_CXX_LIBRARY = "libc++"; 461 | CLANG_ENABLE_MODULES = YES; 462 | CLANG_ENABLE_OBJC_ARC = YES; 463 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 464 | CLANG_WARN_BOOL_CONVERSION = YES; 465 | CLANG_WARN_COMMA = YES; 466 | CLANG_WARN_CONSTANT_CONVERSION = YES; 467 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 468 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 469 | CLANG_WARN_EMPTY_BODY = YES; 470 | CLANG_WARN_ENUM_CONVERSION = YES; 471 | CLANG_WARN_INFINITE_RECURSION = YES; 472 | CLANG_WARN_INT_CONVERSION = YES; 473 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 474 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 475 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 476 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 477 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 478 | CLANG_WARN_STRICT_PROTOTYPES = YES; 479 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 480 | CLANG_WARN_UNREACHABLE_CODE = YES; 481 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 482 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 483 | COPY_PHASE_STRIP = NO; 484 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 485 | ENABLE_NS_ASSERTIONS = NO; 486 | ENABLE_STRICT_OBJC_MSGSEND = YES; 487 | GCC_C_LANGUAGE_STANDARD = gnu99; 488 | GCC_NO_COMMON_BLOCKS = YES; 489 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 490 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 491 | GCC_WARN_UNDECLARED_SELECTOR = YES; 492 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 493 | GCC_WARN_UNUSED_FUNCTION = YES; 494 | GCC_WARN_UNUSED_VARIABLE = YES; 495 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 496 | MTL_ENABLE_DEBUG_INFO = NO; 497 | SDKROOT = iphoneos; 498 | SUPPORTED_PLATFORMS = iphoneos; 499 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 500 | TARGETED_DEVICE_FAMILY = "1,2"; 501 | VALIDATE_PRODUCT = YES; 502 | }; 503 | name = Release; 504 | }; 505 | 97C147061CF9000F007C117D /* Debug */ = { 506 | isa = XCBuildConfiguration; 507 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 508 | buildSettings = { 509 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 510 | CLANG_ENABLE_MODULES = YES; 511 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 512 | ENABLE_BITCODE = NO; 513 | FRAMEWORK_SEARCH_PATHS = ( 514 | "$(inherited)", 515 | "$(PROJECT_DIR)/Flutter", 516 | ); 517 | INFOPLIST_FILE = Runner/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 519 | LIBRARY_SEARCH_PATHS = ( 520 | "$(inherited)", 521 | "$(PROJECT_DIR)/Flutter", 522 | ); 523 | PRODUCT_BUNDLE_IDENTIFIER = com.mayanktolani.vitask; 524 | PRODUCT_NAME = "$(TARGET_NAME)"; 525 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 526 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 527 | SWIFT_VERSION = 5.0; 528 | VERSIONING_SYSTEM = "apple-generic"; 529 | }; 530 | name = Debug; 531 | }; 532 | 97C147071CF9000F007C117D /* Release */ = { 533 | isa = XCBuildConfiguration; 534 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 535 | buildSettings = { 536 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 537 | CLANG_ENABLE_MODULES = YES; 538 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 539 | ENABLE_BITCODE = NO; 540 | FRAMEWORK_SEARCH_PATHS = ( 541 | "$(inherited)", 542 | "$(PROJECT_DIR)/Flutter", 543 | ); 544 | INFOPLIST_FILE = Runner/Info.plist; 545 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 546 | LIBRARY_SEARCH_PATHS = ( 547 | "$(inherited)", 548 | "$(PROJECT_DIR)/Flutter", 549 | ); 550 | PRODUCT_BUNDLE_IDENTIFIER = com.mayanktolani.vitask; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 553 | SWIFT_VERSION = 5.0; 554 | VERSIONING_SYSTEM = "apple-generic"; 555 | }; 556 | name = Release; 557 | }; 558 | /* End XCBuildConfiguration section */ 559 | 560 | /* Begin XCConfigurationList section */ 561 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | 97C147031CF9000F007C117D /* Debug */, 565 | 97C147041CF9000F007C117D /* Release */, 566 | 249021D3217E4FDB00AE95B9 /* Profile */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | defaultConfigurationName = Release; 570 | }; 571 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 572 | isa = XCConfigurationList; 573 | buildConfigurations = ( 574 | 97C147061CF9000F007C117D /* Debug */, 575 | 97C147071CF9000F007C117D /* Release */, 576 | 249021D4217E4FDB00AE95B9 /* Profile */, 577 | ); 578 | defaultConfigurationIsVisible = 0; 579 | defaultConfigurationName = Release; 580 | }; 581 | /* End XCConfigurationList section */ 582 | }; 583 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 584 | } 585 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"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/_/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png -------------------------------------------------------------------------------- /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 | vitask 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/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/Widgets/drawer_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget drawerTile( 4 | BuildContext context, MaterialPageRoute mPR, Icon icon, String text) { 5 | return ListTile( 6 | leading: icon, 7 | dense: true, 8 | title: Text( 9 | text, 10 | style: TextStyle(fontSize: 14, fontStyle: FontStyle.normal), 11 | ), 12 | onTap: () async { 13 | Navigator.pop(context); 14 | Navigator.push( 15 | context, 16 | mPR, 17 | ); 18 | }, 19 | ); 20 | } 21 | 22 | Widget div() { 23 | return Divider( 24 | thickness: 1, 25 | color: Colors.indigo, 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /lib/Widgets/linear_gradient.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | // List colors = [ 4 | // Color.fromRGBO(13, 50, 77, 100), 5 | // Color.fromRGBO(0, 0, 10, 10) 6 | // ]; 7 | LinearGradient gradient() { 8 | return LinearGradient( 9 | begin: Alignment.topCenter, 10 | end: Alignment.bottomCenter, 11 | colors: [Color.fromRGBO(13, 50, 77, 100), Color.fromRGBO(0, 0, 10, 10)]); 12 | } 13 | -------------------------------------------------------------------------------- /lib/Widgets/show_toast.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttertoast/fluttertoast.dart'; 3 | 4 | void showToast( 5 | String text, 6 | Color color, 7 | ) { 8 | Fluttertoast.showToast( 9 | msg: text, 10 | toastLength: Toast.LENGTH_SHORT, 11 | gravity: ToastGravity.BOTTOM, 12 | timeInSecForIosWeb: 1, 13 | backgroundColor: color, 14 | textColor: Colors.white, 15 | fontSize: 16.0); 16 | } 17 | -------------------------------------------------------------------------------- /lib/api.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | 7 | import 'Widgets/show_toast.dart'; 8 | 9 | class API { 10 | Future getAPIData(String url, Map body) async { 11 | String msg = jsonEncode(body); 12 | var UriUrl = Uri.parse(url); 13 | http.Response response; 14 | try { 15 | response = await http.post( 16 | UriUrl, 17 | body: msg, 18 | headers: { 19 | 'Content-Type': 'application/json', 20 | 'X-VITASK-API': 21 | 'ed83118d24cb1bd4458ab10ed1db49bf9416597a86914cb6fd7e25318bf344a5c335583e7eb1a37982c0d446015c6ff2de76e161b77db9b4a01d26d71d507d14' 22 | }, 23 | ).timeout(const Duration(seconds: 10)); 24 | } on TimeoutException catch (_) { 25 | showToast('Something went wrong', Colors.red); 26 | } catch (e) { 27 | showToast('Something went wrong', Colors.red); 28 | print(e); 29 | } 30 | if (response.statusCode < 300 && response.statusCode > 100) { 31 | String data = response.body; 32 | return json.decode(data); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_circular_chart/flutter_circular_chart.dart'; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | 5 | class GlobalWidget { 6 | GlobalKey chartKey = 7 | GlobalKey(); 8 | } 9 | 10 | const kSendButtonTextStyle = TextStyle( 11 | color: Colors.lightBlueAccent, 12 | fontWeight: FontWeight.bold, 13 | fontSize: 18.0, 14 | ); 15 | 16 | const kMessageTextFieldDecoration = InputDecoration( 17 | contentPadding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0), 18 | hintText: 'Type your message here...', 19 | border: InputBorder.none, 20 | ); 21 | 22 | const kMessageContainerDecoration = BoxDecoration( 23 | border: Border( 24 | top: BorderSide(color: Colors.red, width: 2.0), 25 | ), 26 | ); 27 | 28 | const kTextFieldDecoration = InputDecoration( 29 | contentPadding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0), 30 | border: OutlineInputBorder( 31 | borderRadius: BorderRadius.all(Radius.circular(32.0)), 32 | ), 33 | enabledBorder: OutlineInputBorder( 34 | borderSide: const BorderSide( 35 | color: Colors.blue, 36 | width: 0.0, 37 | ), 38 | borderRadius: BorderRadius.all( 39 | Radius.circular(35), 40 | ), 41 | ), 42 | focusedBorder: OutlineInputBorder( 43 | borderSide: BorderSide(color: Colors.redAccent, width: 2.0), 44 | borderRadius: BorderRadius.all(Radius.circular(32.0)), 45 | ), 46 | ); 47 | const kTextFieldDecorationMoodle = InputDecoration( 48 | contentPadding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0), 49 | border: OutlineInputBorder( 50 | borderRadius: BorderRadius.all(Radius.circular(32.0)), 51 | ), 52 | enabledBorder: OutlineInputBorder( 53 | borderSide: BorderSide(color: Colors.orange, width: 1.0), 54 | borderRadius: BorderRadius.all(Radius.circular(32.0)), 55 | ), 56 | focusedBorder: OutlineInputBorder( 57 | borderSide: BorderSide(color: Colors.orange, width: 2.0), 58 | borderRadius: BorderRadius.all(Radius.circular(32.0)), 59 | ), 60 | ); 61 | 62 | TextStyle ktt = TextStyle( 63 | color: Colors.white, 64 | fontSize: 25, 65 | fontWeight: FontWeight.w300, 66 | ); 67 | 68 | class Texts extends StatelessWidget { 69 | final String text; 70 | final double fontSize; 71 | Texts(this.text, this.fontSize); 72 | 73 | @override 74 | Widget build(BuildContext context) { 75 | return Text( 76 | '$text', 77 | style: GoogleFonts.comfortaa( 78 | //fontWeight: FontWeight.bold, 79 | textStyle: TextStyle( 80 | letterSpacing: .5, 81 | fontSize: fontSize, 82 | ), 83 | ), 84 | ); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/database/MoodleModel.dart: -------------------------------------------------------------------------------- 1 | class MoodleData { 2 | String moodleKey; 3 | Map moodleData; 4 | MoodleData(this.moodleKey, this.moodleData); 5 | } 6 | -------------------------------------------------------------------------------- /lib/database/Moodle_DAO.dart: -------------------------------------------------------------------------------- 1 | import 'package:sembast/sembast.dart'; 2 | import 'MoodleModel.dart'; 3 | import 'database_setup.dart'; 4 | 5 | class MoodleDAO { 6 | var store = StoreRef.main(); 7 | Future get _db async => await AppDatabase.instance.database; 8 | void insertMoodleData(MoodleData moodleData) async { 9 | await store 10 | .record(moodleData.moodleKey) 11 | .put(await _db, moodleData.moodleData); 12 | } 13 | 14 | Future> getMoodleData(String key) async { 15 | var settings = await store.record(key).get(await _db) as Map; 16 | return settings; 17 | } 18 | 19 | Future deleteStudent(MoodleData moodleData) async { 20 | await store.record(moodleData.moodleKey).delete(await _db); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/database/StudentModel.dart: -------------------------------------------------------------------------------- 1 | class Student { 2 | String profileKey; 3 | String timeTableKey; 4 | String attendanceKey; 5 | String marksKey; 6 | String acadHistoryKey; 7 | Map profile; 8 | Map timeTable; 9 | Map attendance; 10 | Map marks; 11 | Map acadHistory; 12 | 13 | Student( 14 | {this.profileKey, 15 | this.profile, 16 | this.timeTableKey, 17 | this.timeTable, 18 | this.attendanceKey, 19 | this.attendance, 20 | this.marksKey, 21 | this.marks, 22 | this.acadHistoryKey, 23 | this.acadHistory}); 24 | } 25 | -------------------------------------------------------------------------------- /lib/database/Student_DAO.dart: -------------------------------------------------------------------------------- 1 | import 'package:sembast/sembast.dart'; 2 | import 'StudentModel.dart'; 3 | import 'database_setup.dart'; 4 | 5 | class StudentDao { 6 | var store = StoreRef.main(); 7 | 8 | Future get _db async => await AppDatabase.instance.database; 9 | 10 | void insertStudent(Student student) async { 11 | await store.record(student.profileKey).put(await _db, student.profile); 12 | await store 13 | .record(student.attendanceKey) 14 | .put(await _db, student.attendance); 15 | await store.record(student.timeTableKey).put(await _db, student.timeTable); 16 | await store.record(student.marksKey).put(await _db, student.marks); 17 | await store 18 | .record(student.acadHistoryKey) 19 | .put(await _db, student.acadHistory); 20 | } 21 | 22 | Future> getData(String key) async { 23 | var settings = await store.record(key).get(await _db) as Map; 24 | return settings; 25 | } 26 | 27 | Future deleteStudent(Student student) async { 28 | if (getData(student.marksKey) != null && 29 | getData(student.attendanceKey) != null && 30 | getData(student.profileKey) != null && 31 | getData(student.timeTableKey) != null && 32 | getData(student.acadHistoryKey) != null) { 33 | await store.record(student.profileKey).delete(await _db); 34 | await store.record(student.attendanceKey).delete(await _db); 35 | await store.record(student.timeTableKey).delete(await _db); 36 | await store.record(student.marksKey).delete(await _db); 37 | await store.record(student.acadHistoryKey).delete(await _db); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/database/database_setup.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:path_provider/path_provider.dart'; 4 | import 'package:sembast/sembast.dart'; 5 | import 'package:sembast/sembast_io.dart'; 6 | import 'package:path/path.dart'; 7 | 8 | class AppDatabase { 9 | static final AppDatabase _singleton = AppDatabase._(); 10 | 11 | static AppDatabase get instance => _singleton; 12 | 13 | // Completer is used for transforming synchronous code into asynchronous code. 14 | Completer _dbOpenCompleter; 15 | 16 | // A private constructor. Allows us to create instances of AppDatabase 17 | // only from within the AppDatabase class itself. 18 | AppDatabase._(); 19 | 20 | // Database object accessor 21 | Future get database async { 22 | // If completer is null, AppDatabaseClass is newly instantiated, so database is not yet opened 23 | if (_dbOpenCompleter == null) { 24 | _dbOpenCompleter = Completer(); 25 | // Calling _openDatabase will also complete the completer with database instance 26 | _openDatabase(); 27 | } 28 | // If the database is already opened, awaiting the future will happen instantly. 29 | // Otherwise, awaiting the returned future will take some time - until complete() is called 30 | // on the Completer in _openDatabase() below. 31 | return _dbOpenCompleter.future; 32 | } 33 | 34 | Future _openDatabase() async { 35 | // Get a platform-specific directory where persistent app data can be stored 36 | final appDocumentDir = await getApplicationDocumentsDirectory(); 37 | // Path with the form: /platform-specific-directory/demo.db 38 | final dbPath = join(appDocumentDir.path, 'Students9.db'); 39 | 40 | final database = await databaseFactoryIo.openDatabase(dbPath); 41 | 42 | // Any code awaiting the Completer's future will now start executing 43 | _dbOpenCompleter.complete(database); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/functions/calculate_attendance.dart: -------------------------------------------------------------------------------- 1 | import 'package:vitask/database/Student_DAO.dart'; 2 | 3 | class CalculateAttendance { 4 | CalculateAttendance(this.att, this.reg); 5 | var att, reg; 6 | 7 | List attendanceDetails() { 8 | StudentDao().getData(reg + "-attendance"); 9 | att = att["attendance"]; 10 | var keys = att.keys.toList(); 11 | int attend = 0; 12 | int total = 0; 13 | List a = []; 14 | for (var i = 0; i < att.length; i++) { 15 | attend = attend + (att[keys[i]]["attended"]); 16 | total = total + (att[keys[i]]["total"]); 17 | } 18 | a.add(total.toString()); 19 | a.add(attend.toString()); 20 | a.add((attend / total * 100).toStringAsFixed(2)); 21 | return a; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/functions/logout.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:vitask/screens/welcome_screen.dart'; 5 | 6 | void logoutUser(BuildContext context, 7 | FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin) async { 8 | SharedPreferences prefs = await SharedPreferences.getInstance(); 9 | prefs?.clear(); 10 | await flutterLocalNotificationsPlugin.cancelAll(); 11 | Navigator.of(context).pushAndRemoveUntil( 12 | MaterialPageRoute(builder: (context) => WelcomeScreen()), 13 | (Route route) => false); 14 | } 15 | -------------------------------------------------------------------------------- /lib/functions/navigate_moodle.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | import 'package:vitask/database/MoodleModel.dart'; 4 | import 'package:vitask/database/Moodle_DAO.dart'; 5 | import 'package:vitask/functions/test_internet.dart'; 6 | import 'package:vitask/screens/moodle.dart'; 7 | import 'package:vitask/screens/moodle_login.dart'; 8 | import '../api.dart'; 9 | 10 | void navigateMoodle( 11 | BuildContext context, Map profileData) async { 12 | SharedPreferences prefs = await SharedPreferences.getInstance(); 13 | var moodlePassword = prefs.getString("moodle-password"); 14 | if (moodlePassword == null) { 15 | Navigator.push( 16 | context, 17 | MaterialPageRoute( 18 | builder: (context) => 19 | MoodleLogin(profileData["RegNo"], profileData["APItoken"]), 20 | ), 21 | ); 22 | } else { 23 | Map moodleData = 24 | await MoodleDAO().getMoodleData(profileData["RegNo"] + "-moodle"); 25 | Navigator.push( 26 | context, 27 | MaterialPageRoute( 28 | builder: (context) => Moodle( 29 | profileData["RegNo"], 30 | profileData["APItoken"], 31 | moodleData, 32 | ), 33 | ), 34 | ); 35 | } 36 | } 37 | 38 | void getMoodleData(Map profileData) async { 39 | String r = profileData["RegNo"]; 40 | String a = profileData["APItoken"]; 41 | SharedPreferences prefs = await SharedPreferences.getInstance(); 42 | var moodlePassword = prefs.getString("moodle-password"); 43 | if(moodlePassword!=null){String url = "https://vitask.me/api/moodle/login"; 44 | API api = API(); 45 | Map data = { 46 | "username": r, 47 | "token": a, 48 | "password": moodlePassword 49 | }; 50 | bool internet = await testInternet(); 51 | if (internet) { 52 | Map moodleData = await api.getAPIData(url, data); 53 | if (moodleData != null) { 54 | MoodleData m = MoodleData(r + "-moodle", moodleData); 55 | MoodleDAO().insertMoodleData(m); 56 | } 57 | }} 58 | 59 | } 60 | -------------------------------------------------------------------------------- /lib/functions/notifications.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 2 | 3 | Future scheduleNotification( 4 | DateTime t, 5 | String c, 6 | String startTime, 7 | String venue, 8 | FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin, 9 | int count) async { 10 | if (t.isAfter(DateTime.now())) { 11 | var scheduledNotificationDateTime = t.subtract(Duration(seconds: 350)); 12 | var androidPlatformChannelSpecifics = AndroidNotificationDetails( 13 | 'your other channel id', 14 | 'your other channel name', 15 | 'your other channel description', 16 | ); 17 | NotificationDetails platformChannelSpecifics = 18 | NotificationDetails(android: androidPlatformChannelSpecifics); 19 | await flutterLocalNotificationsPlugin.schedule(count, c + " - " + venue, 20 | startTime, scheduledNotificationDateTime, platformChannelSpecifics); 21 | } 22 | } 23 | 24 | Future onSelectNotification(String payload) async { 25 | // showDialog( 26 | // context: context, 27 | // builder: (_) { 28 | // return new AlertDialog( 29 | // title: Text("PayLoad"), 30 | // content: Text("Payload : $payload"), 31 | // ); 32 | // }, 33 | // ); 34 | } 35 | -------------------------------------------------------------------------------- /lib/functions/test_internet.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | Future testInternet() async { 4 | try { 5 | final result = await InternetAddress.lookup('google.com'); 6 | if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) { 7 | return true; 8 | } 9 | } on SocketException catch (_) { 10 | return false; 11 | } 12 | return false; 13 | } 14 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; 4 | import 'package:vitask/screens/splash_screen.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | 7 | void main() => runApp(Vitask()); 8 | 9 | class Vitask extends StatelessWidget { 10 | // This widget is the root of your application. 11 | @override 12 | Widget build(BuildContext context) { 13 | SystemChrome.setPreferredOrientations([ 14 | DeviceOrientation.portraitUp, 15 | DeviceOrientation.portraitDown, 16 | ]); 17 | // hi(); 18 | return KeyboardDismissOnTap( 19 | child: MaterialApp( 20 | debugShowCheckedModeBanner: false, 21 | title: 'VITask', 22 | theme: ThemeData.dark(), 23 | home: SplashScreen(), 24 | ), 25 | ); 26 | } 27 | 28 | // void hi() async { 29 | // SharedPreferences preferences = await SharedPreferences.getInstance(); 30 | // preferences.clear(); 31 | // } 32 | } 33 | -------------------------------------------------------------------------------- /lib/screens/acadhistory.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:vitask/Widgets/linear_gradient.dart'; 3 | import 'package:vitask/screens/classacad.dart'; 4 | import 'package:vitask/constants.dart'; 5 | 6 | class AcademicHistory extends StatefulWidget { 7 | AcademicHistory(this.acadHistory); 8 | final Map acadHistory; 9 | @override 10 | _AcademicHistoryState createState() => _AcademicHistoryState(); 11 | } 12 | 13 | class _AcademicHistoryState extends State { 14 | Map acad; 15 | Map curriculum; 16 | List courses = []; 17 | List numbers = []; 18 | List grades = []; 19 | List elements = []; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | getData(); 25 | setState(() { 26 | courses.clear(); 27 | numbers.clear(); 28 | }); 29 | } 30 | 31 | void getData() { 32 | acad = widget.acadHistory['acadHistory']; 33 | curriculum = widget.acadHistory['CurriculumDetails']; 34 | } 35 | 36 | Widget summary(Map curriculum) { 37 | double width = MediaQuery.of(context).size.width; 38 | 39 | double height = MediaQuery.of(context).size.height; 40 | return Container( 41 | // decoration: BoxDecoration( 42 | // color: Colors.blue[900], 43 | // borderRadius: BorderRadius.all(Radius.circular(20)), 44 | // border: Border.all( 45 | // color: Colors.blue[700], 46 | // ), 47 | // ), 48 | height: height / 4, 49 | width: width / 1.09, 50 | child: Padding( 51 | padding: const EdgeInsets.all(4.0), 52 | child: Column( 53 | crossAxisAlignment: CrossAxisAlignment.start, 54 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 55 | children: [ 56 | Row( 57 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 58 | children: [ 59 | Texts("CGPA", 18), 60 | Texts(curriculum['CGPA'], 18), 61 | ], 62 | ), 63 | SizedBox(height: 3), 64 | Row( 65 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 66 | children: [ 67 | Texts("Credits Registered", 18), 68 | Texts("${curriculum['CreditsRegistered']}", 18), 69 | ], 70 | ), 71 | SizedBox(height: 3), 72 | Row( 73 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 74 | children: [ 75 | Texts("Credits Earned", 18), 76 | Texts("${curriculum['CreditsEarned']}", 18), 77 | ], 78 | ), 79 | // SizedBox(height: 3), 80 | Divider(color: Colors.white), 81 | Container( 82 | // padding: EdgeInsets.all(4), 83 | // decoration: BoxDecoration( 84 | // color: Color.fromRGBO(33, 35, 87, 100), 85 | // borderRadius: BorderRadius.all(Radius.circular(5)), 86 | // ), 87 | child: Row( 88 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 89 | children: [ 90 | Texts("S", 18), 91 | Texts("A", 18), 92 | Texts("B", 18), 93 | Texts("C", 18), 94 | Texts("D", 18), 95 | Texts("E", 18), 96 | Texts("F", 18), 97 | ], 98 | ), 99 | ), 100 | Divider(color: Colors.white), 101 | // SizedBox(height: 3), 102 | Padding( 103 | padding: const EdgeInsets.all(0), 104 | child: Row( 105 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 106 | children: [ 107 | Row( 108 | children: [ 109 | Texts(curriculum['S'], 18), 110 | ], 111 | ), 112 | Row( 113 | children: [ 114 | Texts(curriculum['A'], 18), 115 | ], 116 | ), 117 | Row( 118 | children: [ 119 | Texts(curriculum['B'], 18), 120 | ], 121 | ), 122 | Row( 123 | children: [ 124 | Texts(curriculum['C'], 18), 125 | ], 126 | ), 127 | Row( 128 | children: [ 129 | Texts(curriculum['D'], 18), 130 | ], 131 | ), 132 | Row( 133 | children: [ 134 | Texts(curriculum['E'], 18), 135 | ], 136 | ), 137 | Row( 138 | children: [ 139 | Texts(curriculum['F'], 18), 140 | ], 141 | ), 142 | ], 143 | ), 144 | ) 145 | ], 146 | ), 147 | ), 148 | ); 149 | } 150 | 151 | Widget elelist(Map acad) { 152 | double width = MediaQuery.of(context).size.width; 153 | grades = []; 154 | acad.forEach((k, v) => grades.add(v)); 155 | courses = []; 156 | acad.forEach((k, v) => courses.add( 157 | k, 158 | )); 159 | elements = []; 160 | var num = 0; 161 | while (num < grades.length) { 162 | elements.add(Acad(subject: courses[num], grade: grades[num].toString())); 163 | num++; 164 | } 165 | 166 | return SingleChildScrollView( 167 | child: Column( 168 | children: elements.map( 169 | (e) { 170 | return Container( 171 | child: Card( 172 | color: Colors.transparent, 173 | elevation: 0, 174 | child: Container( 175 | // 176 | margin: EdgeInsets.all(7), 177 | padding: EdgeInsets.all(0), 178 | decoration: BoxDecoration( 179 | borderRadius: BorderRadius.all(Radius.circular(20)), 180 | border: Border.all( 181 | color: Colors.blue[700], 182 | ), 183 | ), 184 | // 185 | height: 80, 186 | width: width / 1.09, 187 | child: Stack( 188 | children: [ 189 | Positioned( 190 | top: 20, 191 | bottom: 10, 192 | left: 10, 193 | right: 50, 194 | child: Texts(e.subject, 15), 195 | ), 196 | Positioned( 197 | top: 10, 198 | right: 10, 199 | child: ClipOval( 200 | child: Container( 201 | height: 49, 202 | width: 45, 203 | decoration: BoxDecoration( 204 | gradient: LinearGradient( 205 | begin: Alignment.topCenter, 206 | end: Alignment.bottomCenter, 207 | colors: [ 208 | Colors.indigo, 209 | Colors.blue[900], 210 | ], 211 | ), 212 | ), 213 | child: Padding( 214 | padding: const EdgeInsets.all(11.0), 215 | child: Card( 216 | elevation: 0, 217 | color: Colors.transparent, 218 | child: Center( 219 | child: Text( 220 | e.grade, 221 | style: TextStyle( 222 | fontSize: 15, 223 | color: Colors.greenAccent, 224 | ), 225 | ), 226 | ), 227 | ), 228 | ), 229 | ), 230 | ), 231 | ) 232 | ], 233 | ), 234 | ), 235 | ), 236 | ); 237 | }, 238 | ).toList(), 239 | ), 240 | ); 241 | } 242 | 243 | @override 244 | Widget build(BuildContext context) { 245 | double width = MediaQuery.of(context).size.width; 246 | double height = MediaQuery.of(context).size.height; 247 | return SafeArea( 248 | child: Container( 249 | decoration: BoxDecoration(gradient: gradient()), 250 | child: CustomScrollView( 251 | slivers: [ 252 | SliverAppBar( 253 | backgroundColor: Colors.transparent, 254 | expandedHeight: 10, 255 | floating: true, 256 | pinned: false, 257 | title: Text( 258 | "Academic History", 259 | style: TextStyle( 260 | fontSize: 20, 261 | ), 262 | ), 263 | ), 264 | SliverToBoxAdapter( 265 | child: Container( 266 | child: Column( 267 | children: [ 268 | Material( 269 | type: MaterialType.transparency, 270 | child: Container( 271 | margin: EdgeInsets.all(10), 272 | padding: EdgeInsets.all(15), 273 | decoration: BoxDecoration( 274 | color: Color.fromRGBO(50, 57, 250, 170), 275 | borderRadius: BorderRadius.all(Radius.circular(20)), 276 | ), 277 | // 278 | height: height / 3, 279 | width: width / 1.09, 280 | child: Stack( 281 | children: [ 282 | Align( 283 | alignment: Alignment.topCenter, 284 | child: Texts('Your Curriculum Details', 20)), 285 | Align( 286 | alignment: Alignment.bottomCenter, 287 | child: summary(curriculum), 288 | ), 289 | ], 290 | ), 291 | ), 292 | ), 293 | elelist(acad), 294 | ], 295 | )), 296 | ), 297 | ], 298 | ), 299 | ), 300 | ); 301 | } 302 | } 303 | -------------------------------------------------------------------------------- /lib/screens/attendance.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:vitask/Widgets/linear_gradient.dart'; 3 | import 'package:vitask/constants.dart'; 4 | import 'package:vitask/screens/bunk_meter.dart'; 5 | import 'package:percent_indicator/circular_percent_indicator.dart'; 6 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 7 | 8 | class Attendance extends StatefulWidget { 9 | Attendance(this.attendance); 10 | final Map attendance; 11 | @override 12 | _AttendanceState createState() => _AttendanceState(); 13 | } 14 | 15 | class _AttendanceState extends State 16 | with AutomaticKeepAliveClientMixin { 17 | @override 18 | bool get wantKeepAlive => true; 19 | static List> attended; 20 | static int len; 21 | List i = [FontAwesomeIcons.bookOpen, FontAwesomeIcons.laptopCode]; 22 | int icon = 0; 23 | Map current; 24 | var attKeys; 25 | @override 26 | void initState() { 27 | super.initState(); 28 | getAttended(); 29 | } 30 | 31 | void getAttended() { 32 | attended = []; 33 | attKeys = widget.attendance["attendance"].keys.toList(); 34 | for (var i = 0; i < widget.attendance["attendance"].length; i++) 35 | attended.add(widget.attendance["attendance"][attKeys[i]]); 36 | len = attended.length; 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | super.build(context); 42 | return SafeArea( 43 | child: Container( 44 | decoration: BoxDecoration(gradient: gradient()), 45 | child: Scaffold( 46 | appBar: AppBar( 47 | title: Text('Attendance'), 48 | elevation: 0, 49 | backgroundColor: Colors.transparent, 50 | ), 51 | backgroundColor: Colors.transparent, 52 | body: attended.isNotEmpty 53 | ? ListView.builder( 54 | itemCount: len, 55 | itemBuilder: (BuildContext context, int index) { 56 | current = attended[index]; 57 | int p = current["percentage"]; 58 | var color1 = Colors.blue[800]; 59 | var color2 = Colors.blue[300]; 60 | if (p < 80 && p >= 75) { 61 | color1 = Colors.yellow[900]; 62 | color2 = Colors.yellow[400]; 63 | } else if (p < 75) { 64 | color1 = Colors.red[900]; 65 | color2 = Colors.red[300]; 66 | } 67 | String c = current["courseName"]; 68 | int a = current["attended"]; 69 | int t = current["total"]; 70 | String ty = current["type"]; 71 | IconData iconUsed; 72 | if (ty.contains("Theory") || ty.contains("Soft")) 73 | iconUsed = i[0]; 74 | else 75 | iconUsed = i[1]; 76 | var pie; 77 | pie = double.parse(p.toString()); 78 | return Container( 79 | margin: EdgeInsets.all(7), 80 | padding: EdgeInsets.all(0), 81 | decoration: BoxDecoration( 82 | borderRadius: BorderRadius.all(Radius.circular(20)), 83 | border: Border.all( 84 | color: color1, 85 | ), 86 | ), 87 | child: MaterialButton( 88 | padding: EdgeInsets.all(0), 89 | onPressed: () { 90 | Navigator.push( 91 | context, 92 | MaterialPageRoute( 93 | builder: (context) => BunkMeter(attended, index), 94 | ), 95 | ); 96 | }, 97 | child: Card( 98 | color: Colors.transparent, 99 | elevation: 0, 100 | margin: EdgeInsets.all(15), 101 | child: Column( 102 | children: [ 103 | Row( 104 | mainAxisAlignment: MainAxisAlignment.start, 105 | children: [ 106 | Expanded( 107 | flex: 2, 108 | child: Column( 109 | crossAxisAlignment: 110 | CrossAxisAlignment.start, 111 | children: [ 112 | Texts(c.toString(), 16), 113 | SizedBox(height: 4), 114 | Row( 115 | children: [ 116 | Texts(ty, 15), 117 | SizedBox(width: 8), 118 | Icon(iconUsed, 119 | size: 15, color: color1), 120 | ], 121 | ), 122 | SizedBox(height: 4), 123 | Texts(a.toString() + "/" + t.toString(), 124 | 15), 125 | ], 126 | ), 127 | ), 128 | CircularPercentIndicator( 129 | radius: 90.0, 130 | lineWidth: 6.0, 131 | percent: double.parse(pie.toString()) / 100, 132 | center: Texts(p.toString() + "%", 16), 133 | progressColor: color1, 134 | backgroundColor: color2, 135 | ), 136 | SizedBox(width: 8), 137 | Icon(Icons.navigate_next), 138 | ], 139 | ), 140 | SizedBox(height: 5), 141 | ], 142 | ), 143 | ), 144 | ), 145 | ); 146 | }) 147 | : Column( 148 | mainAxisAlignment: MainAxisAlignment.center, 149 | crossAxisAlignment: CrossAxisAlignment.center, 150 | children: [ 151 | Container( 152 | child: Texts( 153 | 'Semester has just started, attendance will be updated soon', 154 | 16)), 155 | ], 156 | ), 157 | ), 158 | ), 159 | ); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /lib/screens/bunk_meter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:percent_indicator/circular_percent_indicator.dart'; 5 | import 'package:vitask/Widgets/linear_gradient.dart'; 6 | import 'package:vitask/constants.dart'; 7 | 8 | class BunkMeter extends StatefulWidget { 9 | BunkMeter(this.current, this.i); 10 | final List> current; 11 | final i; 12 | @override 13 | _BunkMeterState createState() => _BunkMeterState(); 14 | } 15 | 16 | class _BunkMeterState extends State { 17 | static List> attended; 18 | static List ij; 19 | static var att, course, faculty, code; 20 | static double percent; 21 | static var total, a = 0, b = 0, color1, color2, type; 22 | @override 23 | void initState() { 24 | // TODO: implement initState 25 | super.initState(); 26 | getData(); 27 | } 28 | 29 | void getData() { 30 | ij = []; 31 | ij.add(widget.i); 32 | attended = []; 33 | for (var x = 0; x < widget.current.length; x++) { 34 | attended.add(widget.current[x]); 35 | } 36 | att = attended[ij[0]]["attended"]; 37 | course = attended[ij[0]]["courseName"]; 38 | faculty = attended[ij[0]]["faculty"]; 39 | code = attended[ij[0]]["code"]; 40 | type = attended[ij[0]]["type"]; 41 | percent = double.parse(attended[ij[0]]["percentage"].toString()); 42 | total = attended[ij[0]]["total"]; 43 | color1 = Colors.blue[800]; 44 | color2 = Colors.blue[300]; 45 | if (percent < 80 && percent >= 75) { 46 | color1 = Colors.yellow[900]; 47 | color2 = Colors.yellow[400]; 48 | } else if (percent < 75) { 49 | color1 = Colors.red[900]; 50 | color2 = Colors.red[300]; 51 | } 52 | a = 0; 53 | b = 0; 54 | } 55 | 56 | @override 57 | Widget build(BuildContext context) { 58 | return SafeArea( 59 | child: Container( 60 | padding: EdgeInsets.all(10), 61 | decoration: BoxDecoration(gradient: gradient()), 62 | child: Center( 63 | child: Scaffold( 64 | appBar: AppBar( 65 | title: Text('Bunk Meter'), 66 | elevation: 0, 67 | backgroundColor: Colors.transparent, 68 | ), 69 | backgroundColor: Colors.transparent, 70 | body: SingleChildScrollView( 71 | child: Column( 72 | mainAxisAlignment: MainAxisAlignment.start, 73 | children: [ 74 | Container( 75 | margin: EdgeInsets.all(7), 76 | padding: EdgeInsets.all(10), 77 | decoration: BoxDecoration( 78 | borderRadius: BorderRadius.all(Radius.circular(20)), 79 | border: Border.all( 80 | color: color1, 81 | ), 82 | ), 83 | child: Card( 84 | color: Colors.transparent, 85 | elevation: 0, 86 | margin: EdgeInsets.all(25), 87 | child: Column( 88 | crossAxisAlignment: CrossAxisAlignment.start, 89 | children: [ 90 | Texts( 91 | course.toString() + ' - ' + code.toString(), 18), 92 | SizedBox(height: 20), 93 | Texts(type.toString(), 16), 94 | SizedBox(height: 20), 95 | Texts(faculty.toString(), 14), 96 | ], 97 | ), 98 | ), 99 | ), 100 | SizedBox(height: 15), 101 | Container( 102 | margin: EdgeInsets.all(7), 103 | decoration: BoxDecoration( 104 | borderRadius: BorderRadius.all(Radius.circular(20)), 105 | border: Border.all( 106 | color: color1, 107 | ), 108 | ), 109 | child: Card( 110 | margin: EdgeInsets.all(18), 111 | color: Colors.transparent, 112 | elevation: 0, 113 | child: Row( 114 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 115 | children: [ 116 | Column( 117 | crossAxisAlignment: CrossAxisAlignment.start, 118 | children: [ 119 | Texts("Classes Attended", 16), 120 | SizedBox(height: 5), 121 | Texts( 122 | att.toString() + "/" + total.toString(), 16), 123 | ], 124 | ), 125 | CircularPercentIndicator( 126 | radius: 100.0, 127 | lineWidth: 6.0, 128 | percent: double.parse(percent.toString()) / 100, 129 | center: Texts(percent.ceil().toString() + "%", 16), 130 | progressColor: color1, 131 | backgroundColor: color2, 132 | ), 133 | ], 134 | ), 135 | ), 136 | ), 137 | SizedBox(height: 30), 138 | Column( 139 | children: [ 140 | Row( 141 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 142 | children: [ 143 | Container( 144 | margin: EdgeInsets.only(left: 20), 145 | child: Row( 146 | mainAxisAlignment: MainAxisAlignment.start, 147 | children: [ 148 | // SizedBox(width: 20), 149 | Texts("Attend + " + a.toString(), 17), 150 | ], 151 | ), 152 | ), 153 | SizedBox(width: 60), 154 | Row( 155 | children: [ 156 | IconButton( 157 | icon: Icon(FontAwesomeIcons.plus), 158 | onPressed: () { 159 | setState(() { 160 | att++; 161 | a++; 162 | total++; 163 | percent = att / total * 100; 164 | if (percent.ceil() >= 80) { 165 | color1 = Colors.blue[800]; 166 | color2 = Colors.blue[300]; 167 | } else if (percent.ceil() < 80 && 168 | percent.ceil() >= 75) { 169 | color1 = Colors.yellow[900]; 170 | color2 = Colors.yellow[400]; 171 | } else if (percent.ceil() < 75) { 172 | color1 = Colors.red[900]; 173 | color2 = Colors.red[300]; 174 | } 175 | }); 176 | }), 177 | IconButton( 178 | icon: Icon(FontAwesomeIcons.minus), 179 | color: Colors.red, 180 | onPressed: () { 181 | setState(() { 182 | if (a > 0) { 183 | att--; 184 | a--; 185 | total--; 186 | percent = att / total * 100; 187 | if (percent.ceil() >= 80) { 188 | color1 = Colors.blue[800]; 189 | color2 = Colors.blue[300]; 190 | } else if (percent.ceil() < 80 && 191 | percent.ceil() >= 75) { 192 | color1 = Colors.yellow[900]; 193 | color2 = Colors.yellow[400]; 194 | } else if (percent.ceil() < 75) { 195 | color1 = Colors.red[900]; 196 | color2 = Colors.red[300]; 197 | } 198 | } 199 | }); 200 | }), 201 | ], 202 | ), 203 | ], 204 | ), 205 | SizedBox(height: 20), 206 | Row( 207 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 208 | children: [ 209 | Container( 210 | margin: EdgeInsets.only(left: 20), 211 | child: Row( 212 | children: [ 213 | Texts("Bunk + " + b.toString(), 17), 214 | ], 215 | ), 216 | ), 217 | SizedBox(width: 60), 218 | Row( 219 | children: [ 220 | IconButton( 221 | icon: Icon(FontAwesomeIcons.plus), 222 | onPressed: () { 223 | setState(() { 224 | total++; 225 | b++; 226 | percent = att / total * 100; 227 | if (percent.ceil() >= 80) { 228 | color1 = Colors.blue[800]; 229 | color2 = Colors.blue[300]; 230 | } else if (percent.ceil() < 80 && 231 | percent.ceil() >= 75) { 232 | color1 = Colors.yellow[900]; 233 | color2 = Colors.yellow[400]; 234 | } else if (percent.ceil() < 75) { 235 | color1 = Colors.red[900]; 236 | color2 = Colors.red[300]; 237 | } 238 | }); 239 | }), 240 | IconButton( 241 | color: Colors.red, 242 | icon: Icon(FontAwesomeIcons.minus), 243 | onPressed: () { 244 | setState(() { 245 | if (b > 0) { 246 | b--; 247 | total--; 248 | percent = att / total * 100; 249 | if (percent.ceil() >= 80) { 250 | color1 = Colors.blue[800]; 251 | color2 = Colors.blue[300]; 252 | } else if (percent.ceil() < 80 && 253 | percent.ceil() >= 75) { 254 | color1 = Colors.yellow[900]; 255 | color2 = Colors.yellow[400]; 256 | } else if (percent.ceil() < 75) { 257 | color1 = Colors.red[900]; 258 | color2 = Colors.red[300]; 259 | } 260 | } 261 | }); 262 | }), 263 | ], 264 | ), 265 | ], 266 | ), 267 | SizedBox(height: 20), 268 | ], 269 | ), 270 | ], 271 | ), 272 | ), 273 | ), 274 | ), 275 | ), 276 | ); 277 | } 278 | } 279 | -------------------------------------------------------------------------------- /lib/screens/classacad.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/foundation.dart'; 3 | 4 | class Acad { 5 | String grade; 6 | String subject; 7 | 8 | 9 | Acad({ 10 | @required this.grade, 11 | @required this.subject, 12 | } 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /lib/screens/gpa_calculator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/rendering.dart'; 3 | import 'package:vitask/Widgets/linear_gradient.dart'; 4 | import 'package:vitask/constants.dart'; 5 | 6 | class GPACalculator extends StatefulWidget { 7 | final Map courses; 8 | final cgpa, creditsRegistered; 9 | GPACalculator(this.courses, this.cgpa, this.creditsRegistered); 10 | @override 11 | _GPACalculatorState createState() => _GPACalculatorState(); 12 | } 13 | 14 | class _GPACalculatorState extends State { 15 | var newCgpa, gpa, currentCredits; 16 | List courses; 17 | List credits; 18 | List values; 19 | @override 20 | void initState() { 21 | super.initState(); 22 | gpa = 9.0; 23 | courses = widget.courses.keys.toList(); 24 | credits = widget.courses.values.toList(); 25 | values = []; 26 | currentCredits = 0; 27 | for (var i = 0; i < credits.length; i++) { 28 | currentCredits = currentCredits + credits[i]; 29 | values.add(9.0); 30 | } 31 | calculateGpa(); 32 | calculateNewCgpa(); 33 | } 34 | 35 | calculateGpa() { 36 | double sum = 0.0; 37 | for (var i = 0; i < credits.length; i++) { 38 | sum = sum + double.parse(credits[i].toString()) * values[i]; 39 | } 40 | 41 | setState(() { 42 | gpa = double.parse((sum / currentCredits).toString()); 43 | }); 44 | } 45 | 46 | calculateNewCgpa() { 47 | newCgpa = (double.parse(widget.creditsRegistered.toString()) * 48 | double.parse(widget.cgpa.toString()) + 49 | double.parse(gpa.toString()) * 50 | double.parse(currentCredits.toString())) / 51 | (double.parse(currentCredits.toString()) + 52 | double.parse(widget.creditsRegistered.toString())); 53 | } 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | return SafeArea( 58 | child: Container( 59 | alignment: Alignment.topLeft, 60 | decoration: BoxDecoration(gradient: gradient()), 61 | child: Scaffold( 62 | backgroundColor: Colors.transparent, 63 | appBar: AppBar( 64 | elevation: 0, 65 | title: Text( 66 | 'GPA Calculator', 67 | style: TextStyle( 68 | fontWeight: FontWeight.bold, 69 | fontSize: 20, 70 | ), 71 | ), 72 | backgroundColor: Colors.transparent, 73 | ), 74 | body: SingleChildScrollView( 75 | child: Column( 76 | mainAxisAlignment: MainAxisAlignment.start, 77 | children: [ 78 | Container( 79 | padding: EdgeInsets.all(15), 80 | margin: EdgeInsets.symmetric( 81 | horizontal: 8, 82 | ), 83 | height: MediaQuery.of(context).size.height / 5, 84 | decoration: BoxDecoration( 85 | border: Border.all( 86 | color: Colors.blueAccent, 87 | ), 88 | borderRadius: BorderRadius.all(Radius.circular(20)), 89 | ), 90 | child: Column( 91 | children: [ 92 | Expanded( 93 | flex: 1, 94 | child: Row( 95 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 96 | children: [ 97 | Texts('Current CGPA', 15), 98 | Texts(widget.cgpa, 16) 99 | ], 100 | ), 101 | ), 102 | Divider(color: Colors.grey), 103 | Expanded( 104 | flex: 1, 105 | child: Row( 106 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 107 | children: [ 108 | Texts('New CGPA', 15), 109 | Texts(newCgpa.toStringAsFixed(2), 16) 110 | ], 111 | ), 112 | ), 113 | Divider(color: Colors.grey), 114 | Expanded( 115 | flex: 1, 116 | child: Row( 117 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 118 | children: [ 119 | Texts("GPA", 15), 120 | Texts(gpa.toStringAsFixed(2), 16) 121 | ], 122 | )), 123 | Divider(color: Colors.grey), 124 | ], 125 | ), 126 | ), 127 | SizedBox(height: 10), 128 | Divider( 129 | color: Colors.grey, 130 | ), 131 | SizedBox(height: 15), 132 | SingleChildScrollView( 133 | child: Column( 134 | crossAxisAlignment: CrossAxisAlignment.center, 135 | children: courses.map((m) { 136 | return Container( 137 | padding: EdgeInsets.all(4), 138 | child: Column( 139 | crossAxisAlignment: CrossAxisAlignment.center, 140 | children: [ 141 | Texts(m.toString(), 15), 142 | SizedBox(height: 5), 143 | Texts( 144 | credits[courses.indexOf(m)].toString() + 145 | " Credits", 146 | 15), 147 | Row( 148 | children: [ 149 | Expanded( 150 | flex: 11, 151 | child: Slider( 152 | min: 4, 153 | max: 10, 154 | divisions: 6, 155 | value: values[courses.indexOf(m)], 156 | onChanged: (double value) { 157 | setState(() { 158 | values[courses.indexOf(m)] = value; 159 | }); 160 | calculateGpa(); 161 | calculateNewCgpa(); 162 | }, 163 | ), 164 | ), 165 | Expanded(flex: 1, child: SizedBox()), 166 | Expanded( 167 | flex: 2, 168 | child: values[courses.indexOf(m)] == 10.0 169 | ? ClipRect( 170 | child: Container( 171 | padding: EdgeInsets.all(5), 172 | margin: EdgeInsets.symmetric( 173 | horizontal: 4), 174 | decoration: BoxDecoration( 175 | color: Colors.yellow[800], 176 | borderRadius: 177 | BorderRadius.circular(30), 178 | ), 179 | alignment: Alignment.center, 180 | child: Text( 181 | "S", 182 | style: TextStyle( 183 | fontSize: 18, 184 | color: Colors.black), 185 | ))) 186 | : values[courses.indexOf(m)] == 9.0 187 | ? ClipRect( 188 | child: Container( 189 | padding: EdgeInsets.all(5), 190 | margin: EdgeInsets.symmetric( 191 | horizontal: 4), 192 | decoration: BoxDecoration( 193 | color: Colors.blue, 194 | borderRadius: 195 | BorderRadius.circular( 196 | 30), 197 | ), 198 | alignment: Alignment.center, 199 | child: Text( 200 | "A", 201 | style: TextStyle( 202 | fontSize: 18, 203 | color: Colors.black), 204 | ))) 205 | : values[courses.indexOf(m)] == 8.0 206 | ? ClipRect( 207 | child: Container( 208 | padding: 209 | EdgeInsets.all(5), 210 | margin: 211 | EdgeInsets.symmetric( 212 | horizontal: 4), 213 | decoration: BoxDecoration( 214 | color: Colors.green, 215 | borderRadius: 216 | BorderRadius 217 | .circular(30), 218 | ), 219 | alignment: 220 | Alignment.center, 221 | child: Text( 222 | "B", 223 | style: TextStyle( 224 | fontSize: 18, 225 | color: 226 | Colors.black), 227 | ))) 228 | : values[courses.indexOf(m)] == 229 | 7.0 230 | ? ClipRect( 231 | child: Container( 232 | padding: 233 | EdgeInsets.all(5), 234 | margin: 235 | EdgeInsets.symmetric( 236 | horizontal: 237 | 4), 238 | decoration: 239 | BoxDecoration( 240 | color: 241 | Colors.blueGrey, 242 | borderRadius: 243 | BorderRadius 244 | .circular( 245 | 30), 246 | ), 247 | alignment: 248 | Alignment.center, 249 | child: Text( 250 | "C", 251 | style: TextStyle( 252 | fontSize: 18, 253 | color: Colors 254 | .black), 255 | ))) 256 | : values[courses.indexOf(m)] == 257 | 6.0 258 | ? ClipRect( 259 | child: Container( 260 | padding: 261 | EdgeInsets.all( 262 | 5), 263 | margin: EdgeInsets.symmetric( 264 | horizontal: 265 | 4), 266 | decoration: 267 | BoxDecoration( 268 | color: Colors 269 | .deepOrange, 270 | borderRadius: 271 | BorderRadius 272 | .circular( 273 | 30), 274 | ), 275 | alignment: 276 | Alignment 277 | .center, 278 | child: Text( 279 | "D", 280 | style: TextStyle( 281 | fontSize: 282 | 18, 283 | color: Colors 284 | .black), 285 | ))) 286 | : values[courses.indexOf(m)] == 287 | 5.0 288 | ? ClipRect( 289 | child: Container( 290 | padding: EdgeInsets.all(5), 291 | margin: EdgeInsets.symmetric(horizontal: 4), 292 | decoration: BoxDecoration( 293 | color: Colors 294 | .red, 295 | borderRadius: 296 | BorderRadius.circular( 297 | 30), 298 | ), 299 | alignment: Alignment.center, 300 | child: Text( 301 | "E", 302 | style: TextStyle( 303 | fontSize: 304 | 18, 305 | color: Colors 306 | .black), 307 | ))) 308 | : ClipRect( 309 | child: Container( 310 | padding: EdgeInsets.all(5), 311 | margin: EdgeInsets.symmetric(horizontal: 4), 312 | decoration: BoxDecoration( 313 | color: Colors 314 | .red[ 315 | 800], 316 | borderRadius: 317 | BorderRadius.circular( 318 | 30), 319 | ), 320 | alignment: Alignment.center, 321 | child: Text( 322 | "F", 323 | style: TextStyle( 324 | fontSize: 325 | 18, 326 | color: Colors 327 | .black), 328 | ))), 329 | ), 330 | Expanded(flex: 1, child: SizedBox()) 331 | ], 332 | ), 333 | SizedBox(height: 25), 334 | ], 335 | ), 336 | ); 337 | }).toList(), 338 | ), 339 | ), 340 | ], 341 | ), 342 | ), 343 | ), 344 | ), 345 | ); 346 | } 347 | } 348 | -------------------------------------------------------------------------------- /lib/screens/marks.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:vitask/Widgets/linear_gradient.dart'; 3 | import 'marksheet.dart'; 4 | import 'package:vitask/constants.dart'; 5 | import 'package:auto_size_text/auto_size_text.dart'; 6 | 7 | class Marks extends StatefulWidget { 8 | Marks(this.marks); 9 | final Map marks; 10 | @override 11 | _MarksState createState() => _MarksState(); 12 | } 13 | 14 | class _MarksState extends State { 15 | List courses; 16 | List mark; 17 | 18 | List marele = []; 19 | List exeele = []; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | getData(); 25 | } 26 | 27 | void getData() { 28 | courses = widget.marks['marks'].keys.toList(); 29 | mark = widget.marks['marks'].values.toList(); 30 | 31 | marele = []; 32 | var num = 0; 33 | while (num < courses.length) { 34 | marele.add(Marksheet(subject: courses[num], group: mark[num])); 35 | num++; 36 | } 37 | } 38 | 39 | Widget marlist() { 40 | return Container( 41 | width: double.infinity, 42 | child: Column( 43 | children: marele.map((mr) { 44 | return Container( 45 | width: double.infinity, 46 | child: Card( 47 | color: Colors.transparent, 48 | elevation: 0, 49 | child: ClipRRect( 50 | borderRadius: BorderRadius.circular(20), 51 | child: Container( 52 | padding: EdgeInsets.all(3.0), 53 | decoration: BoxDecoration( 54 | borderRadius: BorderRadius.all(Radius.circular(20)), 55 | border: Border.all( 56 | color: Colors.blueAccent, 57 | ), 58 | ), 59 | child: Container( 60 | child: Card( 61 | elevation: 0, 62 | shape: RoundedRectangleBorder( 63 | borderRadius: BorderRadius.circular(16.0), 64 | ), 65 | color: Colors.transparent, 66 | child: Column( 67 | crossAxisAlignment: CrossAxisAlignment.start, 68 | children: [ 69 | Padding( 70 | padding: EdgeInsets.symmetric( 71 | vertical: 24, horizontal: 20), 72 | child: Texts(mr.subject, 16), 73 | ), 74 | Container( 75 | width: double.infinity, 76 | padding: EdgeInsets.all(24.0), 77 | child: minimar(mr.group)), 78 | ], 79 | ), 80 | ), 81 | ), 82 | ), 83 | ), 84 | ), 85 | ); 86 | }).toList(), 87 | )); 88 | } 89 | 90 | Widget minimar(var group) { 91 | List examnames = []; 92 | List examvalues = []; 93 | List exeele = []; 94 | 95 | group.forEach((k, v) => examnames.add(k)); 96 | 97 | group.forEach((k, v) => examvalues.add(v)); 98 | 99 | var num = 0; 100 | while (num < examnames.length) { 101 | exeele.add(Exam(exname: examnames[num], val: examvalues[num])); 102 | num++; 103 | } 104 | 105 | return Container( 106 | color: Colors.transparent, 107 | child: SingleChildScrollView( 108 | child: Column( 109 | children: exeele.map((e) { 110 | return Container( 111 | child: Column( 112 | children: [ 113 | Card( 114 | color: Colors.transparent, 115 | elevation: 0, 116 | child: Row( 117 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 118 | children: [ 119 | AutoSizeText(e.exname), 120 | ClipRRect( 121 | borderRadius: BorderRadius.circular(20), 122 | child: Container( 123 | // width: 40, 124 | // height: 40, 125 | //color: Color.fromRGBO(450, 0, 0, 5), 126 | color: Colors.indigo, 127 | child: Container( 128 | child: Card( 129 | color: Colors.transparent, 130 | elevation: 0, 131 | child: Center( 132 | child: AutoSizeText( 133 | '${e.val["scored"]}/${e.val["max"]}', 134 | style: TextStyle( 135 | color: Colors.greenAccent[100], 136 | fontSize: 17, 137 | )), 138 | ), 139 | ), 140 | ), 141 | ), 142 | ), 143 | ], 144 | ), 145 | ), 146 | Divider(color: Colors.grey) 147 | ], 148 | ), 149 | ); 150 | }).toList(), 151 | ))); 152 | } 153 | 154 | @override 155 | Widget build(BuildContext context) { 156 | return SafeArea( 157 | child: Container( 158 | decoration: BoxDecoration(gradient: gradient()), 159 | child: Scaffold( 160 | backgroundColor: Colors.transparent, 161 | body: CustomScrollView( 162 | slivers: [ 163 | SliverAppBar( 164 | backgroundColor: Colors.transparent, 165 | title: Text( 166 | "Marks", 167 | style: TextStyle( 168 | fontWeight: FontWeight.bold, 169 | fontSize: 20, 170 | ), 171 | ), 172 | floating: true, 173 | pinned: false, 174 | ), 175 | SliverPadding( 176 | padding: const EdgeInsets.all(11.0), 177 | sliver: SliverList( 178 | delegate: SliverChildListDelegate([ 179 | marlist(), 180 | ]), 181 | ), 182 | ), 183 | ], 184 | ), 185 | ), 186 | ), 187 | ); 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /lib/screens/marksheet.dart: -------------------------------------------------------------------------------- 1 | class Marksheet { 2 | String subject; 3 | 4 | var group; 5 | String exam; 6 | 7 | Marksheet({ 8 | this.subject, 9 | this.group, 10 | }); 11 | } 12 | 13 | class Exam { 14 | String exname; 15 | var val; 16 | Exam({this.exname, this.val}); 17 | } 18 | -------------------------------------------------------------------------------- /lib/screens/moodle.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_size_text/auto_size_text.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:intl/intl.dart'; 4 | import 'package:shared_preferences/shared_preferences.dart'; 5 | import 'package:vitask/Widgets/linear_gradient.dart'; 6 | import 'package:vitask/api.dart'; 7 | import 'package:vitask/constants.dart'; 8 | import 'package:vitask/database/MoodleModel.dart'; 9 | import 'package:vitask/database/Moodle_DAO.dart'; 10 | 11 | class Moodle extends StatefulWidget { 12 | Moodle(this.reg, this.appNo, this.moodle); 13 | Map moodle; 14 | final String reg, appNo; 15 | @override 16 | _MoodleState createState() => _MoodleState(); 17 | } 18 | 19 | class _MoodleState extends State { 20 | List assignments; 21 | bool refresh = false; 22 | var r, p, a; 23 | String updatedText = ""; 24 | 25 | @override 26 | void initState() { 27 | getData(); 28 | // updateAssignments(); 29 | updateDate(); 30 | super.initState(); 31 | } 32 | 33 | void getData() { 34 | assignments = []; 35 | if (widget.moodle.isNotEmpty) { 36 | for (var i = 0; i < widget.moodle["Assignments"].length; i++) { 37 | assignments.add(widget.moodle["Assignments"][i]); 38 | } 39 | } 40 | } 41 | 42 | void updateDate() { 43 | updatedText = " "; 44 | DateTime now = DateTime.now(); 45 | DateFormat formatter = DateFormat('yyyy-MMMM-dd-HH-mm'); 46 | String update = formatter.format(now); 47 | List updated = update.split('-'); 48 | setState(() { 49 | updatedText = updated[2] + 50 | " " + 51 | updated[1].substring(0, 3) + 52 | " " + 53 | updated[3] + 54 | ":" + 55 | updated[4]; 56 | }); 57 | } 58 | 59 | void updateAssignments() async { 60 | r = widget.reg; 61 | SharedPreferences prefs = await SharedPreferences.getInstance(); 62 | p = prefs.getString("moodle-password"); 63 | a = widget.appNo; 64 | String url = "https://vitask.me/api/moodle/sync"; 65 | API api = API(); 66 | Map data = {"token": a}; 67 | Map moodleData = await api.getAPIData(url, data); 68 | if (moodleData.isNotEmpty) { 69 | widget.moodle = moodleData; 70 | MoodleData m = MoodleData(r + "-moodle", moodleData); 71 | MoodleDAO().deleteStudent(m); 72 | MoodleDAO().insertMoodleData(m); 73 | getData(); 74 | } 75 | } 76 | 77 | @override 78 | Widget build(BuildContext context) { 79 | return SafeArea( 80 | child: Container( 81 | decoration: BoxDecoration(gradient: gradient()), 82 | child: Scaffold( 83 | backgroundColor: Colors.transparent, 84 | appBar: AppBar( 85 | title: Text('Moodle'), 86 | elevation: 0, 87 | backgroundColor: Colors.transparent, 88 | ), 89 | body: Column( 90 | children: [ 91 | SingleChildScrollView( 92 | child: Column( 93 | children: assignments.map((e) { 94 | int i = assignments.indexOf(e) + 1; 95 | return Container( 96 | decoration: BoxDecoration( 97 | border: Border.all( 98 | color: Colors.indigo, 99 | ), 100 | borderRadius: BorderRadius.all(Radius.circular(20)), 101 | ), 102 | padding: EdgeInsets.all(10), 103 | margin: EdgeInsets.all(9), 104 | child: Column( 105 | children: [ 106 | MaterialButton( 107 | padding: EdgeInsets.all(0), 108 | onPressed: () {}, 109 | child: Card( 110 | color: Colors.transparent, 111 | elevation: 0, 112 | child: Row( 113 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 114 | children: [ 115 | Expanded( 116 | flex: 1, 117 | child: Column( 118 | crossAxisAlignment: 119 | CrossAxisAlignment.start, 120 | children: [ 121 | // Row( 122 | // children: [ 123 | // Icon(FontAwesomeIcons.graduationCap, 124 | // size: 20, color: Colors.indigo), 125 | AutoSizeText( 126 | i.toString() + ". " + e["course"], 127 | maxFontSize: 18, 128 | minFontSize: 16, 129 | maxLines: 10, 130 | //textAlign: TextAlign.center, 131 | ), 132 | // ], 133 | // ), 134 | SizedBox(height: 8), 135 | AutoSizeText( 136 | e["name"] + ".", 137 | maxLines: 10, 138 | maxFontSize: 17, 139 | minFontSize: 15, 140 | //textAlign: TextAlign.start, 141 | ), 142 | SizedBox(height: 8), 143 | Row( 144 | children: [ 145 | // Icon(FontAwesomeIcons.clock, 146 | // size: 20, color: Colors.indigo), 147 | // SizedBox(width: 8), 148 | Texts( 149 | "Date: " + 150 | e["time"] 151 | .split(' ')[0] 152 | .toString(), 153 | 14), 154 | ], 155 | ), 156 | SizedBox(height: 8), 157 | Texts( 158 | "Time: " + 159 | e["time"] 160 | .split(' ')[1] 161 | .toString(), 162 | 14), 163 | SizedBox(height: 4), 164 | ], 165 | ), 166 | ), 167 | // SizedBox(width: 20), 168 | ], 169 | ), 170 | ), 171 | ), 172 | ], 173 | ), 174 | ); 175 | }).toList()), 176 | ), 177 | widget.moodle["Assignments"].length != 0 178 | ? Container( 179 | margin: EdgeInsets.symmetric(vertical: 10), 180 | child: Texts("Last Updated On: " + updatedText, 14)) 181 | : Column( 182 | children: [ 183 | Container( 184 | margin: EdgeInsets.symmetric(vertical: 10), 185 | alignment: Alignment.center, 186 | child: 187 | Texts("You currently have no assignments", 14)), 188 | Container( 189 | margin: EdgeInsets.symmetric(vertical: 10), 190 | alignment: Alignment.center, 191 | child: Texts("Last Updated On: " + updatedText, 14)) 192 | ], 193 | ) 194 | ], 195 | ), 196 | ), 197 | ), 198 | ); 199 | } 200 | } 201 | -------------------------------------------------------------------------------- /lib/screens/moodle_login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:modal_progress_hud/modal_progress_hud.dart'; 5 | import 'package:shared_preferences/shared_preferences.dart'; 6 | import 'package:vitask/Widgets/linear_gradient.dart'; 7 | import 'package:vitask/Widgets/show_toast.dart'; 8 | import 'package:vitask/api.dart'; 9 | import 'package:vitask/constants.dart'; 10 | import 'package:vitask/database/MoodleModel.dart'; 11 | import 'package:vitask/database/Moodle_DAO.dart'; 12 | import 'package:vitask/functions/test_internet.dart'; 13 | 14 | import 'moodle.dart'; 15 | 16 | class MoodleLogin extends StatefulWidget { 17 | MoodleLogin(this.regNo, this.token); 18 | final String regNo; 19 | final String token; 20 | @override 21 | _MoodleLoginState createState() => _MoodleLoginState(); 22 | } 23 | 24 | class _MoodleLoginState extends State { 25 | String password, url, profile; 26 | bool showSpinner = false, loginFail = false, hidePassword = true; 27 | var reg, a, c = 0; 28 | var passwordIcon = [FontAwesomeIcons.eyeSlash, FontAwesomeIcons.eye]; 29 | @override 30 | void initState() { 31 | super.initState(); 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return SafeArea( 37 | child: Container( 38 | decoration: BoxDecoration(gradient: gradient()), 39 | child: Scaffold( 40 | appBar: AppBar( 41 | title: Text('Moodle'), 42 | elevation: 0, 43 | backgroundColor: Colors.transparent, 44 | ), 45 | backgroundColor: Colors.transparent, 46 | body: ModalProgressHUD( 47 | inAsyncCall: showSpinner, 48 | child: SingleChildScrollView( 49 | child: Container( 50 | padding: EdgeInsets.all(20), 51 | child: Center( 52 | child: Column( 53 | crossAxisAlignment: CrossAxisAlignment.stretch, 54 | mainAxisAlignment: MainAxisAlignment.center, 55 | children: [ 56 | Container( 57 | height: 100, 58 | child: Image.asset( 59 | 'images/icon1.png', 60 | ), 61 | ), 62 | SizedBox( 63 | height: 30.0, 64 | ), 65 | TextField( 66 | obscureText: hidePassword, 67 | onChanged: (value) { 68 | password = value; 69 | }, 70 | decoration: kTextFieldDecorationMoodle.copyWith( 71 | labelText: 'Password', 72 | labelStyle: TextStyle(color: Colors.white54), 73 | prefixIcon: Icon(FontAwesomeIcons.lock, 74 | color: Colors.orangeAccent, size: 18), 75 | suffixIcon: IconButton( 76 | onPressed: () { 77 | setState(() { 78 | hidePassword = !hidePassword; 79 | if (c == 0) 80 | c = 1; 81 | else 82 | c = 0; 83 | }); 84 | }, 85 | icon: Icon(passwordIcon[c]), 86 | color: Colors.orangeAccent, 87 | iconSize: 19, 88 | ), 89 | errorText: loginFail ? 'Invalid Password' : null, 90 | ), 91 | ), 92 | SizedBox( 93 | height: 30, 94 | ), 95 | Padding( 96 | padding: EdgeInsets.symmetric(vertical: 16.0), 97 | child: Material( 98 | elevation: 5.0, 99 | color: Colors.indigo, 100 | borderRadius: BorderRadius.circular(30.0), 101 | child: MaterialButton( 102 | onPressed: () async { 103 | bool internet = await testInternet(); 104 | if (internet) { 105 | if (password.isNotEmpty) { 106 | setState(() { 107 | showSpinner = true; 108 | }); 109 | reg = widget.regNo; 110 | a = widget.token; 111 | url = "https://vitask.me/api/moodle/login"; 112 | API api = API(); 113 | Map data = { 114 | "username": reg, 115 | "password": password, 116 | "token": a 117 | }; 118 | Map moodleData = 119 | await api.getAPIData(url, data); 120 | print(moodleData); 121 | if (moodleData.isNotEmpty && 122 | moodleData['error'] == null) { 123 | MoodleData m = 124 | MoodleData(reg + "-moodle", moodleData); 125 | var h = MoodleDAO() 126 | .getMoodleData(reg + "-moodle"); 127 | if (h != null) MoodleDAO().deleteStudent(m); 128 | MoodleDAO().insertMoodleData(m); 129 | SharedPreferences prefs = 130 | await SharedPreferences.getInstance(); 131 | await prefs.setString( 132 | "moodle-password", password); 133 | Navigator.pushReplacement( 134 | context, 135 | MaterialPageRoute( 136 | builder: (BuildContext context) => 137 | Moodle(reg, a, moodleData))); 138 | } else { 139 | setState(() { 140 | loginFail = true; 141 | }); 142 | } 143 | setState(() { 144 | showSpinner = false; 145 | }); 146 | } else 147 | showToast( 148 | 'Please provide a password', Colors.red); 149 | } else { 150 | showToast('Connection failed', Colors.red); 151 | } 152 | }, 153 | minWidth: 200.0, 154 | height: 42.0, 155 | child: Text( 156 | 'Log In', 157 | style: TextStyle( 158 | color: Colors.white, 159 | ), 160 | ), 161 | ), 162 | ), 163 | ), 164 | ], 165 | ), 166 | ), 167 | ), 168 | ), 169 | ), 170 | ), 171 | ), 172 | ); 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /lib/screens/profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:vitask/Widgets/linear_gradient.dart'; 4 | import 'package:vitask/constants.dart'; 5 | 6 | class Profile extends StatefulWidget { 7 | Profile(this.cgpa, this.profileData); 8 | final String cgpa; 9 | final Map profileData; 10 | @override 11 | _ProfileState createState() => _ProfileState(); 12 | } 13 | 14 | class _ProfileState extends State { 15 | @override 16 | void initState() { 17 | super.initState(); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | double width = MediaQuery.of(context).size.width; 23 | return SafeArea( 24 | child: Container( 25 | decoration: BoxDecoration(gradient: gradient()), 26 | child: Scaffold( 27 | backgroundColor: Colors.transparent, 28 | appBar: AppBar( 29 | title: Text('Profile'), 30 | elevation: 0, 31 | backgroundColor: Colors.transparent, 32 | ), 33 | body: Stack( 34 | children: [ 35 | Positioned( 36 | top: 150, 37 | left: width / 40, 38 | right: width / 40, 39 | child: Container( 40 | padding: EdgeInsets.all(20), 41 | child: Column( 42 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 43 | crossAxisAlignment: CrossAxisAlignment.start, 44 | children: [ 45 | Text( 46 | widget.profileData["Name"], 47 | style: TextStyle( 48 | fontWeight: FontWeight.w500, 49 | fontStyle: FontStyle.normal, 50 | fontSize: 18, 51 | ), 52 | ), 53 | SizedBox( 54 | height: 10, 55 | ), 56 | Texts(widget.profileData["RegNo"], 16), 57 | SizedBox( 58 | height: 10, 59 | ), 60 | Texts( 61 | 'Application Number: ' + widget.profileData["AppNo"], 62 | 16), 63 | SizedBox( 64 | height: 10, 65 | ), 66 | Texts(widget.profileData["Branch"], 15), 67 | SizedBox(height: 10), 68 | Texts(widget.profileData["School"], 15), 69 | SizedBox(height: 10), 70 | Texts("CGPA : " + widget.cgpa, 15), 71 | SizedBox(height: 5), 72 | Divider(color: Colors.grey), 73 | SizedBox(height: 10), 74 | Texts( 75 | "Proctor Name : " + widget.profileData["ProctorName"], 76 | 15), 77 | SizedBox(height: 10), 78 | Texts( 79 | "Proctor Email : " + 80 | widget.profileData["ProctorEmail"], 81 | 15), 82 | ], 83 | ), 84 | ), 85 | ), 86 | Container( 87 | alignment: Alignment.topCenter, 88 | child: Image.asset( 89 | 'images/blue.png', 90 | ), 91 | ), 92 | ], 93 | ), 94 | ), 95 | ), 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/screens/splash_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import '../constants.dart'; 5 | import 'welcome_screen.dart'; 6 | import 'dashboard.dart'; 7 | import 'package:shared_preferences/shared_preferences.dart'; 8 | import 'package:vitask/database/Student_DAO.dart'; 9 | 10 | class SplashScreen extends StatefulWidget { 11 | @override 12 | State createState() { 13 | return _SplashScreenState(); 14 | } 15 | } 16 | 17 | class _SplashScreenState extends State { 18 | @override 19 | void initState() { 20 | super.initState(); 21 | navigateUser(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | backgroundColor: Colors.black, 28 | body: Container( 29 | decoration: BoxDecoration( 30 | gradient: LinearGradient( 31 | begin: Alignment.topCenter, 32 | end: Alignment.bottomCenter, 33 | colors: [ 34 | Color.fromRGBO(0, 0, 0, 30), 35 | Color.fromRGBO(70, 10, 10, 10) 36 | ])), 37 | child: Container( 38 | margin: EdgeInsets.symmetric(vertical: 50), 39 | child: Column( 40 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 41 | children: [ 42 | Container( 43 | margin: EdgeInsets.symmetric(vertical: 100), 44 | child: Image.asset( 45 | 'images/blue.png', 46 | ), 47 | ), 48 | Container( 49 | alignment: Alignment.center, 50 | child: Texts('Made with ❤ by the VITask Team', 14), 51 | ), 52 | ], 53 | ), 54 | ), 55 | ), 56 | ); 57 | } 58 | 59 | void navigateUser() async { 60 | Timer(const Duration(milliseconds: 950), () async { 61 | SharedPreferences prefs = await SharedPreferences.getInstance(); 62 | var username = prefs.getString('regNo'); 63 | var password = prefs.getString('password'); 64 | Map p; 65 | Map att; 66 | Map tt; 67 | Map m; 68 | Map ah; 69 | if (username != null && password != null) { 70 | p = (await StudentDao().getData(username + "-profile")); 71 | att = (await StudentDao().getData(username + "-attendance")); 72 | tt = (await StudentDao().getData(username + "-timeTable")); 73 | m = (await StudentDao().getData(username + "-marks")); 74 | ah = (await StudentDao().getData(username + "-acadHistory")); 75 | if (p != null && att != null && tt != null && m != null && ah != null) { 76 | Navigator.pushReplacement( 77 | context, 78 | MaterialPageRoute( 79 | builder: (BuildContext context) => 80 | MenuDashboardPage(p, att, tt, m, ah, password))); 81 | } else { 82 | Navigator.pushReplacement( 83 | context, 84 | MaterialPageRoute( 85 | builder: (BuildContext context) => WelcomeScreen())); 86 | } 87 | } else { 88 | Navigator.pushReplacement( 89 | context, 90 | MaterialPageRoute( 91 | builder: (BuildContext context) => WelcomeScreen())); 92 | } 93 | }); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/screens/splash_screen2.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:progress_indicators/progress_indicators.dart'; 5 | import 'package:vitask/Widgets/linear_gradient.dart'; 6 | import 'package:vitask/Widgets/show_toast.dart'; 7 | import 'package:vitask/api.dart'; 8 | import 'package:vitask/database/StudentModel.dart'; 9 | import 'package:vitask/database/Student_DAO.dart'; 10 | import 'package:vitask/functions/test_internet.dart'; 11 | 12 | import 'dashboard.dart'; 13 | import 'welcome_screen.dart'; 14 | 15 | class SplashScreen2 extends StatefulWidget { 16 | SplashScreen2(this.password, this.profileData); 17 | final String password; 18 | final Map profileData; 19 | @override 20 | _SplashScreen2State createState() => _SplashScreen2State(); 21 | } 22 | 23 | class _SplashScreen2State extends State { 24 | @override 25 | void initState() { 26 | super.initState(); 27 | fetchData(); 28 | } 29 | 30 | void fetchData() async { 31 | API api = API(); 32 | String t = widget.profileData['APItoken'].toString(); 33 | String u = widget.profileData['RegNo'].toString(); 34 | print("Start fetching"); 35 | bool internet = await testInternet(); 36 | if (internet) { 37 | Map attendanceData = {}; 38 | try { 39 | attendanceData = await api.getAPIData( 40 | 'https://vitask.me/api/vtop/attendance', 41 | {"token": t}).timeout(Duration(seconds: 8)); 42 | print("Attendance"); 43 | } on TimeoutException catch (_) { 44 | showToast('Something went wrong, please try again later', Colors.red); 45 | Navigator.pushReplacement( 46 | context, 47 | MaterialPageRoute( 48 | builder: (BuildContext context) => WelcomeScreen())); 49 | } catch (e) { 50 | Navigator.pushReplacement( 51 | context, 52 | MaterialPageRoute( 53 | builder: (BuildContext context) => WelcomeScreen())); 54 | } 55 | Map timeTableData = {}; 56 | try { 57 | timeTableData = await api.getAPIData( 58 | 'https://vitask.me/api/vtop/timetable', 59 | {"token": t}).timeout(Duration(seconds: 8)); 60 | print("Time table"); 61 | } on TimeoutException catch (_) { 62 | showToast('Something went wrong, please try again later', Colors.red); 63 | Navigator.pushReplacement( 64 | context, 65 | MaterialPageRoute( 66 | builder: (BuildContext context) => WelcomeScreen())); 67 | } catch (e) { 68 | Navigator.pushReplacement( 69 | context, 70 | MaterialPageRoute( 71 | builder: (BuildContext context) => WelcomeScreen())); 72 | } 73 | Map marksData = {}; 74 | try { 75 | marksData = await api.getAPIData('https://vitask.me/api/vtop/marks', 76 | {"token": t}).timeout(Duration(seconds: 8)); 77 | print("Marks"); 78 | } on TimeoutException catch (_) { 79 | showToast('Something went wrong, please try again later', Colors.red); 80 | Navigator.pushReplacement( 81 | context, 82 | MaterialPageRoute( 83 | builder: (BuildContext context) => WelcomeScreen())); 84 | } catch (e) { 85 | Navigator.pushReplacement( 86 | context, 87 | MaterialPageRoute( 88 | builder: (BuildContext context) => WelcomeScreen())); 89 | } 90 | Map acadHistoryData = {}; 91 | try { 92 | acadHistoryData = await api.getAPIData( 93 | 'https://vitask.me/api/vtop/history', 94 | {"token": t}).timeout(Duration(seconds: 8)); 95 | print("History"); 96 | } on TimeoutException catch (_) { 97 | showToast('Something went wrong, please try again later', Colors.red); 98 | Navigator.pushReplacement( 99 | context, 100 | MaterialPageRoute( 101 | builder: (BuildContext context) => WelcomeScreen())); 102 | } catch (e) { 103 | Navigator.pushReplacement( 104 | context, 105 | MaterialPageRoute( 106 | builder: (BuildContext context) => WelcomeScreen())); 107 | } 108 | if ((attendanceData.isNotEmpty && 109 | timeTableData.isNotEmpty && 110 | marksData.isNotEmpty && 111 | acadHistoryData.isNotEmpty) && 112 | (acadHistoryData.isNotEmpty && 113 | marksData.isNotEmpty && 114 | timeTableData.isNotEmpty && 115 | attendanceData.isNotEmpty)) { 116 | Student student = Student( 117 | profileKey: (u + "-profile"), 118 | profile: widget.profileData, 119 | attendanceKey: (u + "-attendance"), 120 | attendance: attendanceData, 121 | timeTableKey: (u + "-timeTable"), 122 | timeTable: timeTableData, 123 | marksKey: (u + "-marks"), 124 | marks: marksData, 125 | acadHistoryKey: (u + "-acadHistory"), 126 | acadHistory: acadHistoryData); 127 | StudentDao().deleteStudent(student); 128 | StudentDao().insertStudent(student); 129 | Navigator.pushReplacement( 130 | context, 131 | MaterialPageRoute( 132 | builder: (BuildContext context) => MenuDashboardPage( 133 | widget.profileData, 134 | attendanceData, 135 | timeTableData, 136 | marksData, 137 | acadHistoryData, 138 | widget.password))); 139 | } else { 140 | Navigator.pushReplacement( 141 | context, 142 | MaterialPageRoute( 143 | builder: (BuildContext context) => WelcomeScreen())); 144 | } 145 | } else { 146 | showToast('Connection failed', Colors.red); 147 | } 148 | } 149 | 150 | @override 151 | Widget build(BuildContext context) { 152 | return SafeArea( 153 | child: Container( 154 | decoration: BoxDecoration(gradient: gradient()), 155 | child: Scaffold( 156 | backgroundColor: Colors.transparent, 157 | body: Center( 158 | child: Column( 159 | mainAxisAlignment: MainAxisAlignment.center, 160 | children: [ 161 | GlowingProgressIndicator( 162 | child: Container( 163 | child: Image.asset('images/blue.png'), 164 | height: 60.0, 165 | ), 166 | ), 167 | SizedBox(height: 32.0), 168 | JumpingText('Fetching Your Data....'), 169 | ]), 170 | ), 171 | ), 172 | ), 173 | ); 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /lib/screens/timetable.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | import 'package:percent_indicator/linear_percent_indicator.dart'; 4 | import 'package:vitask/Widgets/linear_gradient.dart'; 5 | import 'package:vitask/constants.dart'; 6 | 7 | import 'tt.dart'; 8 | 9 | class TimeTable extends StatefulWidget { 10 | TimeTable(this.timeTableData, this.attendanceData); 11 | final Map timeTableData; 12 | final Map attendanceData; 13 | 14 | @override 15 | _TimeTableState createState() => _TimeTableState(); 16 | } 17 | 18 | class _TimeTableState extends State { 19 | List days; 20 | List daylist; 21 | var attKeys; 22 | 23 | List dayele = []; 24 | 25 | @override 26 | void initState() { 27 | super.initState(); 28 | getData(); 29 | } 30 | 31 | void getData() { 32 | attKeys = widget.attendanceData["attendance"].keys.toList(); 33 | daylist = []; 34 | days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]; 35 | for (var i = 0; i < days.length; i++) { 36 | daylist.add(widget.timeTableData["timetable"][days[i]]); 37 | } 38 | print(daylist[0]); 39 | dayele = []; 40 | var num = 0; 41 | while (num < days.length) { 42 | dayele.add(DayList(day: days[num], list: daylist[num])); 43 | num++; 44 | } 45 | } 46 | 47 | Widget minimar(List list) { 48 | var codes = [], 49 | loc = [], 50 | courseName = [], 51 | endTime = [], 52 | startTime = [], 53 | slot = [], 54 | attendance = []; 55 | List exeele = []; 56 | 57 | var num = 0; 58 | 59 | while (num < list.length) { 60 | codes.add(list[num]["code"]); 61 | loc.add(list[num]["class"]); 62 | courseName.add(list[num]["courseName"]); 63 | endTime.add(list[num]["endTime"]); 64 | startTime.add(list[num]["startTime"]); 65 | slot.add(list[num]["slot"]); 66 | 67 | for (var i = 0; i < widget.attendanceData["attendance"].length; i++) { 68 | var slot = list[num]["slot"]; 69 | if (slot.contains("L")) { 70 | if (widget.attendanceData["attendance"][attKeys[i]]["courseName"] == 71 | list[num]["courseName"] && 72 | (widget.attendanceData["attendance"][attKeys[i]]["type"] 73 | .contains("Lab") || 74 | widget.attendanceData["attendance"][attKeys[i]]["type"] 75 | .contains("Soft"))) { 76 | attendance.add(widget.attendanceData["attendance"][attKeys[i]] 77 | ["percentage"] 78 | .toString()); 79 | break; 80 | } 81 | } else { 82 | if (widget.attendanceData["attendance"][attKeys[i]]["courseName"] == 83 | list[num]["courseName"] && 84 | (widget.attendanceData["attendance"][attKeys[i]]["type"] 85 | .contains("Theory") || 86 | widget.attendanceData["attendance"][attKeys[i]]["type"] 87 | .contains("Soft") || 88 | !widget.attendanceData["attendance"][attKeys[i]]["type"] 89 | .contains("Lab"))) { 90 | attendance.add(widget.attendanceData["attendance"][attKeys[i]] 91 | ["percentage"] 92 | .toString()); 93 | break; 94 | } 95 | } 96 | } 97 | num++; 98 | } 99 | var n = 0; 100 | while (n < attendance.length) { 101 | exeele.add(Info( 102 | codes: codes[n], 103 | courseName: courseName[n], 104 | endTime: endTime[n], 105 | loc: loc[n], 106 | slot: slot[n], 107 | startTime: startTime[n], 108 | attendance: attendance[n])); 109 | n++; 110 | } 111 | 112 | return SingleChildScrollView( 113 | child: Container( 114 | child: Column( 115 | crossAxisAlignment: CrossAxisAlignment.center, 116 | children: exeele.map((e) { 117 | return Container( 118 | margin: EdgeInsets.symmetric(horizontal: 5, vertical: 4), 119 | padding: EdgeInsets.all(9), 120 | decoration: BoxDecoration( 121 | borderRadius: BorderRadius.all(Radius.circular(20)), 122 | border: Border.all( 123 | color: Colors.blueAccent, 124 | ), 125 | ), 126 | child: Column( 127 | children: [ 128 | Card( 129 | color: Colors.transparent, 130 | margin: EdgeInsets.all(4), 131 | elevation: 0, 132 | child: ClipRRect( 133 | borderRadius: BorderRadius.circular(17), 134 | child: Container( 135 | padding: EdgeInsets.symmetric(vertical: 10), 136 | child: Stack( 137 | children: [ 138 | Column( 139 | crossAxisAlignment: CrossAxisAlignment.start, 140 | children: [ 141 | Column( 142 | children: [ 143 | Texts(e.codes + " - " + e.courseName, 17), 144 | SizedBox(height: 10), 145 | ], 146 | ), 147 | Card( 148 | color: Colors.transparent, 149 | elevation: 0, 150 | child: Row( 151 | mainAxisAlignment: MainAxisAlignment.start, 152 | children: [ 153 | Icon( 154 | FontAwesomeIcons.clock, 155 | size: 16, 156 | color: Colors.lightBlue, 157 | ), 158 | Container( 159 | padding: const EdgeInsets.all(5.0), 160 | child: Text("${e.startTime} - ${e.endTime}", 161 | style: TextStyle( 162 | color: Colors.lightBlue, 163 | fontSize: 16, 164 | )), 165 | ), 166 | ], 167 | ), 168 | ), 169 | Row( 170 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 171 | children: [ 172 | Row( 173 | children: [ 174 | Card( 175 | color: Colors.transparent, 176 | elevation: 10, 177 | ), 178 | Icon( 179 | FontAwesomeIcons.tag, 180 | size: 16, 181 | color: Colors.lightBlue, 182 | ), 183 | Container( 184 | padding: const EdgeInsets.all(5.0), 185 | child: Text("${e.slot}", 186 | style: TextStyle( 187 | color: Colors.lightBlue, 188 | fontSize: 16, 189 | )), 190 | ), 191 | ], 192 | ), 193 | Row( 194 | children: [ 195 | Icon( 196 | FontAwesomeIcons.mapMarkerAlt, 197 | size: 16, 198 | color: Colors.lightBlue, 199 | ), 200 | ClipRect( 201 | child: Container( 202 | decoration: BoxDecoration( 203 | gradient: LinearGradient( 204 | begin: Alignment.centerRight, 205 | end: Alignment.centerLeft, 206 | colors: [ 207 | Color.fromRGBO(14, 14, 160, 10), 208 | Color.fromRGBO(0, 0, 20, 120) 209 | ])), 210 | child: Card( 211 | color: Colors.transparent, 212 | elevation: 20, 213 | child: Center( 214 | child: Text(e.loc, 215 | style: TextStyle( 216 | color: Colors.lightBlue, 217 | fontSize: 16, 218 | ))), 219 | ), 220 | ), 221 | ), 222 | ], 223 | ) 224 | ], 225 | ), 226 | SizedBox(height: 15), 227 | Padding( 228 | padding: 229 | const EdgeInsets.only(top: 7.0, left: 20), 230 | child: LinearPercentIndicator( 231 | animation: true, 232 | width: MediaQuery.of(context).size.width / 1.4, 233 | lineHeight: 15, 234 | animationDuration: 900, 235 | percent: double.parse(e.attendance) / 100, 236 | backgroundColor: Colors.blue[300], 237 | progressColor: Colors.blue[800], 238 | linearStrokeCap: LinearStrokeCap.roundAll, 239 | center: Texts(e.attendance + "%", 14), 240 | ), 241 | ) 242 | ], 243 | ), 244 | ], 245 | ), 246 | ), 247 | ), 248 | ), 249 | ], 250 | ), 251 | ); 252 | }).toList(), 253 | ))); 254 | } 255 | 256 | int _selectedIndex = 0; 257 | 258 | @override 259 | Widget build(BuildContext context) { 260 | List _widgetOptions = listView(context, dayele); 261 | double height = MediaQuery.of(context).size.height; 262 | double width = MediaQuery.of(context).size.width; 263 | return SafeArea( 264 | child: Scaffold( 265 | body: Container( 266 | decoration: BoxDecoration(gradient: gradient()), 267 | child: Container( 268 | height: height, 269 | width: width, 270 | padding: EdgeInsets.all(9), 271 | child: _widgetOptions.elementAt(_selectedIndex), 272 | ), 273 | ), 274 | backgroundColor: Colors.transparent, 275 | appBar: AppBar( 276 | title: Text('TimeTable'), 277 | backgroundColor: Color.fromRGBO(13, 50, 77, 100), 278 | ), 279 | bottomNavigationBar: BottomNavigationBar( 280 | type: BottomNavigationBarType.shifting, 281 | backgroundColor: Color.fromRGBO(13, 50, 77, 100), 282 | items: [ 283 | BottomNavigationBarItem( 284 | backgroundColor: Color.fromRGBO(4, 30, 53, 100), 285 | icon: Icon(FontAwesomeIcons.calendar), 286 | title: Text('Mon'), 287 | ), 288 | BottomNavigationBarItem( 289 | backgroundColor: Color.fromRGBO(4, 30, 53, 100), 290 | icon: Icon(FontAwesomeIcons.calendar), 291 | title: Text('Tue'), 292 | ), 293 | BottomNavigationBarItem( 294 | backgroundColor: Color.fromRGBO(4, 30, 53, 100), 295 | icon: Icon(FontAwesomeIcons.calendar), 296 | title: Text('Wed'), 297 | ), 298 | BottomNavigationBarItem( 299 | backgroundColor: Color.fromRGBO(4, 30, 53, 100), 300 | icon: Icon(FontAwesomeIcons.calendar), 301 | title: Text('Thu'), 302 | ), 303 | BottomNavigationBarItem( 304 | backgroundColor: Color.fromRGBO(4, 30, 53, 100), 305 | icon: Icon(FontAwesomeIcons.calendar), 306 | title: Text('Fri'), 307 | ), 308 | ], 309 | currentIndex: _selectedIndex, 310 | selectedItemColor: Colors.blueAccent, 311 | onTap: _onItemTapped, 312 | ), 313 | ), 314 | ); 315 | } 316 | 317 | void _onItemTapped(int index) { 318 | setState(() { 319 | _selectedIndex = index; 320 | }); 321 | } 322 | 323 | List listView(BuildContext context, List dayele) { 324 | double width = MediaQuery.of(context).size.width; 325 | double height = MediaQuery.of(context).size.height; 326 | return dayele.map( 327 | (mr) { 328 | int labs = 0; 329 | int theory = 0; 330 | if (mr.list != null) { 331 | for (var i = 0; i < mr.list.length; i++) { 332 | if ((mr.list[i]["slot"]).contains("L")) { 333 | labs++; 334 | } else { 335 | theory++; 336 | } 337 | } 338 | labs = labs ~/ 2; 339 | } 340 | return Container( 341 | width: width, 342 | child: Stack( 343 | children: [ 344 | Container( 345 | padding: EdgeInsets.symmetric(horizontal: 20), 346 | child: Align( 347 | alignment: Alignment.topLeft, 348 | child: Text( 349 | mr.day, 350 | style: TextStyle( 351 | fontWeight: FontWeight.bold, 352 | fontStyle: FontStyle.italic, 353 | color: Colors.white, 354 | fontSize: 24, 355 | ), 356 | ), 357 | ), 358 | ), 359 | Positioned( 360 | top: 33, 361 | child: Row( 362 | children: [ 363 | Row( 364 | children: [ 365 | Container( 366 | padding: EdgeInsets.only(left: 20, right: 5), 367 | child: Texts(theory.toString() + " Theory ", 15), 368 | ), 369 | Icon( 370 | FontAwesomeIcons.bookOpen, 371 | size: 16, 372 | color: Colors.lightBlue, 373 | ), 374 | Row( 375 | children: [ 376 | Container( 377 | padding: EdgeInsets.only(left: 5, right: 5), 378 | child: Texts( 379 | " | " + labs.toString() + " Lab(s) ", 15), 380 | ), 381 | Icon( 382 | FontAwesomeIcons.laptopCode, 383 | size: 16, 384 | color: Colors.lightBlue, 385 | ), 386 | ], 387 | ) 388 | ], 389 | ), 390 | ], 391 | ), 392 | ), 393 | Positioned( 394 | top: 41, 395 | left: 0, 396 | right: 0, 397 | child: Container( 398 | padding: EdgeInsets.all(10), 399 | height: height / 1.32, 400 | width: width, 401 | child: mr.list != null ? minimar(mr.list) : Container(), 402 | ), 403 | ), 404 | ], 405 | overflow: Overflow.visible, 406 | ), 407 | ); 408 | }, 409 | ).toList(); 410 | } 411 | } 412 | -------------------------------------------------------------------------------- /lib/screens/tt.dart: -------------------------------------------------------------------------------- 1 | class DayList { 2 | var day; 3 | var list; 4 | 5 | DayList({ 6 | this.day, 7 | this.list, 8 | }); 9 | } 10 | 11 | class Info { 12 | var codes; 13 | var loc; 14 | var courseName; 15 | var endTime; 16 | var startTime; 17 | var slot; 18 | var attendance; 19 | 20 | Info( 21 | {this.codes, 22 | this.loc, 23 | this.courseName, 24 | this.endTime, 25 | this.startTime, 26 | this.slot, 27 | this.attendance}); 28 | } 29 | -------------------------------------------------------------------------------- /lib/screens/welcome_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:animated_text_kit/animated_text_kit.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 7 | import 'package:modal_progress_hud/modal_progress_hud.dart'; 8 | import 'package:shared_preferences/shared_preferences.dart'; 9 | import 'package:vitask/Widgets/show_toast.dart'; 10 | import 'package:vitask/api.dart'; 11 | import 'package:vitask/constants.dart'; 12 | import 'package:vitask/functions/test_internet.dart'; 13 | 14 | import 'splash_screen2.dart'; 15 | 16 | class WelcomeScreen extends StatefulWidget { 17 | @override 18 | _WelcomeScreenState createState() => _WelcomeScreenState(); 19 | } 20 | 21 | class _WelcomeScreenState extends State { 22 | String regNo; 23 | String password; 24 | String url; 25 | String profile; 26 | bool showSpinner = false; 27 | bool loginFail = false; 28 | bool hidePassword = true; 29 | var passwordIcon = [FontAwesomeIcons.eyeSlash, FontAwesomeIcons.eye]; 30 | var c = 0; 31 | int x = 0; 32 | 33 | @override 34 | void initState() { 35 | super.initState(); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return SafeArea( 41 | child: ModalProgressHUD( 42 | inAsyncCall: showSpinner, 43 | child: Scaffold( 44 | body: Container( 45 | decoration: BoxDecoration( 46 | gradient: LinearGradient( 47 | begin: Alignment.topCenter, 48 | end: Alignment.bottomCenter, 49 | colors: [ 50 | Color.fromRGBO(13, 35, 140, 70), 51 | Color.fromRGBO(12, 10, 10, 10) 52 | ])), 53 | padding: EdgeInsets.all(20), 54 | child: Center( 55 | child: SingleChildScrollView( 56 | child: Column( 57 | crossAxisAlignment: CrossAxisAlignment.stretch, 58 | mainAxisAlignment: MainAxisAlignment.center, 59 | children: [ 60 | FadeAnimatedTextKit( 61 | text: ['VITask Lite'], 62 | textAlign: TextAlign.center, 63 | textStyle: TextStyle( 64 | fontSize: 30.0, 65 | fontWeight: FontWeight.w900, 66 | ), 67 | ), 68 | SizedBox(height: 10), 69 | Container( 70 | child: Image.asset('images/blue.png'), 71 | height: 60.0, 72 | ), 73 | SizedBox(height: 18), 74 | Container( 75 | child: TextField( 76 | textCapitalization: TextCapitalization.sentences, 77 | onChanged: (value) { 78 | regNo = value; 79 | }, 80 | decoration: kTextFieldDecoration.copyWith( 81 | prefixIcon: Icon( 82 | FontAwesomeIcons.userAlt, 83 | color: Colors.redAccent, 84 | size: 18, 85 | ), 86 | labelText: 'Reg No', 87 | labelStyle: TextStyle(color: Colors.white54), 88 | errorText: loginFail 89 | ? 'Invalid Registration No. or Password' 90 | : null, 91 | ), 92 | ), 93 | ), 94 | SizedBox( 95 | height: 30.0, 96 | ), 97 | Container( 98 | child: TextField( 99 | obscureText: hidePassword, 100 | onChanged: (value) { 101 | password = value; 102 | }, 103 | decoration: kTextFieldDecoration.copyWith( 104 | prefixIcon: Icon(FontAwesomeIcons.lock, 105 | color: Colors.redAccent, size: 18), 106 | suffixIcon: IconButton( 107 | onPressed: () { 108 | setState(() { 109 | hidePassword = !hidePassword; 110 | if (c == 0) 111 | c = 1; 112 | else 113 | c = 0; 114 | }); 115 | }, 116 | icon: Icon(passwordIcon[c]), 117 | color: Colors.redAccent, 118 | iconSize: 19, 119 | ), 120 | labelText: 'Password', 121 | labelStyle: TextStyle(color: Colors.white54), 122 | errorText: loginFail 123 | ? 'Invalid Registration No. or Password' 124 | : null, 125 | ), 126 | ), 127 | ), 128 | SizedBox( 129 | height: 30, 130 | ), 131 | Padding( 132 | padding: EdgeInsets.symmetric(vertical: 16.0), 133 | child: Material( 134 | elevation: 5.0, 135 | color: Colors.red, 136 | borderRadius: BorderRadius.circular(30.0), 137 | child: MaterialButton( 138 | child: Text( 139 | 'Log In', 140 | style: TextStyle( 141 | color: Colors.red[100], 142 | fontSize: 20, 143 | fontWeight: FontWeight.bold, 144 | fontStyle: FontStyle.italic, 145 | ), 146 | ), 147 | onPressed: () async { 148 | if (regNo.isNotEmpty) regNo = regNo.trim(); 149 | url = 'https://vitask.me/api/gettoken'; 150 | API api = API(); 151 | Map data = { 152 | "username": regNo, 153 | "password": password 154 | }; 155 | bool internet = await testInternet(); 156 | if (internet) { 157 | setState(() { 158 | showSpinner = true; 159 | }); 160 | Map profileData = {}; 161 | try { 162 | profileData = await api 163 | .getAPIData(url, data) 164 | .timeout(Duration(seconds: 12)); 165 | } on TimeoutException catch (_) { 166 | showToast('Something went wrong', Colors.red); 167 | setState(() { 168 | showSpinner = false; 169 | }); 170 | } catch (e) { 171 | setState(() { 172 | showSpinner = false; 173 | }); 174 | } 175 | if (profileData.isNotEmpty && 176 | profileData["error"] == null) { 177 | print(profileData); 178 | SharedPreferences prefs = 179 | await SharedPreferences.getInstance(); 180 | await prefs.setString( 181 | "regNo", profileData["RegNo"]); 182 | await prefs.setString("password", password); 183 | print("Login"); 184 | Navigator.pushReplacement( 185 | context, 186 | MaterialPageRoute( 187 | builder: (BuildContext context) => 188 | SplashScreen2( 189 | password, profileData))); 190 | } else { 191 | setState(() { 192 | loginFail = true; 193 | }); 194 | } 195 | setState(() { 196 | showSpinner = false; 197 | }); 198 | } else { 199 | showToast('Connection failed!', Colors.redAccent); 200 | } 201 | }, 202 | minWidth: 200.0, 203 | height: 42.0, 204 | ), 205 | ), 206 | ), 207 | ], 208 | ), 209 | ), 210 | ), 211 | ), 212 | ), 213 | ), 214 | ); 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | animated_text_kit: 5 | dependency: "direct main" 6 | description: 7 | name: animated_text_kit 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "4.2.1" 11 | async: 12 | dependency: transitive 13 | description: 14 | name: async 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.6.1" 18 | auto_size_text: 19 | dependency: "direct main" 20 | description: 21 | name: auto_size_text 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.1.0" 32 | characters: 33 | dependency: transitive 34 | description: 35 | name: characters 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.2.0" 46 | clock: 47 | dependency: transitive 48 | description: 49 | name: clock 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.0" 53 | collection: 54 | dependency: transitive 55 | description: 56 | name: collection 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.15.0" 60 | crypto: 61 | dependency: transitive 62 | description: 63 | name: crypto 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "3.0.1" 67 | fake_async: 68 | dependency: transitive 69 | description: 70 | name: fake_async 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.2.0" 74 | ffi: 75 | dependency: transitive 76 | description: 77 | name: ffi 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.1.2" 81 | file: 82 | dependency: transitive 83 | description: 84 | name: file 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "6.1.2" 88 | flutter: 89 | dependency: "direct main" 90 | description: flutter 91 | source: sdk 92 | version: "0.0.0" 93 | flutter_circular_chart: 94 | dependency: "direct main" 95 | description: 96 | name: flutter_circular_chart 97 | url: "https://pub.dartlang.org" 98 | source: hosted 99 | version: "0.1.0" 100 | flutter_keyboard_visibility: 101 | dependency: "direct main" 102 | description: 103 | name: flutter_keyboard_visibility 104 | url: "https://pub.dartlang.org" 105 | source: hosted 106 | version: "5.0.3" 107 | flutter_keyboard_visibility_platform_interface: 108 | dependency: transitive 109 | description: 110 | name: flutter_keyboard_visibility_platform_interface 111 | url: "https://pub.dartlang.org" 112 | source: hosted 113 | version: "2.0.0" 114 | flutter_keyboard_visibility_web: 115 | dependency: transitive 116 | description: 117 | name: flutter_keyboard_visibility_web 118 | url: "https://pub.dartlang.org" 119 | source: hosted 120 | version: "2.0.0" 121 | flutter_local_notifications: 122 | dependency: "direct main" 123 | description: 124 | name: flutter_local_notifications 125 | url: "https://pub.dartlang.org" 126 | source: hosted 127 | version: "8.1.1+1" 128 | flutter_local_notifications_platform_interface: 129 | dependency: transitive 130 | description: 131 | name: flutter_local_notifications_platform_interface 132 | url: "https://pub.dartlang.org" 133 | source: hosted 134 | version: "4.0.1" 135 | flutter_test: 136 | dependency: "direct dev" 137 | description: flutter 138 | source: sdk 139 | version: "0.0.0" 140 | flutter_web_plugins: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.0" 145 | fluttertoast: 146 | dependency: "direct main" 147 | description: 148 | name: fluttertoast 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "8.0.8" 152 | font_awesome_flutter: 153 | dependency: "direct main" 154 | description: 155 | name: font_awesome_flutter 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "9.1.0" 159 | google_fonts: 160 | dependency: "direct main" 161 | description: 162 | name: google_fonts 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.1.0" 166 | http: 167 | dependency: "direct main" 168 | description: 169 | name: http 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.13.3" 173 | http_parser: 174 | dependency: transitive 175 | description: 176 | name: http_parser 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "4.0.0" 180 | intl: 181 | dependency: "direct main" 182 | description: 183 | name: intl 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.17.0" 187 | js: 188 | dependency: transitive 189 | description: 190 | name: js 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.6.3" 194 | matcher: 195 | dependency: transitive 196 | description: 197 | name: matcher 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.12.10" 201 | meta: 202 | dependency: transitive 203 | description: 204 | name: meta 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "1.3.0" 208 | modal_progress_hud: 209 | dependency: "direct main" 210 | description: 211 | name: modal_progress_hud 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.1.3" 215 | path: 216 | dependency: transitive 217 | description: 218 | name: path 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.8.0" 222 | path_provider: 223 | dependency: "direct main" 224 | description: 225 | name: path_provider 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "2.0.2" 229 | path_provider_linux: 230 | dependency: transitive 231 | description: 232 | name: path_provider_linux 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.0.2" 236 | path_provider_macos: 237 | dependency: transitive 238 | description: 239 | name: path_provider_macos 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "2.0.2" 243 | path_provider_platform_interface: 244 | dependency: transitive 245 | description: 246 | name: path_provider_platform_interface 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "2.0.1" 250 | path_provider_windows: 251 | dependency: transitive 252 | description: 253 | name: path_provider_windows 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.0.3" 257 | pedantic: 258 | dependency: transitive 259 | description: 260 | name: pedantic 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "1.11.1" 264 | percent_indicator: 265 | dependency: "direct main" 266 | description: 267 | name: percent_indicator 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "3.0.1" 271 | platform: 272 | dependency: transitive 273 | description: 274 | name: platform 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "3.0.2" 278 | plugin_platform_interface: 279 | dependency: transitive 280 | description: 281 | name: plugin_platform_interface 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "2.0.1" 285 | process: 286 | dependency: transitive 287 | description: 288 | name: process 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "4.2.3" 292 | progress_indicators: 293 | dependency: "direct main" 294 | description: 295 | name: progress_indicators 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "1.0.0" 299 | sembast: 300 | dependency: "direct main" 301 | description: 302 | name: sembast 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "3.1.0+2" 306 | shared_preferences: 307 | dependency: "direct main" 308 | description: 309 | name: shared_preferences 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "2.0.6" 313 | shared_preferences_linux: 314 | dependency: transitive 315 | description: 316 | name: shared_preferences_linux 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "2.0.2" 320 | shared_preferences_macos: 321 | dependency: transitive 322 | description: 323 | name: shared_preferences_macos 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "2.0.2" 327 | shared_preferences_platform_interface: 328 | dependency: transitive 329 | description: 330 | name: shared_preferences_platform_interface 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "2.0.0" 334 | shared_preferences_web: 335 | dependency: transitive 336 | description: 337 | name: shared_preferences_web 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "2.0.2" 341 | shared_preferences_windows: 342 | dependency: transitive 343 | description: 344 | name: shared_preferences_windows 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "2.0.2" 348 | sky_engine: 349 | dependency: transitive 350 | description: flutter 351 | source: sdk 352 | version: "0.0.99" 353 | source_span: 354 | dependency: transitive 355 | description: 356 | name: source_span 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "1.8.1" 360 | stack_trace: 361 | dependency: transitive 362 | description: 363 | name: stack_trace 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "1.10.0" 367 | stream_channel: 368 | dependency: transitive 369 | description: 370 | name: stream_channel 371 | url: "https://pub.dartlang.org" 372 | source: hosted 373 | version: "2.1.0" 374 | string_scanner: 375 | dependency: transitive 376 | description: 377 | name: string_scanner 378 | url: "https://pub.dartlang.org" 379 | source: hosted 380 | version: "1.1.0" 381 | synchronized: 382 | dependency: transitive 383 | description: 384 | name: synchronized 385 | url: "https://pub.dartlang.org" 386 | source: hosted 387 | version: "3.0.0" 388 | term_glyph: 389 | dependency: transitive 390 | description: 391 | name: term_glyph 392 | url: "https://pub.dartlang.org" 393 | source: hosted 394 | version: "1.2.0" 395 | test_api: 396 | dependency: transitive 397 | description: 398 | name: test_api 399 | url: "https://pub.dartlang.org" 400 | source: hosted 401 | version: "0.3.0" 402 | timezone: 403 | dependency: transitive 404 | description: 405 | name: timezone 406 | url: "https://pub.dartlang.org" 407 | source: hosted 408 | version: "0.7.0" 409 | typed_data: 410 | dependency: transitive 411 | description: 412 | name: typed_data 413 | url: "https://pub.dartlang.org" 414 | source: hosted 415 | version: "1.3.0" 416 | vector_math: 417 | dependency: transitive 418 | description: 419 | name: vector_math 420 | url: "https://pub.dartlang.org" 421 | source: hosted 422 | version: "2.1.0" 423 | win32: 424 | dependency: transitive 425 | description: 426 | name: win32 427 | url: "https://pub.dartlang.org" 428 | source: hosted 429 | version: "2.2.5" 430 | xdg_directories: 431 | dependency: transitive 432 | description: 433 | name: xdg_directories 434 | url: "https://pub.dartlang.org" 435 | source: hosted 436 | version: "0.2.0" 437 | sdks: 438 | dart: ">=2.13.0 <3.0.0" 439 | flutter: ">=2.2.0" 440 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: vitask 2 | description: A new Flutter application. 3 | 4 | version: 2.1.0+9 5 | 6 | environment: 7 | sdk: ">=2.1.0<3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | 14 | animated_text_kit: ^4.2.1 15 | http: ^0.13.3 16 | modal_progress_hud: ^0.1.3 17 | sembast: ^3.1.0+2 18 | path_provider: ^2.0.2 19 | flutter_circular_chart: ^0.1.0 20 | font_awesome_flutter: ^9.1.0 21 | flutter_local_notifications: ^8.1.1+1 22 | shared_preferences: ^2.0.6 23 | percent_indicator: ^3.0.1 24 | intl: ^0.17.0 25 | google_fonts: ^2.1.0 26 | auto_size_text: ^2.1.0 27 | progress_indicators: ^1.0.0 28 | fluttertoast: ^8.0.8 29 | flutter_keyboard_visibility: ^5.0.3 30 | 31 | dev_dependencies: 32 | flutter_test: 33 | sdk: flutter 34 | 35 | flutter: 36 | uses-material-design: true 37 | 38 | assets: 39 | - images/ -------------------------------------------------------------------------------- /screenshots/abhishek.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/abhishek.jpeg -------------------------------------------------------------------------------- /screenshots/attendance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/attendance.jpg -------------------------------------------------------------------------------- /screenshots/bunk_meter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/bunk_meter.jpg -------------------------------------------------------------------------------- /screenshots/dashboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/dashboard.jpg -------------------------------------------------------------------------------- /screenshots/gpa_calculator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/gpa_calculator.jpg -------------------------------------------------------------------------------- /screenshots/marks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/marks.jpg -------------------------------------------------------------------------------- /screenshots/mayank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/mayank.png -------------------------------------------------------------------------------- /screenshots/moodle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/moodle.jpg -------------------------------------------------------------------------------- /screenshots/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/profile.jpg -------------------------------------------------------------------------------- /screenshots/timetable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/timetable.jpg -------------------------------------------------------------------------------- /screenshots/welcome_screen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayanktolani19/vitask-flutter/11f6626d0fb8016953d962bda0548d878b4fbdb7/screenshots/welcome_screen.jpg -------------------------------------------------------------------------------- /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:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:vitask/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(Vitask()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------