├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── app
│ │ │ │ └── FlutterMultiDexApplication.java
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── imin
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ ├── imin.png
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
└── images
│ ├── illustration2.png
│ └── imin_small.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── admin
│ ├── add_class.dart
│ ├── admin_dashb.dart
│ ├── location_based_att.dart
│ ├── student_list.dart
│ ├── take_attendance.dart
│ ├── upload_ia.dart
│ ├── view_classes.dart
│ └── view_queries.dart
├── main.dart
├── models
│ ├── colors.dart
│ ├── font_size.dart
│ ├── globals.dart
│ ├── main_button.dart
│ └── user_model.dart
├── screens
│ ├── loading_screen.dart
│ ├── login_page.dart
│ ├── signup_page.dart
│ └── start_page.dart
├── services
│ ├── auth_service.dart
│ └── wrapper.dart
└── user
│ ├── display_classes.dart
│ ├── give_attendance.dart
│ ├── queries.dart
│ ├── subject_attendance.dart
│ ├── user_dashb.dart
│ └── view_ia_marks.dart
├── pubspec.lock
├── pubspec.yaml
├── screenshot
├── 1.png
├── 2.png
├── 3.png
├── 4.png
└── 5.png
├── test
└── widget_test.dart
└── web
├── favicon.png
├── icons
├── Icon-192.png
├── Icon-512.png
├── Icon-maskable-192.png
└── Icon-maskable-512.png
├── index.html
└── manifest.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/.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: 77d935af4db863f6abd0b9c31c7e6df2a13de57b
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | **Android Attendance Management Application**
2 |
3 | # iMiN
4 |
5 |
iMiN is an attendance management application for android devices. This project is to help teachers and HR's in their human resource management.! iMiN is completely developed using Google's Flutter and Firebase Realtime Database.
Due to some security reasons some files are removed, if you wanted to use this project please contact.
6 |
7 |
8 |
9 | ## Screenshots
10 |
11 |

12 |

13 |

14 |

15 |

16 |
17 |
18 |
19 |
20 | ## Buying or Using
21 | if you wanted to buy or use this project then you can contact me at sivanandhpp@gmail.com , I'll help to get started with this project. Also i have full documentation of this project you can purchase that also.
22 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'com.google.gms.google-services'
26 | apply plugin: 'kotlin-android'
27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28 |
29 | android {
30 | compileSdkVersion flutter.compileSdkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "com.example.imin"
48 | minSdkVersion 19 //flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | multiDexEnabled true
53 | }
54 |
55 | buildTypes {
56 | release {
57 | // TODO: Add your own signing config for the release build.
58 | // Signing with the debug keys for now, so `flutter run --release` works.
59 | signingConfig signingConfigs.debug
60 | }
61 | }
62 | }
63 |
64 | flutter {
65 | source '../..'
66 | }
67 |
68 | dependencies {
69 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
70 | implementation platform('com.google.firebase:firebase-bom:29.0.3')
71 | implementation 'com.google.firebase:firebase-analytics-ktx'
72 | }
73 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
10 |
18 |
22 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java:
--------------------------------------------------------------------------------
1 | // Generated file.
2 | // If you wish to remove Flutter's multidex support, delete this entire file.
3 |
4 | package io.flutter.app;
5 |
6 | import android.content.Context;
7 | import androidx.annotation.CallSuper;
8 | import androidx.multidex.MultiDex;
9 |
10 | /**
11 | * Extension of {@link io.flutter.app.FlutterApplication}, adding multidex support.
12 | */
13 | public class FlutterMultiDexApplication extends FlutterApplication {
14 | @Override
15 | @CallSuper
16 | protected void attachBaseContext(Context base) {
17 | super.attachBaseContext(base);
18 | MultiDex.install(this);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/imin/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.imin
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | -
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/imin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/android/app/src/main/res/drawable/imin.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | -
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.0.4'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.10'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | mavenCentral()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/images/illustration2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/assets/images/illustration2.png
--------------------------------------------------------------------------------
/assets/images/imin_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/assets/images/imin_small.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 9.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Imin
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | imin
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/admin/add_class.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:imin/main.dart';
3 | import 'package:imin/models/colors.dart';
4 | import 'package:imin/models/main_button.dart';
5 | import 'package:line_icons/line_icons.dart';
6 | import 'package:imin/models/globals.dart' as globals;
7 | import 'package:intl/intl.dart';
8 | import 'package:day_night_time_picker/day_night_time_picker.dart';
9 |
10 | class AddClass extends StatefulWidget {
11 | const AddClass({Key? key}) : super(key: key);
12 |
13 | @override
14 | State createState() => _AddClassState();
15 | }
16 |
17 | class _AddClassState extends State {
18 | final dateToday = DateTime.now();
19 |
20 | getDate() {
21 | String formattedDate = DateFormat.yMMMMd('en_US').format(dateToday);
22 | return formattedDate;
23 | }
24 |
25 | String pickedTime = "HH:MM";
26 | String amORpm = 'AM';
27 | String hh = 'HH';
28 | String mm = 'MM';
29 |
30 |
31 | TimeOfDay _time = const TimeOfDay(hour: 9, minute: 0);
32 | void onTimeChanged(TimeOfDay newTime) {
33 | setState(() {
34 | _time = newTime;
35 |
36 | hh = _time.hour.toString();
37 | int inthh = _time.hour.toInt();
38 | //To check AM or PM
39 | if (_time.hour.toInt() > 11) {
40 | amORpm = 'PM';
41 | }
42 | //To convert to 12 hr format
43 | if (_time.hour.toInt() > 12) {
44 | inthh = (_time.hour.toInt() - 12);
45 | hh = inthh.toString();
46 | }
47 | //To add 0 at the beginning if time is less than 9
48 | if (inthh <= 9) {
49 | hh = "0$inthh";
50 | }
51 |
52 | mm = _time.minute.toString();
53 | pickedTime = "$hh:00 - $amORpm";
54 | });
55 | }
56 |
57 |
58 | String dropdownValue = 'Select';
59 | bool chipSelection = true;
60 |
61 | @override
62 | Widget build(BuildContext context) {
63 |
64 | getDate();
65 | return Scaffold(
66 | body: SafeArea(
67 | child: SingleChildScrollView(
68 | child: Padding(
69 | padding: const EdgeInsets.all(30),
70 | child: Column(
71 | crossAxisAlignment: CrossAxisAlignment.start,
72 | children: [
73 | Row(
74 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
75 | children: [
76 | Column(
77 | crossAxisAlignment: CrossAxisAlignment.start,
78 | children: const [
79 | Text(
80 | "BCA/5/B",
81 | style: TextStyle(fontSize: 14, color: Colors.black),
82 | ),
83 | SizedBox(
84 | height: 5,
85 | ),
86 | Text(
87 | 'Create Class',
88 | style: TextStyle(
89 | fontSize: 25,
90 | fontWeight: FontWeight.bold,
91 | color: Colors.black),
92 | ),
93 | ],
94 | ),
95 | GestureDetector(
96 | onTap: () {
97 | Navigator.pop(context);
98 | },
99 | child: Container(
100 | width: 50,
101 | height: 50,
102 | decoration: BoxDecoration(
103 | color: Colors.black.withOpacity(0.03),
104 | borderRadius: BorderRadius.circular(12)),
105 | child: const Center(
106 | child: Icon(LineIcons.arrowLeft),
107 | ),
108 | ),
109 | )
110 | ],
111 | ),
112 | const SizedBox(
113 | height: 30,
114 | ),
115 | Container(
116 | width: double.infinity,
117 | height: 350,
118 | decoration: BoxDecoration(
119 | boxShadow: const [
120 | BoxShadow(
121 | color: ThemeColor.shadow,
122 | blurRadius: 100,
123 | spreadRadius: 1,
124 | offset: Offset(0, 10)),
125 | ],
126 | borderRadius: BorderRadius.circular(30),
127 | color: ThemeColor.white,
128 | ),
129 | child: Padding(
130 | padding: const EdgeInsets.all(30),
131 | child: Column(
132 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
133 | crossAxisAlignment: CrossAxisAlignment.start,
134 | children: [
135 | Row(
136 | children: [
137 | const Text(
138 | "Date: ",
139 | style: TextStyle(
140 | color: ThemeColor.black,
141 | fontSize: 20,
142 | fontWeight: FontWeight.bold),
143 | ),
144 | Text(
145 | "${getDate()}",
146 | style: const TextStyle(
147 | color: ThemeColor.secondary,
148 | fontSize: 20,
149 | fontWeight: FontWeight.bold),
150 | ),
151 | ],
152 | ),
153 | const SizedBox(
154 | height: 10,
155 | ),
156 | Row(
157 | children: [
158 | const Text(
159 | "Subject: ",
160 | style: TextStyle(
161 | fontSize: 15, fontWeight: FontWeight.bold),
162 | ),
163 | const SizedBox(
164 | width: 20,
165 | ),
166 | DropdownButton(
167 | isDense: true,
168 |
169 | borderRadius: BorderRadius.circular(30),
170 | hint: Text(
171 | dropdownValue,
172 | style: const TextStyle(
173 | color: ThemeColor.primary,
174 | fontSize: 15,
175 | fontWeight: FontWeight.bold),
176 | ),
177 | items: globals.subjects
178 | .map(
179 | (e) => DropdownMenuItem(
180 | value: e,
181 | child: Center(
182 | child: Text(
183 | e,
184 | style: const TextStyle(
185 | color: ThemeColor.primary,
186 | fontSize: 15,
187 | fontWeight: FontWeight.bold),
188 | ),
189 | ),
190 | ),
191 | )
192 | .toList(),
193 | onChanged: (value) {
194 | setState(() {
195 | dropdownValue = value.toString();
196 | });
197 | }),
198 | ],
199 | ),
200 | Row(
201 | children: [
202 | const Text(
203 | "Mode: ",
204 | style: TextStyle(
205 | fontSize: 15, fontWeight: FontWeight.bold),
206 | ),
207 | const SizedBox(width: 10),
208 | ChoiceChip(
209 | onSelected: (value) {
210 | setState(() {
211 | chipSelection = false;
212 | });
213 | },
214 |
215 |
216 | selectedColor: ThemeColor.primary,
217 | backgroundColor: ThemeColor.grey,
218 | label: const Text(
219 | 'Online',
220 | style: TextStyle(
221 | color: ThemeColor.white,
222 | fontSize: 15,
223 | fontWeight: FontWeight.bold),
224 | ),
225 | selected: !chipSelection),
226 | const SizedBox(width: 10),
227 | ChoiceChip(
228 | onSelected: (value) {
229 | setState(() {
230 | chipSelection = true;
231 | });
232 | },
233 |
234 | selectedColor: ThemeColor.primary,
235 | backgroundColor: ThemeColor.grey,
236 | label: const Text(
237 | 'Offline',
238 | style: TextStyle(
239 | color: ThemeColor.white,
240 | fontSize: 15,
241 | fontWeight: FontWeight.bold),
242 | ),
243 | selected: chipSelection),
244 | ],
245 | ),
246 | Row(
247 | children: [
248 | const Text(
249 | "Time: ",
250 | style: TextStyle(
251 | fontSize: 15, fontWeight: FontWeight.bold),
252 | ),
253 | TextButton(
254 | onPressed: () {
255 | Navigator.of(context).push(
256 | showPicker(
257 | disableMinute: true,
258 | minHour: 8.0,
259 | maxHour: 17.0,
260 | is24HrFormat: false,
261 | iosStylePicker: true,
262 | context: context,
263 | value: _time,
264 | onChange: onTimeChanged,
265 | ),
266 | );
267 | },
268 | child: Text(
269 | pickedTime,
270 | style: const TextStyle(
271 | color: ThemeColor.primary,
272 | fontSize: 15,
273 | fontWeight: FontWeight.bold),
274 | ),
275 | ),
276 |
277 | ],
278 | ),
279 | MainButton(
280 | text: "Create",
281 | onTap: () {
282 | String dateForDB =
283 | "${dateToday.year}/${dateToday.month}/${dateToday.day}/$dropdownValue";
284 |
285 | final classReferance = dbReference
286 | .child('class/timetable/$dateForDB');
287 | classReferance.set({
288 | 'subject': dropdownValue,
289 | 'mode': chipSelection,
290 | 'time': pickedTime,
291 | 'isnottaken': true,
292 | 'islistening':false
293 | }).then((value) => Navigator.pop(context));
294 | })
295 | ],
296 | ),
297 | ),
298 | ),
299 | ],
300 | ),
301 | ),
302 | ),
303 | ),
304 | );
305 | }
306 | }
307 |
--------------------------------------------------------------------------------
/lib/admin/location_based_att.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/firebase_database.dart';
2 | import 'package:firebase_database/ui/firebase_animated_list.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:imin/main.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:line_icons/line_icons.dart';
7 | import 'package:imin/models/globals.dart' as globals;
8 |
9 | class TakeAdvancedAttendance extends StatefulWidget {
10 | const TakeAdvancedAttendance({Key? key}) : super(key: key);
11 |
12 | @override
13 | _TakeAdvancedAttendanceState createState() => _TakeAdvancedAttendanceState();
14 | }
15 |
16 | class _TakeAdvancedAttendanceState extends State {
17 | String databaseRefToPresentStu = "null";
18 | int numberOfStudents = 0;
19 | List presentStudents = [];
20 |
21 | final dateToday = DateTime.now();
22 | databaseRefToPresentStudents() {
23 | databaseRefToPresentStu =
24 | "class/timetable/${dateToday.year}/${dateToday.month}/${dateToday.day}/${globals.selSubforAttendance}/presentstudents";
25 | final database = dbReference.child(databaseRefToPresentStu);
26 |
27 | return database;
28 | }
29 |
30 | @override
31 | Widget build(BuildContext context) {
32 | return Scaffold(
33 | body: SafeArea(
34 | child: SingleChildScrollView(
35 | child: Padding(
36 | padding: const EdgeInsets.all(30),
37 | child: Column(
38 | crossAxisAlignment: CrossAxisAlignment.start,
39 | children: [
40 | Row(
41 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
42 | children: [
43 | Column(
44 | crossAxisAlignment: CrossAxisAlignment.start,
45 | children: [
46 | const Text(
47 | "Attendance",
48 | style: TextStyle(fontSize: 14, color: Colors.black),
49 | ),
50 | const SizedBox(
51 | height: 5,
52 | ),
53 | Text(
54 | globals.selSubforAttendance,
55 | style: const TextStyle(
56 | fontSize: 25,
57 | fontWeight: FontWeight.bold,
58 | color: Colors.black),
59 | ),
60 | ],
61 | ),
62 | GestureDetector(
63 | onTap: () async {
64 | Navigator.pop(context);
65 | },
66 | child: Container(
67 | width: 50,
68 | height: 50,
69 | decoration: BoxDecoration(
70 | color: Colors.black.withOpacity(0.03),
71 | borderRadius: BorderRadius.circular(12)),
72 | child: const Center(
73 | child: Icon(LineIcons.arrowLeft),
74 | ),
75 | ),
76 | )
77 | ],
78 | ),
79 | const SizedBox(
80 | height: 30,
81 | ),
82 | Row(
83 | children: [
84 | const Text(
85 | "Getting Students..",
86 | style: TextStyle(
87 | color: ThemeColor.primary,
88 | fontSize: 18,
89 | fontWeight: FontWeight.w800),
90 | ),
91 | const Spacer(),
92 | // ignore: sized_box_for_whitespace
93 | Container(
94 | height: 15,
95 | width: 15,
96 | child: const CircularProgressIndicator(
97 | color: ThemeColor.primary,
98 | ),
99 | ),
100 | ],
101 | ),
102 | const SizedBox(
103 | height: 20,
104 | ),
105 | FirebaseAnimatedList(
106 | physics: const NeverScrollableScrollPhysics(),
107 | query: databaseRefToPresentStudents(),
108 | shrinkWrap: true,
109 | defaultChild: const Center(
110 | child: CircularProgressIndicator(),
111 | ),
112 | itemBuilder: (context, snapshot, animation, index) {
113 | if (numberOfStudents < index + 1) {
114 | numberOfStudents = index;
115 | }
116 |
117 | if (presentStudents.contains(snapshot.key)) {
118 | // ignore: avoid_print
119 | print("Already Added");
120 | } else {
121 | presentStudents.add(snapshot.key);
122 | }
123 |
124 | return Column(
125 | children: [
126 | const SizedBox(
127 | height: 10,
128 | ),
129 | GestureDetector(
130 | onTap: () {},
131 | child: Container(
132 | height: 60,
133 | decoration: BoxDecoration(
134 | boxShadow: const [
135 | BoxShadow(
136 | color: ThemeColor.shadow,
137 | blurRadius: 10,
138 | spreadRadius: 0.1,
139 | offset: Offset(0, 10)),
140 | ],
141 | color: ThemeColor.white,
142 | borderRadius: BorderRadius.circular(20)),
143 | child: Padding(
144 | padding: const EdgeInsets.only(left: 10, top: 2),
145 | child: ListTile(
146 | trailing: InkWell(
147 | onTap: () {
148 | numberOfStudents = numberOfStudents - 1;
149 | databaseRefToPresentStudents()
150 | .child(snapshot.key)
151 | .remove();
152 | },
153 | child: Container(
154 | width: 70,
155 | height: 35,
156 | decoration: BoxDecoration(
157 | color: ThemeColor.secondary,
158 | // gradient: const LinearGradient(
159 | // colors: [secondary, primary]),
160 | borderRadius:
161 | BorderRadius.circular(20)),
162 | child: const Center(
163 | child: Icon(LineIcons.trash,
164 | color: Colors.white),
165 | ),
166 | ),
167 | ),
168 | title: Text(
169 | "${index + 1}: ${snapshot.value}",
170 | style: const TextStyle(
171 | fontSize: 17,
172 | color: ThemeColor.black,
173 | fontWeight: FontWeight.w600),
174 | ),
175 | ),
176 | ),
177 | ),
178 | ),
179 | ],
180 | );
181 | },
182 | ),
183 | ],
184 | ),
185 | ),
186 | ),
187 | ),
188 | floatingActionButton: FloatingActionButton.extended(
189 | onPressed: () {
190 | attendanceFetch();
191 | String databaseRefTo =
192 | "class/timetable/${dateToday.year}/${dateToday.month}/${dateToday.day}/${globals.selSubforAttendance}";
193 | final databaseattistaken =
194 | dbReference.child("$databaseRefTo/isnottaken");
195 | databaseattistaken.set(false);
196 | final databaseattislistening =
197 | dbReference.child("$databaseRefTo/islistening");
198 | databaseattislistening.set(false);
199 | Navigator.pop(context);
200 | Navigator.pop(context);
201 | },
202 | label: const Text(' UPLOAD '),
203 | backgroundColor: ThemeColor.primary,
204 | ),
205 | floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
206 | );
207 | }
208 |
209 | Future attendanceFetch() async {
210 | //To increment classes
211 | DatabaseReference classRef = dbReference.child(
212 | "class/numberofclass/${globals.selSubforAttendance.toLowerCase()}");
213 | DataSnapshot subSnapshot = await classRef.get();
214 | int numOfClass = int.parse(subSnapshot.value.toString());
215 | if (numOfClass > 0) {
216 | classRef.set(numOfClass + 1);
217 | } else {
218 | classRef.set(1);
219 | }
220 |
221 | //To add attendance
222 | int i = 0;
223 | String userUIDfromlist;
224 | while (i < numberOfStudents + 1) {
225 | userUIDfromlist = presentStudents[i];
226 |
227 | DatabaseReference ref = dbReference.child(
228 | "users/$userUIDfromlist/class/${globals.selSubforAttendance.toLowerCase()}");
229 | DataSnapshot isAdminDB = await ref.get();
230 | int numOfAttendance = int.parse(isAdminDB.value.toString());
231 | ref.set(numOfAttendance + 1);
232 |
233 | i++;
234 | }
235 |
236 | return false;
237 | }
238 | }
239 |
--------------------------------------------------------------------------------
/lib/admin/student_list.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/firebase_database.dart';
2 | import 'package:firebase_database/ui/firebase_animated_list.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:imin/main.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:line_icons/line_icons.dart';
7 |
8 | class StudentList extends StatefulWidget {
9 | const StudentList({Key? key}) : super(key: key);
10 |
11 | @override
12 | _StudentListState createState() => _StudentListState();
13 | }
14 |
15 | class _StudentListState extends State {
16 | final database = dbReference.child("users");
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | body: SingleChildScrollView(
22 | child: SafeArea(
23 | child: Padding(
24 | padding: const EdgeInsets.all(30),
25 | child: Column(
26 | crossAxisAlignment: CrossAxisAlignment.start,
27 | children: [
28 | Row(
29 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
30 | children: [
31 | Column(
32 | crossAxisAlignment: CrossAxisAlignment.start,
33 | children: const [
34 | Text(
35 | "BCA/5/B",
36 | style: TextStyle(fontSize: 14, color: Colors.black),
37 | ),
38 | SizedBox(
39 | height: 5,
40 | ),
41 | Text(
42 | 'Students',
43 | style: TextStyle(
44 | fontSize: 25,
45 | fontWeight: FontWeight.bold,
46 | color: Colors.black),
47 | ),
48 | ],
49 | ),
50 | GestureDetector(
51 | onTap: () {
52 | Navigator.pop(context);
53 | },
54 | child: Container(
55 | width: 50,
56 | height: 50,
57 | decoration: BoxDecoration(
58 | color: Colors.black.withOpacity(0.03),
59 | borderRadius: BorderRadius.circular(12)),
60 | child: const Center(
61 | child: Icon(LineIcons.arrowLeft),
62 | ),
63 | ),
64 | )
65 | ],
66 | ),
67 | const SizedBox(
68 | height: 20,
69 | ),
70 | FirebaseAnimatedList(
71 | physics: const NeverScrollableScrollPhysics(),
72 | query: database,
73 | shrinkWrap: true,
74 | defaultChild: const Center(child: CircularProgressIndicator(),),
75 | itemBuilder: (context, snapshot, animation, index) {
76 | String userID = 'UID';
77 | Future databaseNameValue() async {
78 | userID = snapshot.key.toString();
79 | // DatabaseReference ref =
80 | // FirebaseDatabase.instance.ref("users/$userID/name");
81 | DataSnapshot userName =
82 | await dbReference.child("users/$userID/name").get();
83 | String userNameDB = userName.value.toString();
84 | return userNameDB;
85 | }
86 |
87 | return FutureBuilder(
88 | future: databaseNameValue(),
89 | builder: (BuildContext context, AsyncSnapshot snapshot) {
90 | if (snapshot.hasData) {
91 | return Column(
92 | children: [
93 | const SizedBox(
94 | height: 10,
95 | ),
96 | GestureDetector(
97 | onTap: () {},
98 | child: Container(
99 | height: 60,
100 | decoration: BoxDecoration(
101 | boxShadow: const [
102 | BoxShadow(
103 | color: ThemeColor.shadow,
104 | blurRadius: 10,
105 | spreadRadius: 0.1,
106 | offset: Offset(0, 10)),
107 | ],
108 | color: ThemeColor.white,
109 | borderRadius: BorderRadius.circular(20)),
110 | child: Padding(
111 | padding:
112 | const EdgeInsets.only(left: 10, top: 2),
113 | child: ListTile(
114 | trailing: InkWell(
115 | onTap: () {
116 | database.child(userID).remove();
117 | },
118 | child: Container(
119 | width: 70,
120 | height: 35,
121 | decoration: BoxDecoration(
122 | color: ThemeColor.secondary,
123 |
124 | borderRadius:
125 | BorderRadius.circular(20)),
126 | child: const Center(
127 | child: Icon(LineIcons.trash,
128 | color: Colors.white),
129 | ),
130 | ),
131 | ),
132 | title: Text(
133 | "${index + 1}: ${snapshot.data}",
134 | style: const TextStyle(
135 | fontSize: 17,
136 | color: ThemeColor.black,
137 | fontWeight: FontWeight.w600),
138 | ),
139 | ),
140 | ),
141 | ),
142 | ),
143 | ],
144 | );
145 | } else {
146 | return Container(
147 | color: Colors.white,
148 | // alignment: Alignment.bottomCenter,
149 | margin: const EdgeInsets.only(top: 20),
150 | child: const Center(
151 | child: CircularProgressIndicator(
152 | backgroundColor: Colors.grey,
153 | color: Colors.blue,
154 | ),
155 | ),
156 | );
157 | }
158 | },
159 | );
160 | },
161 | ),
162 | ],
163 | ),
164 | ),
165 | ),
166 | ),
167 | );
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/lib/admin/take_attendance.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/firebase_database.dart';
2 | import 'package:firebase_database/ui/firebase_animated_list.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:imin/main.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:line_icons/line_icons.dart';
7 | import 'package:imin/models/globals.dart' as globals;
8 |
9 | class TakeAttendance extends StatefulWidget {
10 | const TakeAttendance({Key? key}) : super(key: key);
11 |
12 | @override
13 | _TakeAttendanceState createState() => _TakeAttendanceState();
14 | }
15 |
16 | class _TakeAttendanceState extends State {
17 | final dateToday = DateTime.now();
18 | final database = dbReference.child("users");
19 | String userID = 'UID';
20 | int numberOfStudents = 0;
21 | // Map absentOrPresent = {};
22 | // Map absentOrPresentUID = {};
23 | List isPresent = [];
24 | List isPresentUID = [];
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | body: SingleChildScrollView(
30 | child: SafeArea(
31 | child: Padding(
32 | padding: const EdgeInsets.all(30),
33 | child: Column(
34 | crossAxisAlignment: CrossAxisAlignment.start,
35 | children: [
36 | Row(
37 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
38 | children: [
39 | Column(
40 | crossAxisAlignment: CrossAxisAlignment.start,
41 | children: [
42 | Text(
43 | globals.selSubforAttendance,
44 | style: const TextStyle(
45 | fontSize: 14, color: Colors.black),
46 | ),
47 | const SizedBox(
48 | height: 5,
49 | ),
50 | const Text(
51 | 'Attendance',
52 | style: TextStyle(
53 | fontSize: 25,
54 | fontWeight: FontWeight.bold,
55 | color: Colors.black),
56 | ),
57 | ],
58 | ),
59 | GestureDetector(
60 | onTap: () {
61 | Navigator.pop(context);
62 | },
63 | child: Container(
64 | width: 50,
65 | height: 50,
66 | decoration: BoxDecoration(
67 | color: Colors.black.withOpacity(0.03),
68 | borderRadius: BorderRadius.circular(12)),
69 | child: const Center(
70 | child: Icon(LineIcons.arrowLeft),
71 | ),
72 | ),
73 | )
74 | ],
75 | ),
76 | const SizedBox(
77 | height: 20,
78 | ),
79 | FirebaseAnimatedList(
80 | physics: const NeverScrollableScrollPhysics(),
81 | query: database,
82 | shrinkWrap: true,
83 | itemBuilder: (context, snapshot, animation, index) {
84 | userID = snapshot.key.toString();
85 |
86 | if (numberOfStudents < index + 1) {
87 | numberOfStudents = index;
88 | isPresent.add(false);
89 | isPresentUID.add(userID);
90 | }
91 |
92 | Future databaseNameValue() async {
93 | DataSnapshot userName =
94 | await dbReference.child("users/$userID/name").get();
95 | String userNameDB = userName.value.toString();
96 | return userNameDB;
97 | }
98 |
99 | return FutureBuilder(
100 | future: databaseNameValue(),
101 | builder: (BuildContext context, AsyncSnapshot snapshot) {
102 | if (snapshot.hasData) {
103 | return Column(
104 | children: [
105 | const SizedBox(
106 | height: 10,
107 | ),
108 | GestureDetector(
109 | onTap: () {},
110 | child: Container(
111 | height: 60,
112 | decoration: BoxDecoration(
113 | color: ThemeColor.white,
114 | boxShadow: const [
115 | BoxShadow(
116 | color: ThemeColor.shadow,
117 | blurRadius: 10,
118 | spreadRadius: 0.1,
119 | offset: Offset(0, 10)),
120 | ],
121 | borderRadius: BorderRadius.circular(20)),
122 | child: Padding(
123 | padding:
124 | const EdgeInsets.only(left: 10, top: 2),
125 | child: ListTile(
126 | trailing: InkWell(
127 | onTap: () {
128 | setState(() {
129 | isPresent[index] == true
130 | ? isPresent[index] = false
131 | : isPresent[index] = true;
132 | });
133 | },
134 | child: Container(
135 | width: 70,
136 | height: 35,
137 | decoration: BoxDecoration(
138 | color: isPresent[index] == true
139 | ? ThemeColor.green
140 | : ThemeColor.red,
141 | borderRadius:
142 | BorderRadius.circular(20)),
143 | child: Padding(
144 | padding: const EdgeInsets.all(1.0),
145 | child: isPresent[index] == true
146 | ? const Icon(
147 | LineIcons.check,
148 | size: 30.0,
149 | color: Colors.white,
150 | )
151 | : const Icon(
152 | LineIcons.times,
153 | size: 30.0,
154 | color: Colors.white,
155 | ),
156 | ),
157 | ),
158 | ),
159 | title: Text(
160 | "${index + 1}: ${snapshot.data}",
161 | style: const TextStyle(
162 | fontSize: 17,
163 | color: ThemeColor.black,
164 | fontWeight: FontWeight.w600),
165 | ),
166 | ),
167 | ),
168 | ),
169 | ),
170 | ],
171 | );
172 | } else {
173 | return Container(
174 | color: Colors.white,
175 | margin: const EdgeInsets.only(top: 20),
176 | child: const Center(
177 | child: CircularProgressIndicator(
178 | backgroundColor: Colors.grey,
179 | color: ThemeColor.primary,
180 | ),
181 | ),
182 | );
183 | }
184 | },
185 | );
186 | },
187 | ),
188 | const SizedBox(
189 | height: 60,
190 | ),
191 | ],
192 | ),
193 | ),
194 | ),
195 | ),
196 | floatingActionButton: FloatingActionButton.extended(
197 | backgroundColor: ThemeColor.primary,
198 | label: const Text(
199 | ' UPLOAD ',
200 | ),
201 | onPressed: () {
202 | attendanceFetch();
203 | Navigator.pop(context);
204 | Navigator.pop(context);
205 | },
206 | ),
207 | floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
208 | );
209 | }
210 |
211 | Future attendanceFetch() async {
212 | int i = 0;
213 | String userIDAF = 'n';
214 | // String databaseRefTo =
215 | // "class/timetable/${dateToday.year}/${dateToday.month}/${dateToday.day}/${globals.selSubforAttendance}";
216 | // final databaseattislistening =
217 | dbReference.child("class/timetable/${dateToday.year}/${dateToday.month}/${dateToday.day}/${globals.selSubforAttendance}/islistening").set(false);
218 | // databaseattislistening.set(false);
219 | //To increment classes
220 | DatabaseReference classRef = dbReference.child(
221 | "class/numberofclass/${globals.selSubforAttendance.toLowerCase()}");
222 | DataSnapshot subSnapshot = await classRef.get();
223 | int numOfClass = int.parse(subSnapshot.value.toString());
224 | if (numOfClass > 0) {
225 | classRef.set(numOfClass + 1);
226 | } else {
227 | classRef.set(1);
228 | }
229 |
230 | //To add attendance
231 | while (i < numberOfStudents + 1) {
232 | userIDAF = isPresentUID[i];
233 |
234 | if (isPresent[i] == true) {
235 | DatabaseReference ref = dbReference.child(
236 | "users/$userIDAF/class/${globals.selSubforAttendance.toLowerCase()}");
237 | DataSnapshot isAdminDB = await ref.get();
238 | int numOfAttendance = int.parse(isAdminDB.value.toString());
239 | ref.set(numOfAttendance + 1);
240 | }
241 |
242 | i++;
243 | }
244 |
245 | return false;
246 | }
247 | }
248 |
--------------------------------------------------------------------------------
/lib/admin/upload_ia.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/ui/firebase_animated_list.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_fonts/google_fonts.dart';
4 | import 'package:imin/main.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:imin/models/font_size.dart';
7 | import 'package:imin/models/globals.dart' as globals;
8 | import 'package:line_icons/line_icons.dart';
9 |
10 | class UploadIA extends StatefulWidget {
11 | const UploadIA({Key? key}) : super(key: key);
12 |
13 | @override
14 | _UploadIAState createState() => _UploadIAState();
15 | }
16 |
17 | class _UploadIAState extends State {
18 | List iaMark = [];
19 | List userUID = [];
20 | String dropdownValue = 'Select Subject';
21 | final database = dbReference.child("users");
22 | int numberOfStudents = 0;
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | body: SafeArea(
27 | child: SingleChildScrollView(
28 | child: Padding(
29 | padding: const EdgeInsets.all(30.0),
30 | child: Column(
31 | crossAxisAlignment: CrossAxisAlignment.start,
32 | children: [
33 | Row(
34 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
35 | children: [
36 | Column(
37 | crossAxisAlignment: CrossAxisAlignment.start,
38 | children: const [
39 | Text(
40 | "BCA/5/B",
41 | style: TextStyle(fontSize: 14, color: Colors.black),
42 | ),
43 | SizedBox(
44 | height: 5,
45 | ),
46 | Text(
47 | "Upload IA Marks",
48 | style: TextStyle(
49 | fontSize: 25,
50 | fontWeight: FontWeight.bold,
51 | color: Colors.black),
52 | ),
53 | ],
54 | ),
55 | GestureDetector(
56 | onTap: () async {
57 | Navigator.pop(context);
58 | },
59 | child: Container(
60 | width: 50,
61 | height: 50,
62 | decoration: BoxDecoration(
63 | color: Colors.black.withOpacity(0.03),
64 | borderRadius: BorderRadius.circular(12)),
65 | child: const Center(
66 | child: Icon(LineIcons.arrowLeft),
67 | ),
68 | ),
69 | )
70 | ],
71 | ),
72 | const SizedBox(
73 | height: 20,
74 | ),
75 | DecoratedBox(
76 | decoration: const ShapeDecoration(
77 | color: ThemeColor.primary,
78 | shape: RoundedRectangleBorder(
79 | borderRadius: BorderRadius.all(Radius.circular(15.0)),
80 | ),
81 | ),
82 | child: Padding(
83 | padding: const EdgeInsets.all(8.0),
84 | child: DropdownButton(
85 | isDense: true,
86 | borderRadius: BorderRadius.circular(30),
87 | hint: Text(
88 | dropdownValue,
89 | style: const TextStyle(
90 | color: ThemeColor.white,
91 | fontSize: 15,
92 | fontWeight: FontWeight.bold),
93 | ),
94 | items: globals.subjects
95 | .map(
96 | (e) => DropdownMenuItem(
97 | value: e,
98 | child: Center(
99 | child: Text(
100 | e,
101 | style: const TextStyle(
102 | color: ThemeColor.primary,
103 | fontSize: 15,
104 | fontWeight: FontWeight.bold),
105 | ),
106 | ),
107 | ),
108 | )
109 | .toList(),
110 | onChanged: (value) {
111 | setState(() {
112 | dropdownValue = value.toString();
113 | });
114 | }),
115 | ),
116 | ),
117 | const SizedBox(
118 | height: 10,
119 | ),
120 | FirebaseAnimatedList(
121 | physics: const NeverScrollableScrollPhysics(),
122 | query: database,
123 | shrinkWrap: true,
124 | defaultChild: const Center(
125 | child: CircularProgressIndicator(),
126 | ),
127 | itemBuilder: (context, snapshot, animation, index) {
128 | String userID = 'UID';
129 | userID = snapshot.key.toString();
130 |
131 | if (numberOfStudents < index + 1) {
132 | numberOfStudents = index;
133 | userUID.add(userID);
134 | iaMark.add("0");
135 | }
136 |
137 | return Column(
138 | children: [
139 | const SizedBox(
140 | height: 10,
141 | ),
142 | GestureDetector(
143 | onTap: () {},
144 | child: Container(
145 | height: 60,
146 | decoration: BoxDecoration(
147 | boxShadow: const [
148 | BoxShadow(
149 | color: ThemeColor.shadow,
150 | blurRadius: 10,
151 | spreadRadius: 0.1,
152 | offset: Offset(0, 10)),
153 | ],
154 | color: ThemeColor.white,
155 | borderRadius: BorderRadius.circular(20)),
156 | child: Padding(
157 | padding: const EdgeInsets.only(left: 10, top: 2),
158 | child: ListTile(
159 | // ignore: sized_box_for_whitespace
160 | trailing: Container(
161 | width: 50,
162 | height: 50,
163 | child: TextField(
164 | onChanged: (value) {
165 | iaMark[index] = value;
166 | },
167 | cursorColor: ThemeColor.primary,
168 | decoration: InputDecoration(
169 | fillColor: ThemeColor.textFieldBgColor,
170 | filled: true,
171 | hintText: "IA",
172 | hintStyle: GoogleFonts.poppins(
173 | color: ThemeColor.textFieldHintColor,
174 | fontSize: FontSize.medium,
175 | fontWeight: FontWeight.w400,
176 | ),
177 | border: const OutlineInputBorder(
178 | borderSide: BorderSide.none,
179 | borderRadius: BorderRadius.all(
180 | Radius.circular(18)),
181 | ),
182 | ),
183 | textAlign: TextAlign.center,
184 | keyboardType:
185 | const TextInputType.numberWithOptions(),
186 | textInputAction: TextInputAction.next,
187 | style: const TextStyle(
188 | fontSize: 17,
189 | color: ThemeColor.black,
190 | fontWeight: FontWeight.w600),
191 | ),
192 | ),
193 | title: Text(
194 | "${index + 1}: ${snapshot.child("name").value}",
195 | style: const TextStyle(
196 | fontSize: 17,
197 | color: ThemeColor.black,
198 | fontWeight: FontWeight.w600),
199 | ),
200 | ),
201 | ),
202 | ),
203 | ),
204 | ],
205 | );
206 | },
207 | ),
208 | ],
209 | ),
210 | ),
211 | ),
212 | ),
213 | floatingActionButton: FloatingActionButton.extended(
214 | backgroundColor: ThemeColor.primary,
215 | label: const Text(
216 | ' UPLOAD ',
217 | ),
218 | onPressed: () {
219 | iaFetch();
220 | Navigator.pop(context);
221 | },
222 | ),
223 | floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
224 | );
225 | }
226 |
227 | Future iaFetch() async {
228 | int i = 0;
229 | while (i < numberOfStudents + 1) {
230 | dbReference.child("users/${userUID[i]}/ia-marks/$dropdownValue").set(iaMark[i]);
231 | i++;
232 | }
233 | }
234 | }
235 |
--------------------------------------------------------------------------------
/lib/admin/view_queries.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/firebase_database.dart';
2 | import 'package:firebase_database/ui/firebase_animated_list.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:imin/main.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:line_icons/line_icons.dart';
7 | import 'package:expandable/expandable.dart';
8 |
9 | class ViewQueries extends StatefulWidget {
10 | const ViewQueries({Key? key}) : super(key: key);
11 |
12 | @override
13 | State createState() => _ViewQueriesState();
14 | }
15 |
16 | class _ViewQueriesState extends State {
17 | String queryTypeFromDB = "No Query found";
18 | String querySubjectFromDB = "----";
19 | String queryFromDB = "You didnt send any query";
20 | String queryStatusFromDB = "null";
21 |
22 | DatabaseReference queries = dbReference.child("class/queries");
23 |
24 | // getDataFromDB() async {
25 | // DataSnapshot queries =
26 | // await dbReference.child("class/queries/${globals.userID}").get();
27 | // queryTypeFromDB = queries.child("QueryType").value.toString();
28 | // querySubjectFromDB = queries.child("Subject").value.toString();
29 | // queryFromDB = queries.child("Query").value.toString();
30 | // queryStatusFromDB = queries.child("Status").value.toString();
31 | // }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | body: SingleChildScrollView(
37 | child: SafeArea(
38 | child: Padding(
39 | padding: const EdgeInsets.all(30.0),
40 | child: Column(
41 | crossAxisAlignment: CrossAxisAlignment.start,
42 | children: [
43 | Row(
44 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
45 | children: [
46 | Column(
47 | crossAxisAlignment: CrossAxisAlignment.start,
48 | children: const [
49 | Text(
50 | "BCA/5/B",
51 | style: TextStyle(fontSize: 14, color: Colors.black),
52 | ),
53 | SizedBox(
54 | height: 5,
55 | ),
56 | Text(
57 | "View Queries",
58 | style: TextStyle(
59 | fontSize: 25,
60 | fontWeight: FontWeight.bold,
61 | color: Colors.black),
62 | ),
63 | ],
64 | ),
65 | GestureDetector(
66 | onTap: () {
67 | Navigator.pop(context);
68 | },
69 | child: Container(
70 | width: 50,
71 | height: 50,
72 | decoration: BoxDecoration(
73 | color: Colors.black.withOpacity(0.03),
74 | borderRadius: BorderRadius.circular(12)),
75 | child: const Center(
76 | child: Icon(LineIcons.arrowLeft),
77 | ),
78 | ),
79 | )
80 | ],
81 | ),
82 | const SizedBox(
83 | height: 20,
84 | ),
85 | FirebaseAnimatedList(
86 | query: queries,
87 | physics: const NeverScrollableScrollPhysics(),
88 | shrinkWrap: true,
89 | defaultChild: const Center(
90 | child: CircularProgressIndicator(),
91 | ),
92 | itemBuilder: (context, snapshot, animation, index) {
93 | return Column(
94 | children: [
95 | Container(
96 | width: double.infinity,
97 | // height: 125,
98 | decoration: BoxDecoration(
99 | boxShadow: const [
100 | BoxShadow(
101 | color: ThemeColor.shadow,
102 | blurRadius: 100,
103 | spreadRadius: 10,
104 | offset: Offset(0, 60)),
105 | ],
106 | borderRadius: BorderRadius.circular(15),
107 | color: ThemeColor.white,
108 | ),
109 | child: Padding(
110 | padding: const EdgeInsets.only(left: 30.0),
111 | child: Column(
112 | children: [
113 | const SizedBox(
114 | height: 20,
115 | ),
116 | ExpandablePanel(
117 | header: Row(
118 | mainAxisAlignment:
119 | MainAxisAlignment.spaceBetween,
120 | children: [
121 | Text(
122 | snapshot
123 | .child("QueryType")
124 | .value
125 | .toString(),
126 | style: const TextStyle(
127 | fontSize: 17,
128 | color: ThemeColor.primary,
129 | fontWeight: FontWeight.w600),
130 | ),
131 | Container(
132 | child: snapshot.child("Status").value ==
133 | "Approved / Resolved"
134 | ? const Icon(LineIcons.check)
135 | : const Icon(LineIcons.syncIcon),
136 |
137 | // if (snapshot.value="Approved / Resolved") {
138 | // Icon(LineIcons.syncIcon)
139 | // } else {
140 | // Icon(LineIcons.check)
141 | // }
142 | )
143 | ],
144 | ),
145 | collapsed: Text(
146 | // ignore: unnecessary_string_interpolations
147 | "${snapshot.child("Subject").value.toString()}",
148 | softWrap: true,
149 | maxLines: 2,
150 | overflow: TextOverflow.ellipsis,
151 | style: const TextStyle(
152 | fontSize: 14,
153 | color: ThemeColor.black,
154 | fontWeight: FontWeight.w400),
155 | ),
156 | expanded: Column(
157 | children: [
158 | Text(
159 | "Student Name: ${snapshot.child("Name").value.toString()}",
160 | softWrap: true,
161 | maxLines: 2,
162 | overflow: TextOverflow.ellipsis,
163 | style: const TextStyle(
164 | fontSize: 14,
165 | color: ThemeColor.black,
166 | fontWeight: FontWeight.w400),
167 | ),
168 | const SizedBox(
169 | height: 10,
170 | ),
171 | Text(
172 | snapshot
173 | .child("Query")
174 | .value
175 | .toString(),
176 | softWrap: true,
177 | style: const TextStyle(
178 | fontSize: 14,
179 | color: ThemeColor.black,
180 | fontWeight: FontWeight.w400),
181 | ),
182 | TextButton(
183 | onPressed: () {
184 | queries
185 | .child("${snapshot.key}/Status")
186 | .set("Approved / Resolved");
187 | },
188 | child:
189 | const Text("Approve / Resolved")),
190 | ],
191 | ),
192 | ),
193 | const SizedBox(
194 | height: 20,
195 | ),
196 | ],
197 | ),
198 | ),
199 | ),
200 | const SizedBox(
201 | height: 10,
202 | ),
203 | ],
204 | );
205 | },
206 | ),
207 | ],
208 | ),
209 | ),
210 | ),
211 | ),
212 | );
213 | }
214 | }
215 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: avoid_print
2 |
3 | import 'package:firebase_core/firebase_core.dart';
4 | import 'package:firebase_database/firebase_database.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter/services.dart';
7 | import 'package:geolocator/geolocator.dart';
8 | import 'package:location/location.dart' as loc;
9 | import 'package:imin/services/auth_service.dart';
10 | import 'package:imin/services/wrapper.dart';
11 | import 'package:provider/provider.dart';
12 | import 'package:shared_preferences/shared_preferences.dart';
13 |
14 | late SharedPreferences spInstance;
15 | late DatabaseReference dbReference;
16 |
17 | main() async {
18 | WidgetsFlutterBinding.ensureInitialized();
19 |
20 | await Firebase.initializeApp();
21 |
22 | spInstance =await SharedPreferences.getInstance();
23 | dbReference = FirebaseDatabase.instance.ref();
24 |
25 | SystemChrome.setSystemUIOverlayStyle(
26 | const SystemUiOverlayStyle(statusBarColor: Colors.transparent,statusBarIconBrightness:Brightness.dark ));
27 | _checklocationServices();
28 |
29 | runApp(const MyApp());
30 | }
31 |
32 |
33 | Future _checklocationServices() async {
34 | bool serviceEnabled;
35 | LocationPermission permission;
36 |
37 | serviceEnabled = await Geolocator.isLocationServiceEnabled();
38 | if (!serviceEnabled) {
39 | loc.Location.instance.requestService;
40 | print('Location services are disabled.');
41 | }
42 |
43 | permission = await Geolocator.checkPermission();
44 | if (permission == LocationPermission.denied) {
45 | permission = await Geolocator.requestPermission();
46 | if (permission == LocationPermission.denied) {
47 | print('Location permissions are denied');
48 | }
49 | }
50 |
51 | if (permission == LocationPermission.deniedForever) {
52 | // Permissions are denied forever, handle appropriately.
53 | print(
54 | 'Location permissions are permanently denied, we cannot request permissions.');
55 | }
56 | }
57 |
58 | class MyApp extends StatelessWidget {
59 | const MyApp({Key? key}) : super(key: key);
60 |
61 | @override
62 | Widget build(BuildContext context) {
63 | return MultiProvider(
64 | providers: [
65 | Provider(
66 | create: (_) => AuthService(),
67 | ),
68 | ],
69 | child: MaterialApp(
70 | debugShowCheckedModeBanner: false,
71 | title: 'iMiN',
72 | theme: ThemeData(primarySwatch: Colors.blue),
73 | home: Wrapper(),
74 | ),
75 | );
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/lib/models/colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ThemeColor {
4 | static const Color shadow = Color(0xFFbfc9e0);
5 | static const Color white = Color(0xFFFFFFFF);
6 | static const Color black = Color(0xFF000000);
7 | static const Color grey = Color(0xFF595959);
8 | static const Color green = Color(0xFF008E36);
9 | static const Color red = Color(0xFFfd6129);
10 | static const Color lightGrey = Color(0xFFBDC4CE);
11 | static const Color lightBlue = Color(0xFF80A4F1);
12 |
13 | static const Color primary = Color(0xFF3C6EE0);
14 | static const Color secondary = Color(0xFF2554C2);
15 |
16 | static const Color scaffoldBgColor = Color(0xFFF3F4F3);
17 | static const Color textFieldBgColor = Color(0xFFDFE5F0);
18 | static const Color textFieldHintColor = Color(0xFF333333);
19 |
20 | static const Color redForLoc = Color(0xFFE03F3D);
21 | static const Color orangeForLoc = Color(0xFFE0813D);
22 | static const Color greenForLoc = Color(0xFF73E03D);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/lib/models/font_size.dart:
--------------------------------------------------------------------------------
1 | class FontSize {
2 | static const xSmall = 10.0;
3 | static const small = 12.0;
4 | static const medium = 14.0;
5 | static const xMedium = 16.0;
6 | static const large = 18.0;
7 | static const xLarge = 20.0;
8 | static const xxLarge = 22.0;
9 | static const xxxLarge = 40.0;
10 | }
11 |
--------------------------------------------------------------------------------
/lib/models/globals.dart:
--------------------------------------------------------------------------------
1 | library globals;
2 |
3 | String userID = 'null';
4 | String userName = '';
5 | bool isAdmin = false;
6 |
7 | String selSubforAttendance = 'Subject';
8 | String classMode = 'mode';
9 | String timeOfClass = 'time';
10 |
11 | //SUBJECTS FOR COUNTING CLASSES
12 | List subjects = [
13 | 'C++',
14 | 'Dart',
15 | 'Java',
16 | 'Javascript',
17 | 'Python',
18 | 'Swift'
19 | ];
20 |
21 | List subjectsAttendance = [];
22 | List subjectsTotalClass = [];
23 | String attendancePercent = 'null';
24 |
25 | //LOCATION BASED ATTENDANCE
26 |
27 |
28 | double latitude = 15.0843241;
29 | double longitude = 79.4849571;
30 | bool streamStarted = false;
31 |
--------------------------------------------------------------------------------
/lib/models/main_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 | import 'package:imin/models/font_size.dart';
4 | import 'package:imin/models/colors.dart';
5 |
6 | class MainButton extends StatelessWidget {
7 | final String text;
8 | final Color? backgroundColor;
9 | final Color? textColor;
10 | final String? iconPath;
11 | final Function() onTap;
12 | const MainButton({
13 | Key? key,
14 | required this.text,
15 | this.backgroundColor,
16 | this.textColor,
17 | required this.onTap,
18 | this.iconPath,
19 | }) : super(key: key);
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return GestureDetector(
24 | onTap: onTap,
25 | child: Container(
26 | height: 75,
27 | width: double.infinity,
28 | decoration: BoxDecoration(
29 | color: backgroundColor ?? ThemeColor.primary,
30 | borderRadius: BorderRadius.circular(28),
31 | ),
32 | child: Center(
33 | child: Row(
34 | mainAxisAlignment: MainAxisAlignment.center,
35 | children: [
36 | iconPath == null
37 | ? Container()
38 | : Padding(
39 | padding: const EdgeInsets.only(right: 20),
40 | child: Image(
41 | image: AssetImage(iconPath!),
42 | height: 25,
43 | ),
44 | ),
45 | Text(
46 | text,
47 | style: GoogleFonts.poppins(
48 | color: textColor ?? ThemeColor.white,
49 | fontSize: FontSize.medium,
50 | fontWeight: FontWeight.bold,
51 | ),
52 | ),
53 | ],
54 | ),
55 | ),
56 | ),
57 | );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/models/user_model.dart:
--------------------------------------------------------------------------------
1 | class User {
2 | final String uid;
3 | final String? username;
4 | final String? email;
5 |
6 | User(this.uid,this.username, this.email);
7 | }
8 |
--------------------------------------------------------------------------------
/lib/screens/loading_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class LoadingScreen extends StatelessWidget {
4 | const LoadingScreen({Key? key}) : super(key: key);
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return Scaffold(
9 | body: Container(
10 | width: double.infinity,
11 | height: double.infinity,
12 | decoration: const BoxDecoration(
13 | gradient: LinearGradient(
14 | begin: Alignment.topRight,
15 | end: Alignment.bottomLeft,
16 | colors: [Color(0xFF1CB5E0), Color(0xFF000046)]),
17 | ),
18 | child: Column(
19 | crossAxisAlignment: CrossAxisAlignment.center,
20 | mainAxisAlignment: MainAxisAlignment.center,
21 | children: [
22 | const Image(
23 | image: AssetImage('assets/images/illustration2.png'),
24 | height: 250,
25 | fit: BoxFit.fitHeight,
26 | ),
27 | const SizedBox(height: 50),
28 | Row(
29 | mainAxisAlignment: MainAxisAlignment.center,
30 | children: [
31 | const Text(
32 | "Loading...",
33 | textAlign: TextAlign.center,
34 | style: TextStyle(
35 | color: Colors.white,
36 | fontWeight: FontWeight.bold,
37 | fontSize: 28.0,
38 | ),
39 | ),
40 | const SizedBox(width: 10),
41 | // ignore: sized_box_for_whitespace
42 | Container(
43 | height: 20,
44 | width: 20,
45 | child: const CircularProgressIndicator(
46 | valueColor: AlwaysStoppedAnimation(Colors.white),
47 | ),
48 | ),
49 | ],
50 | ),
51 | ],
52 | ),
53 | ),
54 | );
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/lib/screens/login_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 | import 'package:imin/models/main_button.dart';
4 | import 'package:imin/models/font_size.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:imin/services/auth_service.dart';
7 | import 'package:imin/screens/signup_page.dart';
8 | import 'package:provider/provider.dart';
9 | import 'package:dialogs/dialogs.dart';
10 |
11 | class LoginPage extends StatefulWidget {
12 | const LoginPage({Key? key}) : super(key: key);
13 |
14 | @override
15 | _LoginPageState createState() => _LoginPageState();
16 | }
17 |
18 | class _LoginPageState extends State {
19 | final _formKey = GlobalKey();
20 |
21 | final TextEditingController _emailController = TextEditingController();
22 | final TextEditingController _passwordController = TextEditingController();
23 |
24 |
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | final authService = Provider.of(context);
29 | return Scaffold(
30 | backgroundColor: ThemeColor.scaffoldBgColor,
31 | body: SafeArea(
32 | child: Padding(
33 | padding: const EdgeInsets.fromLTRB(30, 60, 30, 30),
34 | child: SingleChildScrollView(
35 | child: Column(
36 | crossAxisAlignment: CrossAxisAlignment.start,
37 | children: [
38 | const SizedBox(
39 | height: 20,
40 | ),
41 | Text(
42 | "Let's get you in!",
43 | style: GoogleFonts.poppins(
44 | color: ThemeColor.black,
45 | fontSize: FontSize.xxLarge,
46 | fontWeight: FontWeight.w600,
47 | ),
48 | ),
49 | Padding(
50 | padding: const EdgeInsets.only(top: 7),
51 | child: Text(
52 | "Login to your account.",
53 | style: GoogleFonts.poppins(
54 | color: ThemeColor.grey,
55 | fontSize: FontSize.medium,
56 | fontWeight: FontWeight.w600,
57 | ),
58 | ),
59 | ),
60 | const SizedBox(height: 70),
61 | Form(
62 | key: _formKey,
63 | child: Column(
64 | children: [
65 | ///Email Input Field
66 | TextFormField(
67 | controller: _emailController,
68 | validator: (value) {
69 | if (_emailController.text.isEmpty) {
70 | return "This field can't be empty";
71 | }
72 | },
73 | style: GoogleFonts.poppins(
74 | color: ThemeColor.black,
75 | ),
76 | keyboardType: TextInputType.emailAddress,
77 | textInputAction: TextInputAction.next,
78 | cursorColor: ThemeColor.primary,
79 | decoration: InputDecoration(
80 | fillColor: ThemeColor.textFieldBgColor,
81 | filled: true,
82 | hintText: "E-Mail",
83 | hintStyle: GoogleFonts.poppins(
84 | color: ThemeColor.textFieldHintColor,
85 | fontSize: FontSize.medium,
86 | fontWeight: FontWeight.w400,
87 | ),
88 | border: const OutlineInputBorder(
89 | borderSide: BorderSide.none,
90 | borderRadius: BorderRadius.all(Radius.circular(18)),
91 | ),
92 | ),
93 | ),
94 | const SizedBox(height: 16),
95 |
96 | ///Password Input Field
97 | TextFormField(
98 | controller: _passwordController,
99 | validator: (value) {
100 | if (_passwordController.text.isEmpty) {
101 | return "This field can't be empty";
102 | }
103 | },
104 | obscureText: true,
105 | style: GoogleFonts.poppins(
106 | color: ThemeColor.black,
107 | ),
108 | keyboardType: TextInputType.visiblePassword,
109 | textInputAction: TextInputAction.done,
110 | onFieldSubmitted: (value) {
111 | if (_formKey.currentState!.validate()) {
112 | authService.signInWithEmailAndPassword(
113 | _emailController.text,
114 | _passwordController.text);
115 | }
116 | },
117 | cursorColor: ThemeColor.primary,
118 | decoration: InputDecoration(
119 | fillColor: ThemeColor.textFieldBgColor,
120 | filled: true,
121 | hintText: "Password",
122 | hintStyle: GoogleFonts.poppins(
123 | color: ThemeColor.textFieldHintColor,
124 | fontSize: FontSize.medium,
125 | fontWeight: FontWeight.w400,
126 | ),
127 | border: const OutlineInputBorder(
128 | borderSide: BorderSide.none,
129 | borderRadius: BorderRadius.all(Radius.circular(18)),
130 | ),
131 | ),
132 | ),
133 | Align(
134 | alignment: Alignment.centerRight,
135 | child: Padding(
136 | padding: const EdgeInsets.only(top: 12),
137 | child: GestureDetector(
138 | onTap: () {
139 | MessageDialog messageDialog = MessageDialog(
140 | dialogBackgroundColor: Colors.white,
141 | buttonOkColor: ThemeColor.primary,
142 | title: 'Forgot password?',
143 | titleColor: Colors.black,
144 | message: 'Contact: admin@imin.com',
145 | messageColor: Colors.black,
146 | buttonOkText: 'Ok',
147 | dialogRadius: 30.0,
148 | buttonRadius: 15.0,
149 | );
150 | messageDialog.show(context,
151 | barrierColor: Colors.white);
152 | },
153 | child: Text(
154 | "Forgot password?",
155 | style: GoogleFonts.poppins(
156 | color: ThemeColor.grey,
157 | fontSize: FontSize.medium,
158 | fontWeight: FontWeight.w600,
159 | decoration: TextDecoration.underline,
160 | ),
161 | ),
162 | ),
163 | ),
164 | ),
165 | const SizedBox(height: 50),
166 | MainButton(
167 | text: 'Login',
168 | onTap: () {
169 | if (_formKey.currentState!.validate()) {
170 | authService.signInWithEmailAndPassword(
171 | _emailController.text,
172 | _passwordController.text);
173 | }
174 | },
175 | ),
176 |
177 | ],
178 | ),
179 | ),
180 | Padding(
181 | padding: const EdgeInsets.only(top: 20),
182 | child: Row(
183 | mainAxisAlignment: MainAxisAlignment.center,
184 | children: [
185 | Text(
186 | "Don't have an account? ",
187 | style: GoogleFonts.poppins(
188 | color: ThemeColor.black,
189 | fontSize: FontSize.medium,
190 | fontWeight: FontWeight.w600,
191 | ),
192 | ),
193 | GestureDetector(
194 | onTap: () => Navigator.push(
195 | context,
196 | MaterialPageRoute(
197 | builder: (context) => const SignUpPage(),
198 | ),
199 | ),
200 | child: Text(
201 | "Sign Up",
202 | style: GoogleFonts.poppins(
203 | color: ThemeColor.primary,
204 | fontSize: FontSize.medium,
205 | fontWeight: FontWeight.w600,
206 | ),
207 | ),
208 | ),
209 | ],
210 | ),
211 | )
212 | ],
213 | ),
214 | ),
215 | ),
216 | ),
217 | );
218 | }
219 | }
220 |
--------------------------------------------------------------------------------
/lib/screens/signup_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 | import 'package:imin/models/main_button.dart';
4 | import 'package:imin/models/font_size.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:imin/services/auth_service.dart';
7 | import 'package:provider/provider.dart';
8 |
9 | class SignUpPage extends StatefulWidget {
10 | const SignUpPage({Key? key}) : super(key: key);
11 |
12 | @override
13 | _SignUpPageState createState() => _SignUpPageState();
14 | }
15 |
16 | class _SignUpPageState extends State {
17 | final _formKey = GlobalKey();
18 |
19 | final TextEditingController _nameController = TextEditingController();
20 | final TextEditingController _emailController = TextEditingController();
21 | final TextEditingController _passwordController = TextEditingController();
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | final authService = Provider.of(context);
26 |
27 | return Scaffold(
28 |
29 | body: SafeArea(
30 | child: Padding(
31 | padding: const EdgeInsets.all(30),
32 | child: SingleChildScrollView(
33 | child: Column(
34 | crossAxisAlignment: CrossAxisAlignment.start,
35 | children: [
36 | const SizedBox(height: 30),
37 | Text(
38 | "New here? Welcome!",
39 | style: GoogleFonts.poppins(
40 | color: ThemeColor.black,
41 | fontSize: FontSize.xxLarge,
42 | fontWeight: FontWeight.w600,
43 | ),
44 | ),
45 | Padding(
46 | padding: const EdgeInsets.only(top: 7),
47 | child: Text(
48 | "Please fill the form to continue.",
49 | style: GoogleFonts.poppins(
50 | color: ThemeColor.grey,
51 | fontSize: FontSize.medium,
52 | fontWeight: FontWeight.w600,
53 | ),
54 | ),
55 | ),
56 | const SizedBox(height: 70),
57 | Form(
58 | key: _formKey,
59 | child: Column(
60 | children: [
61 | ///Name Input Field
62 | TextFormField(
63 | controller: _nameController,
64 | validator: (value) {
65 | if (_nameController.text.isEmpty) {
66 | return "This field can't be empty";
67 | }
68 | },
69 | style: GoogleFonts.poppins(
70 | color: ThemeColor.black,
71 | ),
72 | keyboardType: TextInputType.name,
73 | textInputAction: TextInputAction.next,
74 | cursorColor: ThemeColor.primary,
75 | decoration: InputDecoration(
76 | fillColor: ThemeColor.textFieldBgColor,
77 | filled: true,
78 | hintText: "Full name",
79 | hintStyle: GoogleFonts.poppins(
80 | color: ThemeColor.textFieldHintColor,
81 | fontSize: FontSize.medium,
82 | fontWeight: FontWeight.w400,
83 | ),
84 | border: const OutlineInputBorder(
85 | borderSide: BorderSide.none,
86 | borderRadius: BorderRadius.all(Radius.circular(18)),
87 | ),
88 | ),
89 | ),
90 | const SizedBox(height: 16),
91 |
92 | ///E-mail Input Field
93 | TextFormField(
94 | controller: _emailController,
95 | validator: (value) {
96 | if (_emailController.text.isEmpty) {
97 | return "This field can't be empty";
98 | }
99 | },
100 | style: GoogleFonts.poppins(
101 | color: ThemeColor.black,
102 | ),
103 | cursorColor: ThemeColor.primary,
104 | keyboardType: TextInputType.emailAddress,
105 | textInputAction: TextInputAction.next,
106 | decoration: InputDecoration(
107 | fillColor: ThemeColor.textFieldBgColor,
108 | filled: true,
109 | hintText: "E-Mail",
110 | hintStyle: GoogleFonts.poppins(
111 | color: ThemeColor.textFieldHintColor,
112 | fontSize: FontSize.medium,
113 | fontWeight: FontWeight.w400,
114 | ),
115 | border: const OutlineInputBorder(
116 | borderSide: BorderSide.none,
117 | borderRadius: BorderRadius.all(Radius.circular(18)),
118 | ),
119 | ),
120 | ),
121 | const SizedBox(height: 16),
122 |
123 | TextFormField(
124 | controller: _passwordController,
125 | validator: (value) {
126 | if (_passwordController.text.isEmpty) {
127 | return "This field can't be empty";
128 | }
129 | },
130 | obscureText: true,
131 | style: GoogleFonts.poppins(
132 | color: ThemeColor.black,
133 | ),
134 | keyboardType: TextInputType.visiblePassword,
135 | textInputAction: TextInputAction.done,
136 | onFieldSubmitted: (value) async {
137 | if (_formKey.currentState!.validate()) {
138 | await authService.createUserWithEmailAndPassword(
139 | _nameController.text,
140 | _emailController.text,
141 | _passwordController.text);
142 | Navigator.pop(context);
143 | }
144 | },
145 | cursorColor: ThemeColor.primary,
146 | decoration: InputDecoration(
147 | fillColor: ThemeColor.textFieldBgColor,
148 | filled: true,
149 | hintText: "Password",
150 | hintStyle: GoogleFonts.poppins(
151 | color: ThemeColor.textFieldHintColor,
152 | fontSize: FontSize.medium,
153 | fontWeight: FontWeight.w400,
154 | ),
155 | border: const OutlineInputBorder(
156 | borderSide: BorderSide.none,
157 | borderRadius: BorderRadius.all(Radius.circular(18)),
158 | ),
159 | ),
160 | ),
161 | const SizedBox(height: 70),
162 | MainButton(
163 | text: 'Sign Up',
164 | onTap: () async {
165 | if (_formKey.currentState!.validate()) {
166 | await authService.createUserWithEmailAndPassword(
167 | _nameController.text,
168 | _emailController.text,
169 | _passwordController.text);
170 | Navigator.pop(context);
171 | }
172 | },
173 | ),
174 | Padding(
175 | padding: const EdgeInsets.only(top: 20),
176 | child: Row(
177 | mainAxisAlignment: MainAxisAlignment.center,
178 | children: [
179 | Text(
180 | "Already have an account? ",
181 | style: GoogleFonts.poppins(
182 | color: ThemeColor.black,
183 | fontSize: FontSize.medium,
184 | fontWeight: FontWeight.w600,
185 | ),
186 | ),
187 | GestureDetector(
188 | onTap: () => Navigator.pop(context),
189 | child: Text(
190 | "Sign In",
191 | style: GoogleFonts.poppins(
192 | color: ThemeColor.primary,
193 | fontSize: FontSize.medium,
194 | fontWeight: FontWeight.w600,
195 | ),
196 | ),
197 | ),
198 | ],
199 | ),
200 | )
201 | ],
202 | ),
203 | ),
204 | ],
205 | ),
206 | ),
207 | ),
208 | ),
209 | );
210 | }
211 | }
212 |
--------------------------------------------------------------------------------
/lib/screens/start_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_fonts/google_fonts.dart';
4 | import 'package:imin/models/font_size.dart';
5 | import 'package:imin/models/main_button.dart';
6 | import 'package:imin/services/wrapper.dart';
7 |
8 | class StartPage extends StatefulWidget {
9 | const StartPage({Key? key}) : super(key: key);
10 |
11 | @override
12 | _StartPageState createState() => _StartPageState();
13 | }
14 |
15 | class _StartPageState extends State {
16 | @override
17 | Widget build(BuildContext context) {
18 | return Scaffold(
19 | backgroundColor: Colors.black,
20 | body: Stack(
21 | children: [
22 | Container(
23 | height: MediaQuery.of(context).size.height,
24 | decoration: const BoxDecoration(
25 | gradient: LinearGradient(
26 | end: Alignment.bottomCenter,
27 | colors: [Color(0xFFD9AFD9), Color(0xFF97D9E1)],
28 | ),
29 | ),
30 | ),
31 | const Center(
32 | child: Image(
33 | image: AssetImage('assets/images/illustration2.png'),
34 | height: 250,
35 | fit: BoxFit.fitHeight,
36 | ),
37 | ),
38 | SafeArea(
39 | child: Padding(
40 | padding: const EdgeInsets.all(32.0),
41 | child: Column(
42 | children: [
43 | Align(
44 | alignment: Alignment.topLeft,
45 | child: Text(
46 | 'iMiN',
47 | style: GoogleFonts.poppins(
48 | color: const Color(0xFF063166),
49 | fontSize: 50,
50 | fontWeight: FontWeight.w600,
51 | ),
52 | ),
53 | ),
54 | const Spacer(),
55 | Text(
56 | 'Created by Sivanandh',
57 | textAlign: TextAlign.center,
58 | style: GoogleFonts.poppins(
59 | color: const Color(0xFF063166),
60 | fontSize: FontSize.medium,
61 | ),
62 | ),
63 | Padding(
64 | padding: const EdgeInsets.only(top: 25),
65 | child: MainButton(
66 | backgroundColor: const Color(0xFF063166),
67 | onTap: () {
68 | Navigator.pushReplacement(
69 | context,
70 | CupertinoPageRoute(
71 | builder: (context) => Wrapper(),
72 | ),
73 | result: false,
74 | );
75 | },
76 | text: 'Get Started',
77 | ),
78 | ),
79 | ],
80 | ),
81 | ),
82 | ),
83 | ],
84 | ),
85 | );
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/lib/services/auth_service.dart:
--------------------------------------------------------------------------------
1 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
2 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
3 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
4 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
5 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
6 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
7 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
8 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
9 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
10 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
11 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
12 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
13 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
14 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
15 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
16 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
17 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
18 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
19 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
20 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
21 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
22 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
23 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
24 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
25 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
26 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
27 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
28 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
29 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
30 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
31 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
32 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
33 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
34 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
35 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
36 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
37 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
38 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
39 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
40 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
41 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
42 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
43 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
44 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
45 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
46 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
47 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
48 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
49 |
--------------------------------------------------------------------------------
/lib/services/wrapper.dart:
--------------------------------------------------------------------------------
1 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
2 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
3 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
4 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
5 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
6 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
7 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
8 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
9 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
10 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
11 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
12 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
13 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
14 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
15 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
16 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
17 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
18 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
19 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
20 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
21 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
22 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
23 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
24 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
25 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
26 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
27 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
28 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
29 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
30 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
31 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
32 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
33 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
34 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
35 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
36 | THIS FILE DELETED, IF YOU WANT THIS PROJECT THEN CONTACT : sivanandhpp@gmail.com
37 |
--------------------------------------------------------------------------------
/lib/user/display_classes.dart:
--------------------------------------------------------------------------------
1 | import 'package:dialogs/dialogs/message_dialog.dart';
2 | import 'package:firebase_database/ui/firebase_animated_list.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:imin/main.dart';
5 | import 'package:imin/models/colors.dart';
6 | import 'package:imin/user/give_attendance.dart';
7 | import 'package:line_icons/line_icons.dart';
8 | import 'package:imin/models/globals.dart' as globals;
9 |
10 | class DisplayClassS extends StatefulWidget {
11 | const DisplayClassS({Key? key}) : super(key: key);
12 |
13 | @override
14 | _DisplayClassSState createState() => _DisplayClassSState();
15 | }
16 |
17 | class _DisplayClassSState extends State {
18 | getDate() {
19 | final dateToday = DateTime.now();
20 | String dateForDB =
21 | "class/timetable/${dateToday.year}/${dateToday.month}/${dateToday.day}/";
22 | final database = dbReference.child(dateForDB);
23 |
24 | return database;
25 | }
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | body: SafeArea(
31 | child: SingleChildScrollView(
32 | child: Padding(
33 | padding: const EdgeInsets.all(30),
34 | child: Column(
35 | crossAxisAlignment: CrossAxisAlignment.start,
36 | children: [
37 | Row(
38 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
39 | children: [
40 | Column(
41 | crossAxisAlignment: CrossAxisAlignment.start,
42 | children: const [
43 | Text(
44 | "Today's",
45 | style: TextStyle(fontSize: 14, color: Colors.black),
46 | ),
47 | SizedBox(
48 | height: 5,
49 | ),
50 | Text(
51 | 'Classes',
52 | style: TextStyle(
53 | fontSize: 25,
54 | fontWeight: FontWeight.bold,
55 | color: Colors.black),
56 | ),
57 | ],
58 | ),
59 | GestureDetector(
60 | onTap: () async {
61 | Navigator.pop(context);
62 | },
63 | child: Container(
64 | width: 50,
65 | height: 50,
66 | decoration: BoxDecoration(
67 | color: Colors.black.withOpacity(0.03),
68 | borderRadius: BorderRadius.circular(12)),
69 | child: const Center(
70 | child: Icon(LineIcons.arrowLeft),
71 | ),
72 | ),
73 | )
74 | ],
75 | ),
76 | const SizedBox(
77 | height: 30,
78 | ),
79 |
80 |
81 | FirebaseAnimatedList(
82 | physics: const NeverScrollableScrollPhysics(),
83 | query: getDate(),
84 | shrinkWrap: true,
85 | defaultChild:
86 | const Center(child: CircularProgressIndicator()),
87 | itemBuilder: (context, snapshot, animation, index) {
88 |
89 | String classMode = 'Online';
90 | String classModeDB =
91 | (snapshot.child("mode").value).toString();
92 | if (classModeDB == 'true') {
93 | classMode = 'Offline';
94 | }
95 |
96 | return Column(
97 | children: [
98 | const SizedBox(
99 | height: 15,
100 | ),
101 | Container(
102 | width: double.infinity,
103 | height: 125,
104 | decoration: BoxDecoration(
105 | boxShadow: const [
106 | BoxShadow(
107 | color: ThemeColor.shadow,
108 | blurRadius: 100,
109 | spreadRadius: 10,
110 | offset: Offset(0, 60)),
111 | ],
112 | borderRadius: BorderRadius.circular(15),
113 | color: ThemeColor.white,
114 | ),
115 | child: Column(
116 | crossAxisAlignment: CrossAxisAlignment.start,
117 | children: [
118 | Container(
119 | height: 50,
120 | width: double.infinity,
121 | decoration: const BoxDecoration(
122 | borderRadius: BorderRadius.only(
123 | topLeft: Radius.circular(15),
124 | topRight: Radius.circular(15)),
125 | color: ThemeColor.primary,
126 | ),
127 | child: Row(
128 | mainAxisAlignment:
129 | MainAxisAlignment.spaceBetween,
130 | children: [
131 | Row(
132 | children: [
133 | const SizedBox(
134 | width: 25,
135 | ),
136 | const Icon(
137 | LineIcons.clock,
138 | color: ThemeColor.white,
139 | ),
140 | const SizedBox(
141 | width: 10,
142 | ),
143 | Text(
144 | snapshot
145 | .child("time")
146 | .value
147 | .toString(),
148 | style: const TextStyle(
149 | color: ThemeColor.white,
150 | fontWeight: FontWeight.bold),
151 | ),
152 | ],
153 | ),
154 | Row(
155 | children: const [
156 | Text(
157 | "Lecture",
158 | style: TextStyle(
159 | color: ThemeColor.lightGrey,
160 | fontWeight: FontWeight.bold),
161 | ),
162 | SizedBox(
163 | width: 25,
164 | ),
165 | ],
166 | ),
167 | ],
168 | ),
169 | ),
170 | const SizedBox(
171 | height: 10,
172 | ),
173 | Padding(
174 | padding:
175 | const EdgeInsets.only(left: 25, right: 25),
176 | child: Row(
177 | mainAxisAlignment:
178 | MainAxisAlignment.spaceBetween,
179 | children: [
180 | Column(
181 | crossAxisAlignment:
182 | CrossAxisAlignment.start,
183 | children: [
184 | Text(
185 | "Subject: ${snapshot.child("subject").value.toString()}",
186 | style: const TextStyle(
187 | fontSize: 20,
188 | fontWeight: FontWeight.bold),
189 | ),
190 | const SizedBox(
191 | height: 5,
192 | ),
193 | Text(
194 | "Class mode: $classMode",
195 | style: const TextStyle(fontSize: 15),
196 | ),
197 | ],
198 | ),
199 | InkWell(
200 | onTap: () {
201 |
202 | globals.selSubforAttendance = snapshot
203 | .child("subject")
204 | .value
205 | .toString();
206 | globals.timeOfClass = snapshot
207 | .child("time")
208 | .value
209 | .toString();
210 | globals.classMode = classMode;
211 | globals.streamStarted = false;
212 | var islistening =
213 | snapshot.child("islistening").value;
214 | var isnottaken =
215 | snapshot.child("isnottaken").value;
216 | if (islistening == true&&isnottaken==true) {
217 | Navigator.push(
218 | context,
219 | MaterialPageRoute(
220 | builder: (context) =>
221 | const GiveAttendance()),
222 | );
223 | } else {
224 | MessageDialog messageDialog =
225 | MessageDialog(
226 | dialogBackgroundColor: Colors.white,
227 | buttonOkColor: ThemeColor.primary,
228 | title: 'Can\'t put attendance!',
229 | titleColor: Colors.black,
230 | message:
231 | 'You dont have permissing to put attendance or its already taken. \n Try contacting your teacher.',
232 | messageColor: Colors.black,
233 | buttonOkText: 'Ok',
234 | dialogRadius: 30.0,
235 | buttonRadius: 15.0,
236 | );
237 | messageDialog.show(context,
238 | barrierColor: Colors.white);
239 | }
240 | },
241 | child: Container(
242 | width: 70,
243 | height: 35,
244 | decoration: BoxDecoration(
245 | color: ThemeColor.primary,
246 |
247 | borderRadius:
248 | BorderRadius.circular(20)),
249 | child: const Center(
250 | child: Icon(LineIcons.arrowRight,
251 | color: Colors.white),
252 | ),
253 | ),
254 | )
255 | ],
256 | ),
257 | ),
258 | ],
259 | ),
260 | ),
261 | ],
262 | );
263 | },
264 | ),
265 | ],
266 | ),
267 | ),
268 | ),
269 | ),
270 | );
271 | }
272 | }
273 |
--------------------------------------------------------------------------------
/lib/user/give_attendance.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: unnecessary_string_interpolations, avoid_print
2 |
3 | import 'package:dialogs/dialogs/message_dialog.dart';
4 | import 'package:flutter/material.dart';
5 | import 'dart:async';
6 | import 'package:geolocator/geolocator.dart';
7 | import 'package:imin/main.dart';
8 | import 'package:imin/models/colors.dart';
9 | import 'package:imin/models/main_button.dart';
10 | import 'package:intl/intl.dart';
11 | import 'package:line_icons/line_icons.dart';
12 | // import 'package:location/location.dart' as loc;
13 | import 'package:imin/models/globals.dart' as globals;
14 |
15 | class GiveAttendance extends StatefulWidget {
16 | const GiveAttendance({Key? key}) : super(key: key);
17 |
18 | @override
19 | _GiveAttendanceState createState() => _GiveAttendanceState();
20 | }
21 |
22 | class _GiveAttendanceState extends State {
23 | //FOR DATE
24 | final dateToday = DateTime.now();
25 |
26 | getDate() {
27 | String formattedDate = DateFormat.yMMMMd('en_US').format(dateToday);
28 | return formattedDate;
29 | }
30 |
31 | String pickedTime = "HH:MM";
32 | String amORpm = 'AM';
33 | String hh = 'HH';
34 | String mm = 'MM';
35 |
36 | // var _time;
37 | TimeOfDay _time = const TimeOfDay(hour: 9, minute: 0);
38 | void onTimeChanged(TimeOfDay newTime) {
39 | setState(() {
40 | _time = newTime;
41 |
42 | hh = _time.hour.toString();
43 | int inthh = _time.hour.toInt();
44 | //To check AM or PM
45 | if (_time.hour.toInt() > 11) {
46 | amORpm = 'PM';
47 | }
48 | //To convert to 12 hr format
49 | if (_time.hour.toInt() > 12) {
50 | inthh = (_time.hour.toInt() - 12);
51 | hh = inthh.toString();
52 | }
53 | //To add 0 at the beginning if time is less than 9
54 | if (inthh <= 9) {
55 | hh = "0$inthh";
56 | }
57 |
58 | mm = _time.minute.toString();
59 | pickedTime = "$hh:00 - $amORpm";
60 | });
61 | }
62 | //DAT : UNTILL HERE
63 |
64 | double distanceBetweenInMeter = 0.0;
65 | var accordingToDistance = ThemeColor.black;
66 | bool allowAtt = false;
67 |
68 | StreamSubscription? _getPositionSubscription;
69 |
70 | LocationSettings locationOptions =
71 | const LocationSettings(accuracy: LocationAccuracy.high);
72 |
73 | _getLocation() {
74 | _getPositionSubscription =
75 | Geolocator.getPositionStream(locationSettings: locationOptions).listen(
76 | (Position position) {
77 | double distanceInMeters = Geolocator.distanceBetween(position.latitude,
78 | position.longitude, globals.latitude, globals.longitude);
79 | setState(() {
80 | distanceBetweenInMeter = distanceInMeters;
81 | });
82 | },
83 | );
84 | }
85 |
86 | @override
87 | void initState() {
88 | // _checklocationServices();
89 | _getLocation();
90 | super.initState();
91 | }
92 |
93 | @override
94 | void dispose() {
95 | _getPositionSubscription?.cancel();
96 | super.dispose();
97 | }
98 |
99 | @override
100 | Widget build(BuildContext context) {
101 |
102 | if (distanceBetweenInMeter < 25) {
103 | allowAtt = true;
104 | accordingToDistance = ThemeColor.primary;
105 | } else if (distanceBetweenInMeter < 50) {
106 | allowAtt = true;
107 | accordingToDistance = ThemeColor.greenForLoc;
108 | } else if (distanceBetweenInMeter < 100) {
109 | allowAtt = false;
110 | accordingToDistance = ThemeColor.orangeForLoc;
111 | } else if (distanceBetweenInMeter > 100) {
112 | allowAtt = false;
113 | accordingToDistance = ThemeColor.redForLoc;
114 | }
115 |
116 | return Scaffold(
117 | body: SafeArea(
118 | child: SingleChildScrollView(
119 | child: Padding(
120 | padding: const EdgeInsets.all(30.0),
121 | child: Column(
122 | crossAxisAlignment: CrossAxisAlignment.start,
123 | children: [
124 | Row(
125 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
126 | children: [
127 | Column(
128 | crossAxisAlignment: CrossAxisAlignment.start,
129 | children: const [
130 | Text(
131 | "Advanced",
132 | style: TextStyle(fontSize: 14, color: Colors.black),
133 | ),
134 | SizedBox(
135 | height: 5,
136 | ),
137 | Text(
138 | 'Attendance',
139 | style: TextStyle(
140 | fontSize: 25,
141 | fontWeight: FontWeight.bold,
142 | color: Colors.black),
143 | ),
144 | ],
145 | ),
146 | GestureDetector(
147 | onTap: () async {
148 | Navigator.pop(context);
149 | },
150 | child: Container(
151 | width: 50,
152 | height: 50,
153 | decoration: BoxDecoration(
154 | color: Colors.black.withOpacity(0.03),
155 | borderRadius: BorderRadius.circular(12)),
156 | child: const Center(
157 | child: Icon(LineIcons.arrowLeft),
158 | ),
159 | ),
160 | )
161 | ],
162 | ),
163 | const SizedBox(
164 | height: 30,
165 | ),
166 | Row(
167 | children: [
168 | const Text(
169 | "Fetching your location..",
170 | style: TextStyle(
171 | color: ThemeColor.primary,
172 | fontSize: 18,
173 | fontWeight: FontWeight.w800),
174 | ),
175 | const Spacer(),
176 | // ignore: sized_box_for_whitespace
177 | Container(
178 | height: 15,
179 | width: 15,
180 | child: const CircularProgressIndicator(
181 | color: ThemeColor.primary,
182 | ),
183 | ),
184 | ],
185 | ),
186 | const SizedBox(
187 | height: 20,
188 | ),
189 | Container(
190 | height: 60,
191 | width: double.infinity,
192 | decoration: BoxDecoration(
193 | boxShadow: const [
194 | BoxShadow(
195 | color: ThemeColor.shadow,
196 | blurRadius: 100,
197 | spreadRadius: 1,
198 | offset: Offset(0, 10)),
199 | ],
200 | color: ThemeColor.white,
201 | borderRadius: BorderRadius.circular(20)),
202 | child: Center(
203 | child: Text(
204 | "You are ${distanceBetweenInMeter.toStringAsFixed(2)} meter away from campus",
205 | style: TextStyle(
206 | color: accordingToDistance,
207 | fontSize: 15,
208 | fontWeight: FontWeight.w800),
209 | ),
210 | ),
211 | ),
212 | const SizedBox(
213 | height: 20,
214 | ),
215 | Container(
216 | width: double.infinity,
217 | height: 250,
218 | decoration: BoxDecoration(
219 | boxShadow: const [
220 | BoxShadow(
221 | color: ThemeColor.shadow,
222 | blurRadius: 100,
223 | spreadRadius: 10,
224 | offset: Offset(0, 60)),
225 | ],
226 | borderRadius: BorderRadius.circular(15),
227 | color: ThemeColor.white,
228 | ),
229 | child: Column(
230 | mainAxisAlignment: MainAxisAlignment.center,
231 | children: [
232 | Text(
233 | globals.selSubforAttendance,
234 | style: const TextStyle(
235 | color: ThemeColor.black,
236 | fontSize: 20,
237 | fontWeight: FontWeight.w800),
238 | ),
239 | const SizedBox(
240 | height: 10,
241 | ),
242 | Text(globals.classMode),
243 | Text(globals.timeOfClass),
244 | const SizedBox(
245 | height: 20,
246 | ),
247 | Padding(
248 | padding: const EdgeInsets.only(left: 30.0, right: 30.0),
249 | child: MainButton(
250 | backgroundColor: accordingToDistance,
251 | text: "SUBMIT",
252 | onTap: () {
253 | if (allowAtt) {
254 | String dateForDB =
255 | "${dateToday.year}/${dateToday.month}/${dateToday.day}/${globals.selSubforAttendance}";
256 |
257 | final classReferance = dbReference.child(
258 | 'class/timetable/$dateForDB/presentstudents');
259 | classReferance.update({
260 | "${globals.userID}": "${globals.userName}"
261 | }).then((value) => Navigator.pop(context));
262 | } else {
263 | MessageDialog messageDialog = MessageDialog(
264 | dialogBackgroundColor: Colors.white,
265 | buttonOkColor: ThemeColor.primary,
266 | title: 'Can\'t give you attendance',
267 | titleColor: Colors.black,
268 | message:
269 | 'You are ${distanceBetweenInMeter.toStringAsFixed(2)} away from campus! \n Do you think this a mistake contact: admin@imin.com',
270 | messageColor: Colors.black,
271 | buttonOkText: 'Ok',
272 | dialogRadius: 30.0,
273 | buttonRadius: 15.0,
274 | );
275 | messageDialog.show(context,
276 | barrierColor: Colors.white);
277 | }
278 | }),
279 | )
280 | ],
281 | ),
282 | ),
283 | ],
284 | ),
285 | ),
286 | ),
287 | ),
288 | );
289 | }
290 |
291 | // Future _checklocationServices() async {
292 | // bool serviceEnabled;
293 | // LocationPermission permission;
294 |
295 | // serviceEnabled = await Geolocator.isLocationServiceEnabled();
296 | // if (!serviceEnabled) {
297 | // loc.Location.instance.requestService;
298 | // print('Location services are disabled.');
299 | // }
300 |
301 | // permission = await Geolocator.checkPermission();
302 | // if (permission == LocationPermission.denied) {
303 | // permission = await Geolocator.requestPermission();
304 | // if (permission == LocationPermission.denied) {
305 | // print('Location permissions are denied');
306 | // }
307 | // }
308 |
309 | // if (permission == LocationPermission.deniedForever) {
310 | // // Permissions are denied forever, handle appropriately.
311 | // print(
312 | // 'Location permissions are permanently denied, we cannot request permissions.');
313 | // }
314 | // }
315 | }
316 |
--------------------------------------------------------------------------------
/lib/user/queries.dart:
--------------------------------------------------------------------------------
1 | import 'package:dialogs/dialogs/message_dialog.dart';
2 | import 'package:firebase_database/firebase_database.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:google_fonts/google_fonts.dart';
5 | import 'package:imin/main.dart';
6 | import 'package:imin/models/colors.dart';
7 | import 'package:imin/models/font_size.dart';
8 | import 'package:imin/models/main_button.dart';
9 | import 'package:line_icons/line_icons.dart';
10 | import 'package:imin/models/globals.dart' as globals;
11 |
12 | class AddQueries extends StatefulWidget {
13 | const AddQueries({Key? key}) : super(key: key);
14 |
15 | @override
16 | State createState() => _AddQueriesState();
17 | }
18 |
19 | class _AddQueriesState extends State {
20 | String dropdownValue = 'Select Query';
21 |
22 | String queryTypeFromDB = "No Query found";
23 | String querySubjectFromDB = "----";
24 | String queryFromDB = "You didnt send any query";
25 | String queryStatusFromDB = "null";
26 |
27 | //Queries
28 | List queries = [
29 | 'Leave Application',
30 | 'Attendance Query',
31 | 'Internal Mark Query',
32 | 'Class Timetable Query',
33 | 'Other Query'
34 | ];
35 |
36 | @override
37 | void initState() {
38 | getDataFromDB();
39 | super.initState();
40 | }
41 |
42 | getDataFromDB() async {
43 | DataSnapshot queries =
44 | await dbReference.child("class/queries/${globals.userID}").get();
45 |
46 | querySubjectFromDB = queries.child("Subject").value.toString();
47 | queryTypeFromDB = queries.child("QueryType").value.toString();
48 | queryStatusFromDB = queries.child("Status").value.toString();
49 | queryFromDB = queries.child("Query").value.toString();
50 |
51 | }
52 |
53 | final TextEditingController _queryController = TextEditingController();
54 |
55 | final TextEditingController _subjectController = TextEditingController();
56 |
57 | @override
58 | Widget build(BuildContext context) {
59 | return Scaffold(
60 | body: SafeArea(
61 | child: SingleChildScrollView(
62 | child: Padding(
63 | padding: const EdgeInsets.all(30),
64 | child: Column(
65 | crossAxisAlignment: CrossAxisAlignment.start,
66 | children: [
67 | Row(
68 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
69 | children: [
70 | Column(
71 | crossAxisAlignment: CrossAxisAlignment.start,
72 | children: const [
73 | Text(
74 | "BCA/5/B",
75 | style: TextStyle(fontSize: 14, color: Colors.black),
76 | ),
77 | SizedBox(
78 | height: 5,
79 | ),
80 | Text(
81 | "Queries",
82 | style: TextStyle(
83 | fontSize: 25,
84 | fontWeight: FontWeight.bold,
85 | color: Colors.black),
86 | ),
87 | ],
88 | ),
89 | GestureDetector(
90 | onTap: () async {
91 | Navigator.pop(context);
92 | },
93 | child: Container(
94 | width: 50,
95 | height: 50,
96 | decoration: BoxDecoration(
97 | color: Colors.black.withOpacity(0.03),
98 | borderRadius: BorderRadius.circular(12)),
99 | child: const Center(
100 | child: Icon(LineIcons.arrowLeft),
101 | ),
102 | ),
103 | )
104 | ],
105 | ),
106 | const SizedBox(
107 | height: 30,
108 | ),
109 | DecoratedBox(
110 | decoration: const ShapeDecoration(
111 | color: ThemeColor.primary,
112 | shape: RoundedRectangleBorder(
113 | borderRadius: BorderRadius.all(Radius.circular(15.0)),
114 | ),
115 | ),
116 | child: Padding(
117 | padding: const EdgeInsets.all(8.0),
118 | child: DropdownButton(
119 | isDense: true,
120 | borderRadius: BorderRadius.circular(30),
121 | hint: Text(
122 | dropdownValue,
123 | style: const TextStyle(
124 | color: ThemeColor.white,
125 | fontSize: 15,
126 | fontWeight: FontWeight.bold),
127 | ),
128 | items: queries
129 | .map(
130 | (e) => DropdownMenuItem(
131 | value: e,
132 | child: Center(
133 | child: Text(
134 | e,
135 | style: const TextStyle(
136 | color: ThemeColor.primary,
137 | fontSize: 15,
138 | fontWeight: FontWeight.bold),
139 | ),
140 | ),
141 | ),
142 | )
143 | .toList(),
144 | onChanged: (value) {
145 | setState(() {
146 | dropdownValue = value.toString();
147 | });
148 | },
149 | ),
150 | ),
151 | ),
152 | const SizedBox(
153 | height: 20,
154 | ),
155 | TextField(
156 | controller: _subjectController,
157 | cursorColor: ThemeColor.primary,
158 | decoration: InputDecoration(
159 | fillColor: ThemeColor.textFieldBgColor,
160 | filled: true,
161 | labelText: "Subject",
162 | hintText: "Subject in short words",
163 | hintStyle: GoogleFonts.poppins(
164 | color: ThemeColor.textFieldHintColor,
165 | fontSize: FontSize.medium,
166 | fontWeight: FontWeight.w400,
167 | ),
168 | border: const OutlineInputBorder(
169 | borderSide: BorderSide.none,
170 | borderRadius: BorderRadius.all(Radius.circular(18)),
171 | ),
172 | ),
173 | ),
174 | const SizedBox(
175 | height: 20,
176 | ),
177 | TextField(
178 | controller: _queryController,
179 | keyboardType: TextInputType.multiline,
180 | maxLines: null,
181 | cursorColor: ThemeColor.primary,
182 | decoration: InputDecoration(
183 | fillColor: ThemeColor.textFieldBgColor,
184 | labelText: "Query",
185 | filled: true,
186 | hintText: "Explain your Query",
187 | hintStyle: GoogleFonts.poppins(
188 | color: ThemeColor.textFieldHintColor,
189 | fontSize: FontSize.medium,
190 | fontWeight: FontWeight.w400,
191 | ),
192 | border: const OutlineInputBorder(
193 | borderSide: BorderSide.none,
194 | borderRadius: BorderRadius.all(Radius.circular(18)),
195 | ),
196 | ),
197 | ),
198 | const SizedBox(
199 | height: 20,
200 | ),
201 | MainButton(
202 | text: 'Submit',
203 | onTap: () {
204 | dbReference.child("class/queries/${globals.userID}").set({
205 | "Name": globals.userName,
206 | "QueryType": dropdownValue,
207 | "Subject": _subjectController.value.text,
208 | "Query": _queryController.value.text,
209 | "Status": "Pending"
210 | });
211 | Navigator.pop(context);
212 | },
213 | ),
214 | const SizedBox(
215 | height: 10,
216 | ),
217 | MainButton(
218 | text: "Submitted Query",
219 | backgroundColor: ThemeColor.black,
220 | onTap: () {
221 | MessageDialog messageDialog = MessageDialog(
222 | dialogBackgroundColor: Colors.white,
223 | buttonOkColor: ThemeColor.primary,
224 | title: queryTypeFromDB,
225 | titleColor: Colors.black,
226 | message:
227 | "Query Subject: $querySubjectFromDB \n \n $queryFromDB \n \n Query Status: $queryStatusFromDB",
228 | messageColor: Colors.black,
229 | buttonOkText: 'Back',
230 | dialogRadius: 30.0,
231 | buttonRadius: 15.0,
232 | );
233 | messageDialog.show(context, barrierColor: Colors.white);
234 | },
235 | )
236 | ],
237 | ),
238 | ),
239 | ),
240 | ),
241 | );
242 | }
243 | }
244 |
--------------------------------------------------------------------------------
/lib/user/subject_attendance.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:imin/models/colors.dart';
3 | import 'package:line_icons/line_icons.dart';
4 | import 'package:imin/models/globals.dart' as globals;
5 |
6 | class SubejctAttendance extends StatelessWidget {
7 | const SubejctAttendance({Key? key}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 |
13 | body: SafeArea(
14 | child: Padding(
15 | padding: const EdgeInsets.all(30),
16 | child: Column(
17 | children: [
18 | Row(
19 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
20 | children: [
21 | Column(
22 | crossAxisAlignment: CrossAxisAlignment.start,
23 | children: const [
24 | Text(
25 | "BCA/5/B",
26 | style: TextStyle(fontSize: 14, color: ThemeColor.black),
27 | ),
28 | SizedBox(
29 | height: 5,
30 | ),
31 | Text(
32 | 'Attendance',
33 | style: TextStyle(
34 | fontSize: 20,
35 | fontWeight: FontWeight.bold,
36 | color: ThemeColor.black),
37 | ),
38 | ],
39 | ),
40 | GestureDetector(
41 | onTap: () {
42 | Navigator.pop(context);
43 | },
44 | child: Container(
45 | width: 50,
46 | height: 50,
47 | decoration: BoxDecoration(
48 | color: Colors.black.withOpacity(0.03),
49 | borderRadius: BorderRadius.circular(12)),
50 | child: const Center(
51 | child: Icon(LineIcons.arrowLeft),
52 | ),
53 | ),
54 | )
55 | ],
56 | ),
57 | const SizedBox(
58 | height: 10,
59 | ),
60 | Expanded(
61 | child: ListView.builder(
62 | itemCount: 5,
63 | itemBuilder: (BuildContext context, int index) {
64 | return Column(
65 | children: [
66 | const SizedBox(
67 | height: 10,
68 | ),
69 | Container(
70 | height: 60,
71 | decoration: BoxDecoration(
72 | boxShadow: const [
73 | BoxShadow(
74 | color: ThemeColor.shadow,
75 | blurRadius: 100,
76 | spreadRadius: 1,
77 | offset: Offset(0, 10)),
78 | ],
79 | color: ThemeColor.white,
80 | borderRadius: BorderRadius.circular(20)),
81 | child: Padding(
82 | padding: const EdgeInsets.only(left: 10, top: 2),
83 | child: ListTile(
84 | trailing: Padding(
85 | padding: const EdgeInsets.only(right: 10),
86 | child: Text(
87 | "${globals.subjectsAttendance[index]}/${globals.subjectsTotalClass[index]}",
88 |
89 | style: const TextStyle(
90 | fontSize: 17,
91 | color: ThemeColor.black,
92 | fontWeight: FontWeight.w600),
93 | ),
94 | ),
95 | title: Text(
96 | "${index + 1}: ${globals.subjects[index]}",
97 | style: const TextStyle(
98 | fontSize: 17,
99 | color: ThemeColor.black,
100 | fontWeight: FontWeight.w600),
101 | ),
102 | ),
103 | ),
104 | ),
105 | ],
106 | );
107 | }),
108 | ),
109 | ],
110 | ),
111 | ),
112 | ),
113 | );
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/lib/user/view_ia_marks.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/ui/firebase_animated_list.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:imin/main.dart';
4 | import 'package:imin/models/colors.dart';
5 | import 'package:line_icons/line_icons.dart';
6 | import 'package:imin/models/globals.dart' as globals;
7 |
8 | class ViewIaMarks extends StatefulWidget {
9 | const ViewIaMarks({Key? key}) : super(key: key);
10 |
11 | @override
12 | _ViewIaMarksState createState() => _ViewIaMarksState();
13 | }
14 |
15 | class _ViewIaMarksState extends State {
16 | final database = dbReference.child("users/${globals.userID}/ia-marks");
17 | @override
18 | Widget build(BuildContext context) {
19 | return Scaffold(
20 | body: SafeArea(
21 | child: Padding(
22 | padding: const EdgeInsets.all(30),
23 | child: Column(
24 | children: [
25 | Row(
26 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
27 | children: [
28 | Column(
29 | crossAxisAlignment: CrossAxisAlignment.start,
30 | children: const [
31 | Text(
32 | "BCA/5/B",
33 | style: TextStyle(fontSize: 14, color: ThemeColor.black),
34 | ),
35 | SizedBox(
36 | height: 5,
37 | ),
38 | Text(
39 | 'IA Marks',
40 | style: TextStyle(
41 | fontSize: 20,
42 | fontWeight: FontWeight.bold,
43 | color: ThemeColor.black),
44 | ),
45 | ],
46 | ),
47 | GestureDetector(
48 | onTap: () {
49 | Navigator.pop(context);
50 | },
51 | child: Container(
52 | width: 50,
53 | height: 50,
54 | decoration: BoxDecoration(
55 | color: Colors.black.withOpacity(0.03),
56 | borderRadius: BorderRadius.circular(12)),
57 | child: const Center(
58 | child: Icon(LineIcons.arrowLeft),
59 | ),
60 | ),
61 | )
62 | ],
63 | ),
64 | const SizedBox(
65 | height: 10,
66 | ),
67 | FirebaseAnimatedList(
68 | query: database,
69 | physics: const NeverScrollableScrollPhysics(),
70 | shrinkWrap: true,
71 | defaultChild: const Center(
72 | child: CircularProgressIndicator(),
73 | ),
74 | itemBuilder: (context, snapshot, animation, index) {
75 | return Column(
76 | children: [
77 | const SizedBox(
78 | height: 10,
79 | ),
80 | Container(
81 | height: 60,
82 | decoration: BoxDecoration(
83 | boxShadow: const [
84 | BoxShadow(
85 | color: ThemeColor.shadow,
86 | blurRadius: 100,
87 | spreadRadius: 1,
88 | offset: Offset(0, 10)),
89 | ],
90 | color: ThemeColor.white,
91 | borderRadius: BorderRadius.circular(20)),
92 | child: Padding(
93 | padding: const EdgeInsets.only(left: 10, top: 2),
94 | child: ListTile(
95 | trailing: Padding(
96 | padding: const EdgeInsets.only(right: 10),
97 | child: Text(
98 | "${snapshot.value}",
99 | style: const TextStyle(
100 | fontSize: 17,
101 | color: ThemeColor.black,
102 | fontWeight: FontWeight.w600),
103 | ),
104 | ),
105 | title: Text(
106 | "${index + 1} : ${snapshot.key}",
107 | style: const TextStyle(
108 | fontSize: 17,
109 | color: ThemeColor.black,
110 | fontWeight: FontWeight.w600),
111 | ),
112 | ),
113 | ),
114 | ),
115 | ],
116 | );
117 | },
118 | ),
119 | ],
120 | ),
121 | ),
122 | ),
123 | );
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.8.2"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.2.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.3.1"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0"
46 | crypto:
47 | dependency: transitive
48 | description:
49 | name: crypto
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "3.0.1"
53 | day_night_time_picker:
54 | dependency: "direct main"
55 | description:
56 | name: day_night_time_picker
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.0.5"
60 | dialogs:
61 | dependency: "direct main"
62 | description:
63 | name: dialogs
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "0.0.7"
67 | expandable:
68 | dependency: "direct main"
69 | description:
70 | name: expandable
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "5.0.1"
74 | fake_async:
75 | dependency: transitive
76 | description:
77 | name: fake_async
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.2.0"
81 | ffi:
82 | dependency: transitive
83 | description:
84 | name: ffi
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "1.1.2"
88 | file:
89 | dependency: transitive
90 | description:
91 | name: file
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "6.1.2"
95 | firebase_auth:
96 | dependency: "direct main"
97 | description:
98 | name: firebase_auth
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "3.3.5"
102 | firebase_auth_platform_interface:
103 | dependency: transitive
104 | description:
105 | name: firebase_auth_platform_interface
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "6.1.10"
109 | firebase_auth_web:
110 | dependency: transitive
111 | description:
112 | name: firebase_auth_web
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "3.3.6"
116 | firebase_core:
117 | dependency: "direct main"
118 | description:
119 | name: firebase_core
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "1.11.0"
123 | firebase_core_platform_interface:
124 | dependency: transitive
125 | description:
126 | name: firebase_core_platform_interface
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "4.2.3"
130 | firebase_core_web:
131 | dependency: transitive
132 | description:
133 | name: firebase_core_web
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "1.5.3"
137 | firebase_database:
138 | dependency: "direct main"
139 | description:
140 | name: firebase_database
141 | url: "https://pub.dartlang.org"
142 | source: hosted
143 | version: "9.0.5"
144 | firebase_database_platform_interface:
145 | dependency: transitive
146 | description:
147 | name: firebase_database_platform_interface
148 | url: "https://pub.dartlang.org"
149 | source: hosted
150 | version: "0.2.0+4"
151 | firebase_database_web:
152 | dependency: transitive
153 | description:
154 | name: firebase_database_web
155 | url: "https://pub.dartlang.org"
156 | source: hosted
157 | version: "0.2.0+4"
158 | flutter:
159 | dependency: "direct main"
160 | description: flutter
161 | source: sdk
162 | version: "0.0.0"
163 | flutter_lints:
164 | dependency: "direct dev"
165 | description:
166 | name: flutter_lints
167 | url: "https://pub.dartlang.org"
168 | source: hosted
169 | version: "1.0.4"
170 | flutter_test:
171 | dependency: "direct dev"
172 | description: flutter
173 | source: sdk
174 | version: "0.0.0"
175 | flutter_web_plugins:
176 | dependency: transitive
177 | description: flutter
178 | source: sdk
179 | version: "0.0.0"
180 | geolocator:
181 | dependency: "direct main"
182 | description:
183 | name: geolocator
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "8.0.5"
187 | geolocator_android:
188 | dependency: transitive
189 | description:
190 | name: geolocator_android
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "3.0.2"
194 | geolocator_apple:
195 | dependency: transitive
196 | description:
197 | name: geolocator_apple
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "2.0.1"
201 | geolocator_platform_interface:
202 | dependency: transitive
203 | description:
204 | name: geolocator_platform_interface
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "4.0.1"
208 | geolocator_web:
209 | dependency: transitive
210 | description:
211 | name: geolocator_web
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "2.1.4"
215 | google_fonts:
216 | dependency: "direct main"
217 | description:
218 | name: google_fonts
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "2.2.0"
222 | http:
223 | dependency: transitive
224 | description:
225 | name: http
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "0.13.4"
229 | http_parser:
230 | dependency: transitive
231 | description:
232 | name: http_parser
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "4.0.0"
236 | intl:
237 | dependency: "direct main"
238 | description:
239 | name: intl
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "0.17.0"
243 | js:
244 | dependency: transitive
245 | description:
246 | name: js
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "0.6.3"
250 | line_icons:
251 | dependency: "direct main"
252 | description:
253 | name: line_icons
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "2.0.1"
257 | lints:
258 | dependency: transitive
259 | description:
260 | name: lints
261 | url: "https://pub.dartlang.org"
262 | source: hosted
263 | version: "1.0.1"
264 | location:
265 | dependency: "direct main"
266 | description:
267 | name: location
268 | url: "https://pub.dartlang.org"
269 | source: hosted
270 | version: "4.3.0"
271 | location_platform_interface:
272 | dependency: transitive
273 | description:
274 | name: location_platform_interface
275 | url: "https://pub.dartlang.org"
276 | source: hosted
277 | version: "2.3.0"
278 | location_web:
279 | dependency: transitive
280 | description:
281 | name: location_web
282 | url: "https://pub.dartlang.org"
283 | source: hosted
284 | version: "3.1.1"
285 | matcher:
286 | dependency: transitive
287 | description:
288 | name: matcher
289 | url: "https://pub.dartlang.org"
290 | source: hosted
291 | version: "0.12.11"
292 | material_color_utilities:
293 | dependency: transitive
294 | description:
295 | name: material_color_utilities
296 | url: "https://pub.dartlang.org"
297 | source: hosted
298 | version: "0.1.3"
299 | meta:
300 | dependency: transitive
301 | description:
302 | name: meta
303 | url: "https://pub.dartlang.org"
304 | source: hosted
305 | version: "1.7.0"
306 | nested:
307 | dependency: transitive
308 | description:
309 | name: nested
310 | url: "https://pub.dartlang.org"
311 | source: hosted
312 | version: "1.0.0"
313 | path:
314 | dependency: transitive
315 | description:
316 | name: path
317 | url: "https://pub.dartlang.org"
318 | source: hosted
319 | version: "1.8.0"
320 | path_provider:
321 | dependency: transitive
322 | description:
323 | name: path_provider
324 | url: "https://pub.dartlang.org"
325 | source: hosted
326 | version: "2.0.8"
327 | path_provider_android:
328 | dependency: transitive
329 | description:
330 | name: path_provider_android
331 | url: "https://pub.dartlang.org"
332 | source: hosted
333 | version: "2.0.11"
334 | path_provider_ios:
335 | dependency: transitive
336 | description:
337 | name: path_provider_ios
338 | url: "https://pub.dartlang.org"
339 | source: hosted
340 | version: "2.0.7"
341 | path_provider_linux:
342 | dependency: transitive
343 | description:
344 | name: path_provider_linux
345 | url: "https://pub.dartlang.org"
346 | source: hosted
347 | version: "2.1.5"
348 | path_provider_macos:
349 | dependency: transitive
350 | description:
351 | name: path_provider_macos
352 | url: "https://pub.dartlang.org"
353 | source: hosted
354 | version: "2.0.5"
355 | path_provider_platform_interface:
356 | dependency: transitive
357 | description:
358 | name: path_provider_platform_interface
359 | url: "https://pub.dartlang.org"
360 | source: hosted
361 | version: "2.0.3"
362 | path_provider_windows:
363 | dependency: transitive
364 | description:
365 | name: path_provider_windows
366 | url: "https://pub.dartlang.org"
367 | source: hosted
368 | version: "2.0.5"
369 | platform:
370 | dependency: transitive
371 | description:
372 | name: platform
373 | url: "https://pub.dartlang.org"
374 | source: hosted
375 | version: "3.1.0"
376 | plugin_platform_interface:
377 | dependency: transitive
378 | description:
379 | name: plugin_platform_interface
380 | url: "https://pub.dartlang.org"
381 | source: hosted
382 | version: "2.1.2"
383 | process:
384 | dependency: transitive
385 | description:
386 | name: process
387 | url: "https://pub.dartlang.org"
388 | source: hosted
389 | version: "4.2.4"
390 | provider:
391 | dependency: "direct main"
392 | description:
393 | name: provider
394 | url: "https://pub.dartlang.org"
395 | source: hosted
396 | version: "6.0.2"
397 | shared_preferences:
398 | dependency: "direct main"
399 | description:
400 | name: shared_preferences
401 | url: "https://pub.dartlang.org"
402 | source: hosted
403 | version: "2.0.12"
404 | shared_preferences_android:
405 | dependency: transitive
406 | description:
407 | name: shared_preferences_android
408 | url: "https://pub.dartlang.org"
409 | source: hosted
410 | version: "2.0.10"
411 | shared_preferences_ios:
412 | dependency: transitive
413 | description:
414 | name: shared_preferences_ios
415 | url: "https://pub.dartlang.org"
416 | source: hosted
417 | version: "2.0.9"
418 | shared_preferences_linux:
419 | dependency: transitive
420 | description:
421 | name: shared_preferences_linux
422 | url: "https://pub.dartlang.org"
423 | source: hosted
424 | version: "2.0.4"
425 | shared_preferences_macos:
426 | dependency: transitive
427 | description:
428 | name: shared_preferences_macos
429 | url: "https://pub.dartlang.org"
430 | source: hosted
431 | version: "2.0.2"
432 | shared_preferences_platform_interface:
433 | dependency: transitive
434 | description:
435 | name: shared_preferences_platform_interface
436 | url: "https://pub.dartlang.org"
437 | source: hosted
438 | version: "2.0.0"
439 | shared_preferences_web:
440 | dependency: transitive
441 | description:
442 | name: shared_preferences_web
443 | url: "https://pub.dartlang.org"
444 | source: hosted
445 | version: "2.0.3"
446 | shared_preferences_windows:
447 | dependency: transitive
448 | description:
449 | name: shared_preferences_windows
450 | url: "https://pub.dartlang.org"
451 | source: hosted
452 | version: "2.0.4"
453 | sky_engine:
454 | dependency: transitive
455 | description: flutter
456 | source: sdk
457 | version: "0.0.99"
458 | source_span:
459 | dependency: transitive
460 | description:
461 | name: source_span
462 | url: "https://pub.dartlang.org"
463 | source: hosted
464 | version: "1.8.1"
465 | stack_trace:
466 | dependency: transitive
467 | description:
468 | name: stack_trace
469 | url: "https://pub.dartlang.org"
470 | source: hosted
471 | version: "1.10.0"
472 | stream_channel:
473 | dependency: transitive
474 | description:
475 | name: stream_channel
476 | url: "https://pub.dartlang.org"
477 | source: hosted
478 | version: "2.1.0"
479 | string_scanner:
480 | dependency: transitive
481 | description:
482 | name: string_scanner
483 | url: "https://pub.dartlang.org"
484 | source: hosted
485 | version: "1.1.0"
486 | term_glyph:
487 | dependency: transitive
488 | description:
489 | name: term_glyph
490 | url: "https://pub.dartlang.org"
491 | source: hosted
492 | version: "1.2.0"
493 | test_api:
494 | dependency: transitive
495 | description:
496 | name: test_api
497 | url: "https://pub.dartlang.org"
498 | source: hosted
499 | version: "0.4.8"
500 | typed_data:
501 | dependency: transitive
502 | description:
503 | name: typed_data
504 | url: "https://pub.dartlang.org"
505 | source: hosted
506 | version: "1.3.0"
507 | vector_math:
508 | dependency: transitive
509 | description:
510 | name: vector_math
511 | url: "https://pub.dartlang.org"
512 | source: hosted
513 | version: "2.1.1"
514 | win32:
515 | dependency: transitive
516 | description:
517 | name: win32
518 | url: "https://pub.dartlang.org"
519 | source: hosted
520 | version: "2.3.8"
521 | xdg_directories:
522 | dependency: transitive
523 | description:
524 | name: xdg_directories
525 | url: "https://pub.dartlang.org"
526 | source: hosted
527 | version: "0.2.0"
528 | sdks:
529 | dart: ">=2.15.1 <3.0.0"
530 | flutter: ">=2.5.0"
531 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: imin
2 | description: A new Flutter Attendance Management Application.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.15.1 <3.0.0"
22 |
23 | # Dependencies specify other packages that your package needs in order to work.
24 | # To automatically upgrade your package dependencies to the latest versions
25 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
26 | # dependencies can be manually updated by changing the version numbers below to
27 | # the latest version available on pub.dev. To see which dependencies have newer
28 | # versions available, run `flutter pub outdated`.
29 | dependencies:
30 | flutter:
31 | sdk: flutter
32 |
33 | firebase_core: ^1.11.0
34 | firebase_auth: ^3.3.5
35 | provider: ^6.0.2
36 | firebase_database: ^9.0.5
37 | geolocator: ^8.0.5
38 | line_icons: ^2.0.1
39 | google_fonts: ^2.1.0
40 | shared_preferences: ^2.0.12
41 | intl: ^0.17.0
42 | day_night_time_picker: ^1.0.5
43 | dialogs: ^0.0.7
44 | location: ^4.3.0
45 | expandable: ^5.0.1
46 |
47 | # The following adds the Cupertino Icons font to your application.
48 | # Use with the CupertinoIcons class for iOS style icons.
49 | # cupertino_icons: ^1.0.2
50 | # fl_chart: ^0.41.0
51 | # after_layout: ^1.1.0
52 |
53 | dev_dependencies:
54 | flutter_test:
55 | sdk: flutter
56 |
57 | # The "flutter_lints" package below contains a set of recommended lints to
58 | # encourage good coding practices. The lint set provided by the package is
59 | # activated in the `analysis_options.yaml` file located at the root of your
60 | # package. See that file for information about deactivating specific lint
61 | # rules and activating additional ones.
62 | flutter_lints: ^1.0.0
63 |
64 | # For information on the generic Dart part of this file, see the
65 | # following page: https://dart.dev/tools/pub/pubspec
66 |
67 | # The following section is specific to Flutter.
68 | flutter:
69 |
70 | # The following line ensures that the Material Icons font is
71 | # included with your application, so that you can use the icons in
72 | # the material Icons class.
73 | uses-material-design: true
74 |
75 | # To add assets to your application, add an assets section, like this:
76 | assets:
77 | - assets/images/
78 |
79 | # - images/a_dot_burr.jpeg
80 | # - images/a_dot_ham.jpeg
81 |
82 | # An image asset can refer to one or more resolution-specific "variants", see
83 | # https://flutter.dev/assets-and-images/#resolution-aware.
84 |
85 | # For details regarding adding assets from package dependencies, see
86 | # https://flutter.dev/assets-and-images/#from-packages
87 |
88 | # To add custom fonts to your application, add a fonts section here,
89 | # in this "flutter" section. Each entry in this list should have a
90 | # "family" key with the font family name, and a "fonts" key with a
91 | # list giving the asset and other descriptors for the font. For
92 | # example:
93 | # fonts:
94 | # - family: Schyler
95 | # fonts:
96 | # - asset: fonts/Schyler-Regular.ttf
97 | # - asset: fonts/Schyler-Italic.ttf
98 | # style: italic
99 | # - family: Trajan Pro
100 | # fonts:
101 | # - asset: fonts/TrajanPro.ttf
102 | # - asset: fonts/TrajanPro_Bold.ttf
103 | # weight: 700
104 | #
105 | # For details regarding fonts from package dependencies,
106 | # see https://flutter.dev/custom-fonts/#from-packages
107 |
--------------------------------------------------------------------------------
/screenshot/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/screenshot/1.png
--------------------------------------------------------------------------------
/screenshot/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/screenshot/2.png
--------------------------------------------------------------------------------
/screenshot/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/screenshot/3.png
--------------------------------------------------------------------------------
/screenshot/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/screenshot/4.png
--------------------------------------------------------------------------------
/screenshot/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/screenshot/5.png
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility 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:imin/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(const MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sivanandhpp/iMiN/307215c63bc945692de0dda4b9637be10ce5ba87/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | imin
33 |
34 |
35 |
36 |
39 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "imin",
3 | "short_name": "imin",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------