├── assests ├── android ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ ├── github │ │ │ │ │ └── uditkarode │ │ │ │ │ │ └── time_table │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── flutter │ │ │ │ │ └── plugins │ │ │ │ │ └── GeneratedPluginRegistrant.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── proguard-rules.pro │ └── build.gradle ├── local.properties ├── settings.gradle ├── build.gradle ├── gradlew.bat └── gradlew ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ ├── Generated.xcconfig │ ├── flutter_export_environment.sh │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── main.m │ ├── GeneratedPluginRegistrant.h │ ├── AppDelegate.m │ ├── GeneratedPluginRegistrant.m │ ├── Info.plist │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner.xcodeproj │ ├── project.xcworkspace │ └── contents.xcworkspacedata │ └── xcshareddata │ └── xcschemes │ └── Runner.xcscheme ├── fonts └── ProductSans.ttf ├── compileRelease ├── lib ├── teacher │ ├── schedule │ │ ├── models.dart │ │ ├── CurrentPeriod.dart │ │ ├── globals.dart │ │ ├── TodayText.dart │ │ ├── SizeConfig.dart │ │ ├── schedule.dart │ │ ├── ActiveTime.dart │ │ ├── RemainingPeriods.dart │ │ ├── timetable.dart │ │ └── timeutils.dart │ ├── salary.dart │ ├── teacher_zone.dart │ └── teacher_profile.dart ├── utils │ └── consts.dart ├── main.dart ├── student │ ├── result_detail.dart │ ├── result.dart │ ├── fees.dart │ ├── exam │ │ ├── resultpage.dart │ │ ├── exam.dart │ │ └── quizepage.dart │ ├── student_zone.dart │ ├── student_profile.dart │ └── academic_calendar.dart ├── splashscreen.dart ├── admin │ ├── teacher.dart │ ├── admin_zone.dart │ ├── student.dart │ ├── t_register.dart │ └── s_register.dart ├── Home_page.dart └── Login │ ├── forgotpassword.dart │ ├── login.dart │ └── signup.dart ├── pubspec.yaml └── pubspec.lock /assests: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /fonts/ProductSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/fonts/ProductSans.ttf -------------------------------------------------------------------------------- /compileRelease: -------------------------------------------------------------------------------- 1 | /home/udit/flutter_sdk/flutter/bin/flutter build apk --target-platform android-arm,android-arm64 --release --split-per-abi 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=C:\\Users\\DHRUVI PATEL\\AppData\\Local\\Android\\sdk 2 | flutter.sdk=C:\\flutter 3 | flutter.buildMode=debug 4 | flutter.versionName=1.0.0 5 | flutter.versionCode=1 -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvi410/Collage_Management_System/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/teacher/schedule/models.dart: -------------------------------------------------------------------------------- 1 | class Period { 2 | Period(name, length){ 3 | this.name = name; 4 | this.lengthInMinutes = length; 5 | } 6 | 7 | String name; 8 | int lengthInMinutes; 9 | 10 | DateTime startsAt; 11 | DateTime endsAt; 12 | } -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | ## Flutter wrapper 2 | -keep class io.flutter.app.** { *; } 3 | -keep class io.flutter.plugin.** { *; } 4 | -keep class io.flutter.util.** { *; } 5 | -keep class io.flutter.view.** { *; } 6 | -keep class io.flutter.** { *; } 7 | -keep class io.flutter.plugins.** { *; } 8 | -------------------------------------------------------------------------------- /lib/utils/consts.dart: -------------------------------------------------------------------------------- 1 | // TODO Implement this library. 2 | import 'package:flutter/material.dart'; 3 | 4 | final korange= const Color(0xFFFF9933); 5 | final korangelite = const Color(0xFFFFBE83); 6 | final kwhite = const Color(0xFFFFFFFF); 7 | final kblack = const Color(0xFF000000); 8 | final kgreyDark = Colors.grey.shade700; 9 | final kgreyFill = Colors.grey.shade100; 10 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/GeneratedPluginRegistrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GeneratedPluginRegistrant_h 8 | #define GeneratedPluginRegistrant_h 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface GeneratedPluginRegistrant : NSObject 15 | + (void)registerWithRegistry:(NSObject*)registry; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | #endif /* GeneratedPluginRegistrant_h */ 20 | -------------------------------------------------------------------------------- /lib/teacher/schedule/CurrentPeriod.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'globals.dart'; 3 | import 'timeutils.dart'; 4 | 5 | class CurrentPeriod extends StatefulWidget { 6 | CurrentState createState() => currentPeriodState; 7 | } 8 | 9 | class CurrentState extends State { 10 | void refresh() { 11 | setState(() {}); 12 | } 13 | @override 14 | Widget build(BuildContext context) { 15 | return Text(determinePeriod(), 16 | ); 17 | } 18 | } -------------------------------------------------------------------------------- /android/app/src/main/java/io/github/uditkarode/time_table/MainActivity.java: -------------------------------------------------------------------------------- 1 | package io.github.uditkarode.time_table; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /ios/Flutter/Generated.xcconfig: -------------------------------------------------------------------------------- 1 | // This is a generated file; do not edit or check into version control. 2 | FLUTTER_ROOT=C:\Users\Hetvi\flutter 3 | FLUTTER_APPLICATION_PATH=C:\Users\Hetvi\Desktop\FlutterTimeTable-master\FlutterTimeTable-master 4 | COCOAPODS_PARALLEL_CODE_SIGN=true 5 | FLUTTER_TARGET=lib\main.dart 6 | FLUTTER_BUILD_DIR=build 7 | SYMROOT=${SOURCE_ROOT}/../build\ios 8 | FLUTTER_BUILD_NAME=1.0.0 9 | FLUTTER_BUILD_NUMBER=1 10 | EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386 11 | DART_OBFUSCATION=false 12 | TRACK_WIDGET_CREATION=false 13 | TREE_SHAKE_ICONS=false 14 | PACKAGE_CONFIG=.packages 15 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /lib/teacher/schedule/globals.dart: -------------------------------------------------------------------------------- 1 | import 'models.dart'; 2 | import 'RemainingPeriods.dart'; 3 | import 'CurrentPeriod.dart'; 4 | import 'TodayText.dart'; 5 | 6 | List timeTable = []; 7 | DateTime now = DateTime.now(); 8 | bool displayTimer = false; 9 | String today; 10 | 11 | final DateTime collegeStart = 12 | DateTime(now.year, now.month, now.day, 10, 0, 0, 0, 0); 13 | DateTime collegeEnd = 14 | DateTime(now.year, now.month, now.day, 16, 40, 0, 0, 0); 15 | DateTime relativeEnding; 16 | 17 | RemainingPeriodsState remainingState = RemainingPeriodsState(); 18 | CurrentState currentPeriodState = CurrentState(); 19 | TodayState todayState = TodayState(); -------------------------------------------------------------------------------- /ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=C:\Users\Hetvi\flutter" 4 | export "FLUTTER_APPLICATION_PATH=C:\Users\Hetvi\Desktop\FlutterTimeTable-master\FlutterTimeTable-master" 5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" 6 | export "FLUTTER_TARGET=lib\main.dart" 7 | export "FLUTTER_BUILD_DIR=build" 8 | export "SYMROOT=${SOURCE_ROOT}/../build\ios" 9 | export "FLUTTER_BUILD_NAME=1.0.0" 10 | export "FLUTTER_BUILD_NUMBER=1" 11 | export "DART_OBFUSCATION=false" 12 | export "TRACK_WIDGET_CREATION=false" 13 | export "TREE_SHAKE_ICONS=false" 14 | export "PACKAGE_CONFIG=.packages" 15 | -------------------------------------------------------------------------------- /lib/teacher/schedule/TodayText.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'globals.dart'; 3 | import 'SizeConfig.dart'; 4 | 5 | class TodayText extends StatefulWidget { 6 | TodayState createState() => todayState; 7 | } 8 | 9 | class TodayState extends State { 10 | void refresh(String day) { 11 | setState(() { 12 | today = day; 13 | }); 14 | } 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Text( 19 | today, 20 | textAlign: TextAlign.center, 21 | style: TextStyle( 22 | color: Colors.blueAccent, 23 | fontSize: SizeConfig.safeBlockHorizontal * 10), 24 | ); 25 | } 26 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | // @dart=2.9 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'splashscreen.dart'; 5 | 6 | void main() { 7 | runApp(MyApp()); 8 | } 9 | 10 | class MyApp extends StatelessWidget { 11 | // This widget is the root of your application. 12 | @override 13 | void initState() { 14 | SystemChrome.setEnabledSystemUIOverlays([]); 15 | } 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return MaterialApp( 20 | debugShowCheckedModeBanner: false, 21 | title: 'Welcome', 22 | theme: ThemeData( 23 | primarySwatch: Colors.blue, 24 | ), 25 | home: SplashScreen(), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/teacher/schedule/SizeConfig.dart: -------------------------------------------------------------------------------- 1 | // TODO Implement this librar 2 | import 'package:flutter/widgets.dart'; 3 | 4 | class SizeConfig { 5 | static MediaQueryData _mediaQueryData; 6 | static double screenWidth; 7 | static double screenHeight; 8 | static double blockSizeHorizontal; 9 | static double blockSizeVertical; 10 | 11 | static double _safeAreaHorizontal; 12 | static double _safeAreaVertical; 13 | static double safeBlockHorizontal; 14 | static double safeBlockVertical; 15 | 16 | void init(BuildContext context) { 17 | _mediaQueryData = MediaQuery.of(context); 18 | screenWidth = _mediaQueryData.size.width; 19 | screenHeight = _mediaQueryData.size.height; 20 | blockSizeHorizontal = screenWidth / 100; 21 | blockSizeVertical = screenHeight / 100; 22 | 23 | _safeAreaHorizontal = _mediaQueryData.padding.left + 24 | _mediaQueryData.padding.right; 25 | _safeAreaVertical = _mediaQueryData.padding.top + 26 | _mediaQueryData.padding.bottom; 27 | safeBlockHorizontal = (screenWidth - 28 | _safeAreaHorizontal) / 100; 29 | safeBlockVertical = (screenHeight - 30 | _safeAreaVertical) / 100; 31 | } 32 | } -------------------------------------------------------------------------------- /lib/student/result_detail.dart: -------------------------------------------------------------------------------- 1 | // TODO Implement this library. 2 | import 'package:college_managment/student/result.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'result.dart'; 5 | 6 | class DetailsPage extends StatelessWidget { 7 | 8 | final int index; 9 | DetailsPage(this.index); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: PreferredSize( 15 | preferredSize: Size.fromHeight(50.0), 16 | child: AppBar( 17 | leading: InkWell( 18 | onTap: () { 19 | Navigator.push(context, MaterialPageRoute(builder: (_) { 20 | return Result(); 21 | })); 22 | }, 23 | child: Icon(Icons.arrow_back, size: 30,), 24 | ), 25 | title: Text( 26 | 'Result', 27 | style: TextStyle(fontSize: 20), 28 | ), 29 | centerTitle: true, 30 | elevation: 0, 31 | backgroundColor: Color(0xff002c51), 32 | ), 33 | ), 34 | body: Center( 35 | child: Text('Result Semester - $index'), 36 | ) 37 | 38 | ); 39 | } 40 | } -------------------------------------------------------------------------------- /lib/teacher/schedule/schedule.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | import 'timeutils.dart'; 4 | import 'globals.dart'; 5 | import 'timetable.dart'; 6 | 7 | main() { 8 | var currentDay = DateFormat('EEEE').format(DateTime.now()); 9 | if(currentDay == "Saturday") collegeEnd = DateTime(now.year, now.month, now.day, 14, 10, 0, 0, 0); 10 | 11 | 12 | if (DateTime.now().hour > 16) { 13 | switch (currentDay) { 14 | case "Monday": 15 | currentDay = "Tuesday"; 16 | break; 17 | 18 | case "Tuesday": 19 | currentDay = "Wednesday"; 20 | break; 21 | 22 | case "Wednesday": 23 | currentDay = "Thursday"; 24 | break; 25 | 26 | case "Thursday": 27 | currentDay = "Friday"; 28 | break; 29 | 30 | case "Friday": 31 | currentDay = "Saturday"; 32 | break; 33 | 34 | case "Saturday": 35 | currentDay = "Monday"; 36 | break; 37 | 38 | case "Sunday": 39 | currentDay = "Monday"; 40 | break; 41 | } 42 | } 43 | 44 | assignTimeTable(currentDay); 45 | today = currentDay; 46 | runApp( 47 | MaterialApp(home: Home(), theme: ThemeData(fontFamily: 'ProductSans'))); 48 | } -------------------------------------------------------------------------------- /lib/splashscreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:async'; 3 | import 'package:flutter/widgets.dart'; 4 | import 'Home_page.dart'; 5 | 6 | class SplashScreen extends StatefulWidget { 7 | @override 8 | _SplashScreenState createState() => _SplashScreenState(); 9 | } 10 | 11 | class _SplashScreenState extends State { 12 | @override 13 | void initState() { 14 | super.initState(); 15 | Timer(Duration(seconds: 5), () { 16 | Navigator.of(context) 17 | .pushReplacement(MaterialPageRoute(builder: (_) => HomePage())); 18 | }); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | backgroundColor: Colors.white, 25 | body: Center( 26 | child: Column( 27 | mainAxisAlignment: MainAxisAlignment.center, 28 | children: [ 29 | // logo here 30 | Image.asset( 31 | 'assets/logo1.png', 32 | height: 350, 33 | ), 34 | SizedBox( 35 | height: 10, 36 | ), 37 | Text( 38 | "Welcome", 39 | style: TextStyle(fontSize: 40,fontFamily: "calistoga" ,),textAlign: TextAlign.center 40 | ), 41 | SizedBox( 42 | height: 20, 43 | ), 44 | CircularProgressIndicator( 45 | valueColor: AlwaysStoppedAnimation(Colors.tealAccent), 46 | ) 47 | ], 48 | ), 49 | ), 50 | ); 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/Runner/GeneratedPluginRegistrant.m: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #import "GeneratedPluginRegistrant.h" 8 | 9 | #if __has_include() 10 | #import 11 | #else 12 | @import cloud_firestore; 13 | #endif 14 | 15 | #if __has_include() 16 | #import 17 | #else 18 | @import firebase_auth; 19 | #endif 20 | 21 | #if __has_include() 22 | #import 23 | #else 24 | @import firebase_core; 25 | #endif 26 | 27 | #if __has_include() 28 | #import 29 | #else 30 | @import fluttertoast; 31 | #endif 32 | 33 | @implementation GeneratedPluginRegistrant 34 | 35 | + (void)registerWithRegistry:(NSObject*)registry { 36 | [FLTFirebaseFirestorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseFirestorePlugin"]]; 37 | [FLTFirebaseAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAuthPlugin"]]; 38 | [FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]]; 39 | [FluttertoastPlugin registerWithRegistrar:[registry registrarForPlugin:@"FluttertoastPlugin"]]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins; 2 | 3 | import io.flutter.plugin.common.PluginRegistry; 4 | import io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin; 5 | import io.flutter.plugins.firebaseauth.FirebaseAuthPlugin; 6 | import io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin; 7 | import io.github.ponnamkarthik.toast.fluttertoast.FlutterToastPlugin; 8 | 9 | /** 10 | * Generated file. Do not edit. 11 | */ 12 | public final class GeneratedPluginRegistrant { 13 | public static void registerWith(PluginRegistry registry) { 14 | if (alreadyRegisteredWith(registry)) { 15 | return; 16 | } 17 | FlutterFirebaseFirestorePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin")); 18 | FirebaseAuthPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebaseauth.FirebaseAuthPlugin")); 19 | FlutterFirebaseCorePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin")); 20 | FlutterToastPlugin.registerWith(registry.registrarFor("io.github.ponnamkarthik.toast.fluttertoast.FlutterToastPlugin")); 21 | } 22 | 23 | private static boolean alreadyRegisteredWith(PluginRegistry registry) { 24 | final String key = GeneratedPluginRegistrant.class.getCanonicalName(); 25 | if (registry.hasPlugin(key)) { 26 | return true; 27 | } 28 | registry.registrarFor(key); 29 | return false; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | time_table 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/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 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /lib/student/result.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/student/student_zone.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'student_zone.dart'; 5 | import 'result_detail.dart' show DetailsPage; 6 | 7 | class Result extends StatelessWidget { 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return MaterialApp( 12 | home:Scaffold( 13 | appBar: PreferredSize( 14 | preferredSize: Size.fromHeight(50.0), 15 | child: AppBar( 16 | leading: InkWell( 17 | onTap: () { 18 | Navigator.push(context, MaterialPageRoute(builder: (_) { 19 | return StudentZone(); 20 | })); 21 | }, 22 | child: Icon(Icons.arrow_back, size: 30,), 23 | ), 24 | title: Text( 25 | 'Student Result', 26 | style: TextStyle(fontSize: 20), 27 | ), 28 | centerTitle: true, 29 | elevation: 0, 30 | backgroundColor: Color(0xff002c51), 31 | ), 32 | ), 33 | body: Scrollbar(child: _buildListView(context)), 34 | ) 35 | ); 36 | } 37 | 38 | ListView _buildListView(BuildContext context){ 39 | return ListView.builder( 40 | itemCount: 9, 41 | itemBuilder: (_, index){ 42 | return Card( 43 | child: ListTile( 44 | title: Text('Semester $index'), 45 | trailing: IconButton( 46 | icon: Icon(Icons.arrow_forward), 47 | onPressed: () { 48 | Navigator.push( 49 | context, 50 | MaterialPageRoute(builder: (context) => DetailsPage(index)) 51 | ); 52 | }, 53 | ), 54 | ), 55 | ); 56 | 57 | }, 58 | ); 59 | } 60 | } -------------------------------------------------------------------------------- /lib/teacher/schedule/ActiveTime.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'globals.dart'; 3 | import 'dart:async'; 4 | 5 | class ActiveTime extends StatefulWidget { 6 | @override 7 | _ActiveTimeState createState() => _ActiveTimeState(); 8 | } 9 | 10 | class _ActiveTimeState extends State { 11 | String _timeString; 12 | 13 | @override 14 | void initState() { 15 | if (displayTimer) { 16 | _timeString = 17 | '~' + _formatDateTime(relativeEnding.difference(DateTime.now())); 18 | Timer.periodic(Duration(seconds: 1), (Timer t) => _getTime()); 19 | } else { 20 | _timeString = " "; 21 | } 22 | super.initState(); 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Text( 28 | _timeString, 29 | ); 30 | } 31 | 32 | void _getTime() { 33 | DateTime now = DateTime.now(); 34 | final String formattedDateTime = 35 | _formatDateTime(relativeEnding.difference(now)); 36 | setState(() { 37 | _timeString = '~' + formattedDateTime; 38 | }); 39 | } 40 | 41 | String _formatDateTime(Duration duration) { 42 | int hours = 0, minutes = 0, seconds = duration.inSeconds; 43 | String hoursStr, minutesStr, secondsStr; 44 | 45 | if (seconds > 60) minutes = seconds ~/ 60; 46 | if (minutes > 60) hours = minutes ~/ 60; 47 | 48 | seconds = seconds - 60 * minutes; 49 | minutes = minutes - 60 * hours; 50 | 51 | if (seconds < 10) 52 | secondsStr = "0" + seconds.toString(); 53 | else 54 | secondsStr = seconds.toString(); 55 | if (minutes < 10) 56 | minutesStr = "0" + minutes.toString(); 57 | else 58 | minutesStr = minutes.toString(); 59 | if (hours < 10) 60 | hoursStr = "0" + hours.toString(); 61 | else 62 | hoursStr = hours.toString(); 63 | 64 | if (seconds <= 0 && minutes <= 0 && hours <= 0) currentPeriodState.refresh(); 65 | return hoursStr + ':' + minutesStr + ':' + secondsStr; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "io.github.uditkarode.time_table" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | signingConfig signingConfigs.debug 47 | shrinkResources false 48 | minifyEnabled false 49 | useProguard false 50 | 51 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 52 | } 53 | } 54 | } 55 | 56 | flutter { 57 | source '../..' 58 | } 59 | 60 | dependencies { 61 | testImplementation 'junit:junit:4.12' 62 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 63 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 64 | } 65 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: college_managment 2 | description: collage 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | image_slider: 23 | 24 | cupertino_icons: ^0.1.2 25 | intl: 0.16.0 26 | carousel_pro: ^1.0.0 27 | table_calendar: ^2.2.2 28 | firebase_core: ^1.3.0 29 | cloud_firestore: ^1.0.4 30 | fluttertoast: ^8.0.7 31 | firebase_auth: 32 | 33 | 34 | dev_dependencies: 35 | flutter_test: 36 | sdk: flutter 37 | 38 | flutter: 39 | uses-material-design: true 40 | fonts: 41 | - family: ProductSans 42 | fonts: 43 | - asset: fonts/ProductSans.ttf 44 | assets: 45 | - assets/academic_calendar.png 46 | - assets/academic_fees.png 47 | - assets/student_attendance.png 48 | - assets/student_profile.png 49 | - assets/student_result.png 50 | - assets/schedule.png 51 | - assets/salary.png 52 | - assets/student_attendance_faculty.png 53 | - assets/faculty_profile.png 54 | - assets/student.png 55 | - assets/faculty.png 56 | - assets/admin.png 57 | - assets/img1.jpg 58 | - assets/img2.jpg 59 | - assets/img3.jpg 60 | - assets/img4.jpg 61 | - assets/img5.jpg 62 | - assets/img6.jpg 63 | - assets/logo.png 64 | - assets/logo1.png 65 | - assets/register.png 66 | - assets/Exam.png 67 | -------------------------------------------------------------------------------- /lib/admin/teacher.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/admin/admin_zone.dart'; 2 | import 'admin_zone.dart'; 3 | import 'package:college_managment/utils/ZoneImage.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | 7 | class Teacher extends StatefulWidget { 8 | @override 9 | _TeacherState createState() => _TeacherState(); 10 | } 11 | 12 | class _TeacherState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: PreferredSize( 17 | preferredSize: Size.fromHeight(50), 18 | child: AppBar( 19 | leading: InkWell( 20 | onTap: () { 21 | Navigator.push(context, MaterialPageRoute(builder: (_) { 22 | return AdminZone(); 23 | })); 24 | }, 25 | child: Icon(Icons.arrow_back, size: 30,), 26 | ), 27 | backgroundColor: Color(0xfffe5722), 28 | centerTitle: true, 29 | title: Text( 30 | 'ADMIN ZONE', 31 | style: TextStyle(fontSize: 20), 32 | ), 33 | ), 34 | ), 35 | body: Column( 36 | children: [ 37 | Padding( 38 | padding: const EdgeInsets.only( 39 | left: 25.0, right: 15.0, bottom: 16.0), 40 | 41 | child: Column(children: [ 42 | SizedBox(height: 24), 43 | InkWell( 44 | child:Row( 45 | children: [ 46 | InkWell( 47 | child: ZoneImage("assets/register.png", "REGISTER"), 48 | onTap: () { 49 | } 50 | ), 51 | SizedBox(width: 14,), 52 | InkWell( 53 | child: ZoneImage("assets/salary.png", "SALARY"), 54 | onTap: () {} 55 | ) 56 | ], 57 | ), 58 | ), 59 | ]), 60 | ), 61 | ], 62 | ), 63 | ); 64 | } 65 | } 66 | 67 | 68 | -------------------------------------------------------------------------------- /lib/teacher/schedule/RemainingPeriods.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'globals.dart'; 3 | import 'SizeConfig.dart'; 4 | import 'package:intl/intl.dart'; 5 | 6 | class RemainingPeriods extends StatefulWidget { 7 | RemainingPeriodsState createState() => remainingState; 8 | } 9 | 10 | class RemainingPeriodsState extends State { 11 | void refresh() { 12 | setState(() {}); 13 | } 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | int actualCount = -1; 18 | return ListView.builder( 19 | itemCount: timeTable.length * 2, 20 | padding: EdgeInsets.all(2.5), 21 | itemBuilder: (context, i) { 22 | if (i.isOdd) 23 | return Divider(color: Colors.grey); 24 | else 25 | actualCount++; 26 | return ListTile( 27 | title: Row( 28 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 29 | children: [ 30 | Text(timeTable[actualCount].name, 31 | style: TextStyle( 32 | fontSize: SizeConfig.safeBlockHorizontal * 6.5, 33 | color: Colors.green)), 34 | RichText( 35 | textAlign: TextAlign.end, 36 | text: new TextSpan( 37 | style: new TextStyle( 38 | fontFamily: 'ProductSans', 39 | fontSize: SizeConfig.safeBlockHorizontal * 6.5, 40 | color: Colors.yellow, 41 | ), 42 | children: [ 43 | TextSpan( 44 | text: DateFormat("hh:mm") 45 | .format(timeTable[actualCount].startsAt)), 46 | TextSpan( 47 | text: '-', 48 | style: TextStyle(fontSize: 25, color: Colors.pinkAccent)), 49 | TextSpan( 50 | text: DateFormat("hh:mm a") 51 | .format(timeTable[actualCount].endsAt)), 52 | ], 53 | ), 54 | ) 55 | ], 56 | )); 57 | }, 58 | ); 59 | } 60 | } -------------------------------------------------------------------------------- /lib/teacher/salary.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'teacher_zone.dart'; 4 | 5 | class salary extends StatelessWidget{ 6 | 7 | List month = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; 8 | String title = 'Salaries'; 9 | 10 | ScrollController controller = ScrollController(); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | backgroundColor: Colors.white, 16 | appBar: PreferredSize( 17 | preferredSize: Size.fromHeight(50.0), 18 | child: AppBar( 19 | leading: InkWell( 20 | onTap: () { 21 | Navigator.push(context, MaterialPageRoute(builder: (_) { 22 | return TeacherZone(); 23 | })); 24 | }, 25 | child: Icon(Icons.arrow_back, size: 30,), 26 | ), 27 | title: Text(title, style: TextStyle(fontSize: 20),), 28 | centerTitle: true, 29 | elevation: 0, 30 | backgroundColor: Color(0xfff5435d), 31 | ), 32 | ), 33 | body: Scrollbar( 34 | child: ListView.builder( 35 | itemCount: month.length, 36 | itemBuilder: (context, index){ 37 | return ExpansionTile(title: Text(month[index],style: TextStyle(fontSize: 20,fontWeight: FontWeight.bold),), 38 | children: [ 39 | Padding(padding: EdgeInsets.all(10), 40 | child:Text(month[index], style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 41 | ), 42 | Padding(padding: EdgeInsets.all(10), 43 | child:Text("Total salary: 60,000", style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 44 | ), 45 | Padding(padding: EdgeInsets.all(10), 46 | child:Text("Received: ", style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 47 | ), 48 | Padding(padding: EdgeInsets.all(10), 49 | child:Text("Pending: " , style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 50 | ), 51 | ], 52 | ); 53 | }), 54 | ) 55 | ); 56 | } 57 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/student/fees.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'student_zone.dart'; 4 | 5 | // ignore: must_be_immutable 6 | class FeePage extends StatelessWidget{ 7 | 8 | List semesters = ["Semester 1", "Semester 2", "Semester 3", "Semester 4", "Semester 5", "Semester 6", "Semester 7", "Semester 8"]; 9 | String title = 'Student Fees'; 10 | 11 | ScrollController controller = ScrollController(); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | backgroundColor: Colors.grey[200], 17 | appBar: PreferredSize( 18 | preferredSize: Size.fromHeight(50.0), 19 | child: AppBar( 20 | leading: InkWell( 21 | onTap: () { 22 | Navigator.push(context, MaterialPageRoute(builder: (_) { 23 | return StudentZone(); 24 | })); 25 | }, 26 | child: Icon(Icons.arrow_back, size: 30,), 27 | ), 28 | title: Text(title, style: TextStyle(fontSize: 20),), 29 | centerTitle: true, 30 | elevation: 0, 31 | backgroundColor: Color(0xff002c51), 32 | ), 33 | ), 34 | body: Scrollbar( 35 | child: ListView.builder( 36 | itemCount: semesters.length, 37 | itemBuilder: (context, index){ 38 | return ExpansionTile(title: Text(semesters[index],style: TextStyle(fontSize: 20,fontWeight: FontWeight.bold),), 39 | children: [ 40 | Padding(padding: EdgeInsets.all(10), 41 | child:Text(semesters[index], style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 42 | ), 43 | Padding(padding: EdgeInsets.all(10), 44 | child:Text("Total Fees: 50,000", style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 45 | ), 46 | Padding(padding: EdgeInsets.all(10), 47 | child:Text("Received Fees: ", style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 48 | ), 49 | Padding(padding: EdgeInsets.all(10), 50 | child:Text("Pending Fees: " , style: TextStyle(fontSize: 18),textAlign: TextAlign.left), 51 | ), 52 | ], 53 | ); 54 | }), 55 | ) 56 | ); 57 | } 58 | } -------------------------------------------------------------------------------- /lib/teacher/schedule/timetable.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/teacher/teacher_zone.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'SizeConfig.dart'; 4 | import 'timeutils.dart'; 5 | import 'TodayText.dart'; 6 | import 'ActiveTime.dart'; 7 | import 'CurrentPeriod.dart'; 8 | import 'RemainingPeriods.dart'; 9 | 10 | class Home extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | SizeConfig().init(context); 14 | 15 | return Scaffold( 16 | appBar: PreferredSize( 17 | preferredSize: Size.fromHeight(50), 18 | child: AppBar( 19 | leading: InkWell( 20 | onTap: () { 21 | Navigator.push(context, MaterialPageRoute(builder: (_) { 22 | return TeacherZone(); 23 | })); 24 | }, 25 | child: Icon(Icons.arrow_back, size: 30,), 26 | ), 27 | backgroundColor: Color(0xfff5435d), 28 | centerTitle: true, 29 | title: Text( 30 | 'TIME TABLE', 31 | style: TextStyle(fontSize: 20), 32 | ), 33 | ), 34 | ), 35 | body: SafeArea( 36 | child: Padding( 37 | padding: EdgeInsets.only(top: 16), 38 | child: Column( 39 | children: [ 40 | Center( 41 | child: Column( 42 | children: [ 43 | GestureDetector( 44 | onTap: () { 45 | asyncDayChooser(context); 46 | }, 47 | child: TodayText()) 48 | ], 49 | ), 50 | ), 51 | Padding( 52 | padding: EdgeInsets.only(top: 13.5), 53 | child: Center( 54 | child: Column( 55 | children: [CurrentPeriod()], 56 | ), 57 | ), 58 | ), 59 | Padding( 60 | padding: EdgeInsets.only(top: 5), 61 | child: Center( 62 | child: Column( 63 | children: [ActiveTime()], 64 | ), 65 | ), 66 | ), 67 | Padding( 68 | padding: EdgeInsets.only(top: 10), 69 | child: Divider( 70 | color: Colors.grey, 71 | )), 72 | Expanded(child: RemainingPeriods()) 73 | ], 74 | ), 75 | ), 76 | )); 77 | } 78 | } -------------------------------------------------------------------------------- /lib/admin/admin_zone.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/Home_page.dart'; 2 | import 'package:college_managment/admin/s_register.dart'; 3 | import 'package:college_managment/admin/t_register.dart'; 4 | import 'package:college_managment/utils/ZoneImage.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/cupertino.dart'; 7 | import 'student.dart'; 8 | import 'Teacher.dart'; 9 | 10 | class AdminZone extends StatefulWidget { 11 | @override 12 | _AdminZoneState createState() => _AdminZoneState(); 13 | } 14 | 15 | class _AdminZoneState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: PreferredSize( 20 | preferredSize: Size.fromHeight(50), 21 | child: AppBar( 22 | leading: InkWell( 23 | onTap: () { 24 | Navigator.push(context, MaterialPageRoute(builder: (_) { 25 | return HomePage(); 26 | })); 27 | }, 28 | child: Icon(Icons.arrow_back, size: 30,), 29 | ), 30 | backgroundColor: Color(0xfffe5722), 31 | centerTitle: true, 32 | title: Text( 33 | 'ADMIN ZONE', 34 | style: TextStyle(fontSize: 20), 35 | ), 36 | ), 37 | ), 38 | body: Column( 39 | children: [ 40 | Padding( 41 | padding: const EdgeInsets.only( 42 | left: 25.0, right: 15.0, bottom: 16.0), 43 | 44 | child: Column(children: [ 45 | SizedBox(height: 24), 46 | InkWell( 47 | child:Row( 48 | children: [ 49 | InkWell( 50 | child: ZoneImage("assets/student.png", "STUDENT"), 51 | onTap: () { 52 | Navigator.push(context, MaterialPageRoute(builder: (_) { 53 | return SRegister(); 54 | })); 55 | } 56 | ), 57 | SizedBox(width: 14,), 58 | InkWell( 59 | child: ZoneImage("assets/faculty.png", "TEACHER"), 60 | onTap: () { 61 | Navigator.push(context, MaterialPageRoute(builder: (_) { 62 | return TRegister(); 63 | })); 64 | } 65 | ) 66 | ], 67 | ), 68 | ), 69 | ]), 70 | ), 71 | ], 72 | ), 73 | ); 74 | } 75 | } 76 | 77 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /lib/admin/student.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/admin/admin_zone.dart'; 2 | import 'admin_zone.dart'; 3 | import 'package:college_managment/utils/ZoneImage.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | 7 | class Student extends StatefulWidget { 8 | @override 9 | _StudentState createState() => _StudentState(); 10 | } 11 | 12 | class _StudentState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: PreferredSize( 17 | preferredSize: Size.fromHeight(50), 18 | child: AppBar( 19 | leading: InkWell( 20 | onTap: () { 21 | Navigator.push(context, MaterialPageRoute(builder: (_) { 22 | return AdminZone(); 23 | })); 24 | }, 25 | child: Icon(Icons.arrow_back, size: 30,), 26 | ), 27 | backgroundColor: Color(0xfffe5722), 28 | centerTitle: true, 29 | title: Text( 30 | 'ADMIN ZONE', 31 | style: TextStyle(fontSize: 20), 32 | ), 33 | ), 34 | ), 35 | body: Column( 36 | children: [ 37 | Padding( 38 | padding: const EdgeInsets.only( 39 | left: 25.0, right: 15.0, bottom: 16.0), 40 | 41 | child: Column(children: [ 42 | SizedBox(height: 24), 43 | InkWell( 44 | child:Row( 45 | children: [ 46 | InkWell( 47 | child: ZoneImage("assets/register.png", "REGISTER"), 48 | onTap: () { 49 | } 50 | ), 51 | SizedBox(width: 14,), 52 | InkWell( 53 | child: ZoneImage("assets/academic_fees.png", "FEES"), 54 | onTap: () {} 55 | ) 56 | ], 57 | ), 58 | ), 59 | 60 | SizedBox(height: 14,), 61 | SizedBox(width: 250,), 62 | Row( 63 | children: [ 64 | InkWell( 65 | child: ZoneImage("assets/student_result.png", "RESULT"), 66 | onTap: () { 67 | Navigator.push(context, MaterialPageRoute(builder: (_) { 68 | return AdminZone(); 69 | })); 70 | } 71 | ), 72 | ]), 73 | ], 74 | ), 75 | ), 76 | ], 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | 83 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/teacher/teacher_zone.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/Home_page.dart'; 2 | import 'package:college_managment/teacher/schedule/schedule.dart'; 3 | import 'teacher_profile.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:college_managment/utils/ZoneImage.dart'; 7 | import 'salary.dart'; 8 | 9 | class TeacherZone extends StatefulWidget { 10 | @override 11 | _TeacherZoneState createState() => _TeacherZoneState(); 12 | } 13 | 14 | class _TeacherZoneState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: PreferredSize( 19 | preferredSize: Size.fromHeight(50), 20 | child: AppBar( 21 | leading: InkWell( 22 | onTap: () { 23 | Navigator.push(context, MaterialPageRoute(builder: (_) { 24 | return HomePage(); 25 | })); 26 | }, 27 | child: Icon(Icons.arrow_back, size: 30,), 28 | ), 29 | backgroundColor: Color(0xfff5435d), 30 | centerTitle: true, 31 | title: Text( 32 | 'TEACHER ZONE', 33 | style: TextStyle(fontSize: 20), 34 | ), 35 | actions: [ 36 | IconButton( 37 | icon: Icon(Icons.logout,color: Colors.white,), 38 | 39 | ) 40 | ], 41 | ), 42 | ), 43 | body: Column( 44 | children: [ 45 | Padding( 46 | padding: const EdgeInsets.only( 47 | left: 25.0, right: 15.0, bottom: 16.0), 48 | child: Column(children: [ 49 | SizedBox(height: 24), 50 | InkWell( 51 | child:Row( 52 | children: [ 53 | InkWell( 54 | child: ZoneImage("assets/schedule.png", "Schedule"), 55 | onTap: () { 56 | Navigator.push(context, MaterialPageRoute(builder: (_) { 57 | return main(); 58 | })); 59 | } 60 | ), 61 | SizedBox(width: 14,), 62 | InkWell( 63 | child: ZoneImage("assets/student_attendance_faculty.png", "Attendance"), 64 | onTap: () {} 65 | ) 66 | ], 67 | ), 68 | ), 69 | SizedBox(height: 14,), 70 | Row( 71 | children: [ 72 | InkWell( 73 | child: ZoneImage("assets/salary.png", "Salary"), 74 | onTap: () { 75 | Navigator.push(context, MaterialPageRoute(builder: (_) { 76 | return salary(); 77 | })); 78 | } 79 | ), 80 | SizedBox(width: 14,), 81 | InkWell( 82 | child: ZoneImage("assets/faculty_profile.png", "Profile"), 83 | onTap: () { 84 | Navigator.push(context, MaterialPageRoute(builder: (_) { 85 | return TeacherProfile(); 86 | })); 87 | } 88 | ), 89 | ], 90 | ), 91 | ]), 92 | ), 93 | ], 94 | ), 95 | ); 96 | } 97 | } 98 | 99 | 100 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /lib/student/exam/resultpage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'exam.dart'; 3 | 4 | class resultpage extends StatefulWidget { 5 | int marks; 6 | resultpage({Key key , @required this.marks}) : super(key : key); 7 | @override 8 | _resultpageState createState() => _resultpageState(marks); 9 | } 10 | 11 | class _resultpageState extends State { 12 | 13 | List images = [ 14 | "images/success.png", 15 | "images/good.png", 16 | "images/bad.png", 17 | ]; 18 | 19 | String message; 20 | String image; 21 | 22 | @override 23 | void initState(){ 24 | if(marks < 20){ 25 | image = images[2]; 26 | message = "You Should Try Hard..\n" + "You Scored $marks"; 27 | }else if(marks < 35){ 28 | image = images[1]; 29 | message = "You Can Do Better..\n" + "You Scored $marks"; 30 | }else{ 31 | image = images[0]; 32 | message = "You Did Very Well..\n" + "You Scored $marks"; 33 | } 34 | super.initState(); 35 | } 36 | 37 | int marks; 38 | _resultpageState(this.marks); 39 | @override 40 | Widget build(BuildContext context) { 41 | return Scaffold( 42 | appBar: AppBar( 43 | backgroundColor: Color(0xff002c51), 44 | centerTitle: true, 45 | title: Text( 46 | 'RESULT', 47 | style: TextStyle(fontSize: 30), 48 | ), 49 | ), 50 | body: Column( 51 | children: [ 52 | Expanded( 53 | flex: 8, 54 | child: Material( 55 | elevation: 10.0, 56 | child: Container( 57 | child: Column( 58 | children: [ 59 | Material( 60 | child: Container( 61 | width: 300.0, 62 | height: 300.0, 63 | child: ClipRect( 64 | child: Image( 65 | image: AssetImage( 66 | image, 67 | ), 68 | ), 69 | ), 70 | ), 71 | ), 72 | Padding( 73 | padding: EdgeInsets.symmetric( 74 | vertical: 5.0, 75 | horizontal: 15.0, 76 | ), 77 | child: Center( 78 | child: Text( 79 | message, 80 | style: TextStyle( 81 | fontSize: 18.0, 82 | fontFamily: "Quando", 83 | ), 84 | ), 85 | ) 86 | ), 87 | ], 88 | ), 89 | ), 90 | ), 91 | ), 92 | Expanded( 93 | flex: 4, 94 | child: Row( 95 | mainAxisAlignment: MainAxisAlignment.center, 96 | children: [ 97 | OutlineButton( 98 | onPressed: (){ 99 | Navigator.of(context).pushReplacement(MaterialPageRoute( 100 | builder: (context) => exampage(), 101 | )); 102 | }, 103 | child: Text( 104 | "Continue", 105 | style: TextStyle( 106 | fontSize: 18.0, 107 | ), 108 | ), 109 | padding: EdgeInsets.symmetric( 110 | vertical: 10.0, 111 | horizontal: 25.0, 112 | ), 113 | borderSide: BorderSide(width: 3.0, color: Colors.indigo), 114 | splashColor: Colors.indigoAccent, 115 | ) 116 | ], 117 | ), 118 | ) 119 | ], 120 | ), 121 | ); 122 | } 123 | } -------------------------------------------------------------------------------- /lib/Home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:carousel_pro/carousel_pro.dart'; 2 | import 'package:college_managment/admin/admin_zone.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:college_managment/utils/ZoneImage.dart'; 6 | import 'package:college_managment/student/student_zone.dart'; 7 | import 'package:college_managment/teacher/teacher_zone.dart'; 8 | 9 | class HomePage extends StatefulWidget { 10 | @override 11 | _HomePageState createState() => _HomePageState(); 12 | } 13 | 14 | class _HomePageState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: PreferredSize( 19 | preferredSize: Size.fromHeight(50), 20 | child: AppBar( 21 | leading: InkWell( 22 | onTap: () { 23 | }, 24 | child: Icon(Icons.menu, size: 30,), 25 | ), 26 | backgroundColor: Color(0xff009788), 27 | centerTitle: true, 28 | title: Text( 29 | 'HOME', 30 | style: TextStyle(fontSize: 20), 31 | ), 32 | ), 33 | ), 34 | body: Column( 35 | children: [ 36 | Padding( 37 | padding: const EdgeInsets.only( 38 | left: 25.0, right: 15.0, bottom: 16.0), 39 | child: Column(children: [ 40 | SizedBox(height: 24,), 41 | SizedBox(height: 230.0, 42 | width:double.infinity, 43 | child:Carousel( 44 | dotSize: 4.0, 45 | dotSpacing :15.0, 46 | dotColor: Color(0xff009788), 47 | indicatorBgPadding:5.0, 48 | dotBgColor: Colors.transparent, 49 | dotVerticalPadding: 5.0, 50 | dotPosition: DotPosition.bottomCenter, 51 | images: 52 | [ 53 | Image.asset('assets/img1.jpg', fit: BoxFit.cover,), 54 | Image.asset('assets/img2.jpg', fit: BoxFit.cover,), 55 | Image.asset('assets/img3.jpg', fit: BoxFit.cover), 56 | Image.asset('assets/img4.jpg', fit: BoxFit.cover), 57 | Image.asset('assets/img5.jpg', fit: BoxFit.cover), 58 | Image.asset('assets/img6.jpg', fit: BoxFit.cover), 59 | ] 60 | ), 61 | ), 62 | InkWell( 63 | child:Row( 64 | children: [ 65 | InkWell( 66 | child: ZoneImage("assets/student.png", "STUDENT"), 67 | onTap: () { 68 | Navigator.push(context, MaterialPageRoute(builder: (_) { 69 | return StudentZone(); 70 | })); 71 | } 72 | ), 73 | SizedBox(width: 14,), 74 | InkWell( 75 | child: ZoneImage("assets/faculty.png", "TEACHER"), 76 | onTap: () { 77 | Navigator.push(context, MaterialPageRoute(builder: (_) { 78 | return TeacherZone(); 79 | })); 80 | } 81 | ) 82 | ], 83 | ), 84 | ), 85 | SizedBox(height: 14,), 86 | SizedBox(width: 250,), 87 | Row( 88 | children: [ 89 | InkWell( 90 | child: ZoneImage("assets/admin.png", "ADMIN"), 91 | onTap: () { 92 | Navigator.push(context, MaterialPageRoute(builder: (_) { 93 | return AdminZone(); 94 | })); 95 | } 96 | ), 97 | SizedBox(width: 14,), 98 | InkWell( 99 | child: ZoneImage("assets/logo.png", "ABOUT"), 100 | onTap: () {} 101 | ) 102 | ], 103 | ), 104 | ]), 105 | ), 106 | ], 107 | ), 108 | ); 109 | } 110 | } 111 | 112 | 113 | -------------------------------------------------------------------------------- /lib/student/student_zone.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/Home_page.dart'; 2 | import 'package:college_managment/utils/ZoneImage.dart'; 3 | import 'academic_calendar.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'student_profile.dart'; 7 | import 'fees.dart'; 8 | import 'result.dart'; 9 | 10 | class StudentZone extends StatefulWidget { 11 | @override 12 | _StudentZoneState createState() => _StudentZoneState(); 13 | } 14 | 15 | class _StudentZoneState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: PreferredSize( 20 | preferredSize: Size.fromHeight(50), 21 | child: AppBar( 22 | leading: InkWell( 23 | onTap: () { 24 | Navigator.push(context, MaterialPageRoute(builder: (_) { 25 | return HomePage(); 26 | })); 27 | }, 28 | child: Icon(Icons.arrow_back, size: 30,), 29 | ), 30 | backgroundColor: Color(0xff002c51), 31 | centerTitle: true, 32 | title: Text( 33 | 'STUDENT ZONE', 34 | style: TextStyle(fontSize: 20), 35 | ), 36 | actions: [ 37 | IconButton( 38 | icon: Icon(Icons.logout, color: Colors.white,), 39 | ) 40 | ], 41 | ), 42 | ), 43 | body: Column( 44 | children: [ 45 | Padding( 46 | padding: const EdgeInsets.only( 47 | left: 25.0, right: 15.0, bottom: 16.0), 48 | 49 | child: Column(children: [ 50 | SizedBox(height: 24), 51 | InkWell( 52 | child:Row( 53 | children: [ 54 | InkWell( 55 | child: ZoneImage("assets/academic_calendar.png", "Calendar"), 56 | onTap: () { 57 | Navigator.push(context, MaterialPageRoute(builder: (_) { 58 | return Calendar(); 59 | })); 60 | } 61 | ), 62 | SizedBox(width: 14,), 63 | InkWell( 64 | child: ZoneImage("assets/student_attendance.png", "Attendance"), 65 | onTap: () {} 66 | ) 67 | ], 68 | ), 69 | ), 70 | SizedBox(height: 14,), 71 | Row( 72 | children: [ 73 | InkWell( 74 | child: ZoneImage("assets/student_result.png", "Result"), 75 | onTap: () { 76 | Navigator.push(context, MaterialPageRoute(builder: (_) { 77 | return Result(); 78 | })); 79 | } 80 | ), 81 | SizedBox(width: 14,), 82 | InkWell( 83 | child: ZoneImage("assets/academic_fees.png", "Fees"), 84 | onTap: () { 85 | Navigator.push(context, MaterialPageRoute(builder: (_) { 86 | return FeePage(); 87 | })); 88 | } 89 | ), 90 | ], 91 | ), 92 | SizedBox(height: 14,), 93 | Row( 94 | children: [ 95 | InkWell( 96 | child: ZoneImage("assets/student_profile.png", "Profile"), 97 | onTap: () { 98 | Navigator.push(context, MaterialPageRoute(builder: (_) { 99 | return StudentProfile(); 100 | })); 101 | } 102 | ), 103 | SizedBox(width: 14,), 104 | InkWell( 105 | child: ZoneImage("assets/Exam.png", "Exam"), 106 | onTap: () { 107 | } 108 | ), 109 | ], 110 | ), 111 | ]), 112 | ), 113 | ], 114 | ), 115 | ); 116 | } 117 | } 118 | 119 | 120 | -------------------------------------------------------------------------------- /lib/student/exam/exam.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/student/exam/quizepage.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:college_managment/student/exam/quizepage.dart'; 5 | 6 | class exampage extends StatefulWidget { 7 | @override 8 | _exampageState createState() => _exampageState(); 9 | } 10 | 11 | class _exampageState extends State { 12 | 13 | List images = [ 14 | "images/py.png", 15 | "images/java.png", 16 | "images/js.png", 17 | "images/cpp.png", 18 | "images/linux.png", 19 | ]; 20 | 21 | List des = [ 22 | "Python is one of the most popular and fastest programming language since half a decade.\nIf You think you have learnt it.. \nJust test yourself !!", 23 | "Java has always been one of the best choices for Enterprise World. If you think you have learn the Language...\nJust Test Yourself !!", 24 | "Javascript is one of the most Popular programming language supporting the Web.\nIt has a wide range of Libraries making it Very Powerful !", 25 | "C++, being a statically typed programming language is very powerful and Fast.\nit's DMA feature makes it more useful. !", 26 | "Linux is a OPEN SOURCE Operating System which powers many Servers and Workstation.\nIt is also a top Priority in Developement Work !", 27 | ]; 28 | 29 | Widget customcard(String langname, String image, String des){ 30 | return Padding( 31 | padding: EdgeInsets.symmetric( 32 | vertical: 20.0, 33 | horizontal: 30.0, 34 | ), 35 | child: InkWell( 36 | onTap: (){ 37 | Navigator.of(context).pushReplacement(MaterialPageRoute( 38 | // in changelog 1 we will pass the langname name to ther other widget class 39 | // this name will be used to open a particular JSON file 40 | // for a particular language 41 | builder: (context) => getjson(langname), 42 | )); 43 | }, 44 | child: Material( 45 | color: Color(0xff002c51), 46 | elevation: 10.0, 47 | borderRadius: BorderRadius.circular(25.0), 48 | child: Container( 49 | child: Column( 50 | children: [ 51 | Padding( 52 | padding: EdgeInsets.symmetric( 53 | vertical: 5.0, 54 | ), 55 | child: Material( 56 | elevation: 5.0, 57 | borderRadius: BorderRadius.circular(100.0), 58 | child: Container( 59 | // changing from 200 to 150 as to look better 60 | height: 100.0, 61 | width: 100.0, 62 | child: ClipOval( 63 | child: Image( 64 | fit: BoxFit.cover, 65 | image: AssetImage( 66 | image, 67 | ), 68 | ), 69 | ), 70 | ), 71 | ), 72 | ), 73 | Center( 74 | child: Text( 75 | langname, 76 | style: TextStyle( 77 | fontSize: 20.0, 78 | color: Colors.white, 79 | fontFamily: "Quando", 80 | fontWeight: FontWeight.w700, 81 | ), 82 | ), 83 | ), 84 | Container( 85 | padding: EdgeInsets.all(20.0), 86 | child: Text( 87 | des, 88 | style: TextStyle( 89 | fontSize: 15.0, 90 | color: Colors.white, 91 | fontFamily: "Alike" 92 | ), 93 | maxLines: 5, 94 | textAlign: TextAlign.justify, 95 | ), 96 | 97 | ), 98 | ], 99 | ), 100 | ), 101 | ), 102 | ), 103 | ); 104 | } 105 | 106 | @override 107 | Widget build(BuildContext context) { 108 | SystemChrome.setPreferredOrientations([ 109 | DeviceOrientation.portraitDown, DeviceOrientation.portraitUp 110 | ]); 111 | return Scaffold( 112 | appBar: AppBar( 113 | backgroundColor: Color(0xff002c51), 114 | centerTitle: true, 115 | title: Text( 116 | 'EXAM', 117 | style: TextStyle(fontSize: 30), 118 | ), 119 | ), 120 | body: ListView( 121 | children: [ 122 | customcard("Python", images[0], des[0]), 123 | customcard("Java", images[1], des[1]), 124 | customcard("Javascript", images[2], des[2]), 125 | customcard("C++", images[3], des[3]), 126 | customcard("Linux", images[4], des[4]), 127 | ], 128 | ), 129 | ); 130 | } 131 | } -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /lib/teacher/teacher_profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'teacher_zone.dart'; 3 | 4 | class TeacherProfile extends StatefulWidget { 5 | 6 | @override 7 | _TeacherProfileState createState() => _TeacherProfileState(); 8 | } 9 | 10 | class _TeacherProfileState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: PreferredSize( 15 | preferredSize: Size.fromHeight(50), 16 | child: AppBar( 17 | leading: InkWell( 18 | onTap: () { 19 | Navigator.push(context, MaterialPageRoute(builder: (_) { 20 | return TeacherZone(); 21 | })); 22 | }, 23 | child: Icon(Icons.arrow_back, size: 30,), 24 | ), 25 | backgroundColor: Color(0xfff5435d), 26 | centerTitle: true, 27 | title: Text( 28 | 'FACULTY ZONE', 29 | style: TextStyle(fontSize: 20), 30 | ), 31 | ), 32 | ), 33 | body: SafeArea( 34 | child: Column( 35 | children: [ 36 | 37 | _getHeader(), 38 | SizedBox( 39 | height: 10, 40 | ), 41 | _profileName("Hetvi Patel"), 42 | SizedBox( 43 | height: 14, 44 | ), 45 | _heading("Personal Details"), 46 | SizedBox( 47 | height: 6, 48 | ), 49 | _detailsCard(), 50 | SizedBox( 51 | height: 6, 52 | ), 53 | SizedBox( 54 | height: 6, 55 | ), 56 | Spacer(), 57 | logoutButton() 58 | ], 59 | )), 60 | ); 61 | } 62 | 63 | Widget _getHeader() { 64 | return Row( 65 | mainAxisAlignment: MainAxisAlignment.center, 66 | children: [ 67 | Padding( 68 | padding: const EdgeInsets.all(10.0), 69 | child: Container( 70 | height: 100, 71 | width: 100, 72 | decoration: BoxDecoration( 73 | //borderRadius: BorderRadius.all(Radius.circular(10.0)), 74 | shape: BoxShape.circle, 75 | image: DecorationImage( 76 | fit: BoxFit.fill, 77 | image: NetworkImage( 78 | "http://assets.stickpng.com/images/585e4bf3cb11b227491c339a.png")) 79 | // color: Colors.orange[100], 80 | ), 81 | ), 82 | ), 83 | ], 84 | ); 85 | } 86 | 87 | Widget _profileName(String name) { 88 | return Container( 89 | width: MediaQuery.of(context).size.width * 0.80, //80% of width, 90 | child: Center( 91 | child: Text( 92 | name, 93 | style: TextStyle( 94 | color: Colors.black, fontSize: 24, fontWeight: FontWeight.w800), 95 | ), 96 | ), 97 | ); 98 | } 99 | 100 | Widget _heading(String heading) { 101 | return Container( 102 | width: MediaQuery.of(context).size.width * 0.80, //80% of width, 103 | child: Text( 104 | heading, 105 | style: TextStyle(fontSize: 16), 106 | ), 107 | ); 108 | } 109 | 110 | Widget _detailsCard() { 111 | return Padding( 112 | padding: const EdgeInsets.all(8.0), 113 | child: Card( 114 | elevation: 4, 115 | child: Column( 116 | children: [ 117 | //row for each details 118 | ListTile( 119 | leading: Icon(Icons.email), 120 | title: Text("hetvi@gmail.com"), 121 | ), 122 | Divider( 123 | height: 0.6, 124 | color: Colors.black87, 125 | ), 126 | ListTile( 127 | leading: Icon(Icons.phone), 128 | title: Text("1234567890"), 129 | ), 130 | Divider( 131 | height: 0.6, 132 | color: Colors.black87, 133 | ), 134 | ListTile( 135 | leading: Icon(Icons.note), 136 | title: Text("Faculty ID: FC111"), 137 | ), 138 | Divider( 139 | height: 0.6, 140 | color: Colors.black87, 141 | ), 142 | ListTile( 143 | leading: Icon(Icons.location_city), 144 | title: Text("Nadiad"), 145 | ), 146 | Divider( 147 | color: Colors.black87, 148 | height: 0.6, 149 | ), 150 | 151 | 152 | ], 153 | ), 154 | ), 155 | ); 156 | } 157 | 158 | // ignore: non_constant_identifier_names 159 | 160 | Widget logoutButton() { 161 | return InkWell( 162 | onTap: () {}, 163 | child: Container( 164 | color: Color(0xfff5435d), 165 | child: Padding( 166 | padding: const EdgeInsets.all(10.0), 167 | child: Row( 168 | mainAxisAlignment: MainAxisAlignment.center, 169 | children: [ 170 | Icon( 171 | Icons.logout, 172 | color: Colors.white, 173 | ), 174 | SizedBox(width: 10), 175 | Text( 176 | "Logout", 177 | style: TextStyle(color: Colors.white, fontSize: 18), 178 | ) 179 | ], 180 | ), 181 | )), 182 | ); 183 | } 184 | } -------------------------------------------------------------------------------- /lib/teacher/schedule/timeutils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'SizeConfig.dart'; 3 | import 'globals.dart'; 4 | import 'models.dart'; 5 | 6 | 7 | void assignTimeTable(String currentDay) { 8 | timeTable.clear(); 9 | switch (currentDay) { 10 | case "Monday": 11 | timeTable.add(Period("WCMC", 60)); 12 | timeTable.add(Period("DBMS", 60)); 13 | timeTable.add(Period("DM", 60)); 14 | timeTable.add(Period("Recess", 60)); 15 | timeTable.add(Period("ADA", 60)); 16 | timeTable.add(Period("OOPS Lab", 120)); 17 | break; 18 | 19 | case "Tuesday": 20 | timeTable.add(Period("DM", 60)); 21 | timeTable.add(Period("CSA", 60)); 22 | timeTable.add(Period("ADA", 60)); 23 | timeTable.add(Period("Recess", 60)); 24 | timeTable.add(Period("OOPS", 60)); 25 | timeTable.add(Period("CSI", 120)); 26 | break; 27 | 28 | case "Wednesday": 29 | timeTable.add(Period("OOPS", 60)); 30 | timeTable.add(Period("DM", 60)); 31 | timeTable.add(Period("DBMS", 60)); 32 | timeTable.add(Period("Rececss", 60)); 33 | timeTable.add(Period("CSA", 60)); 34 | timeTable.add(Period("Virtual Lab", 120)); 35 | break; 36 | 37 | case "Thursday": 38 | timeTable.add(Period("CSA", 60)); 39 | timeTable.add(Period("ADA", 60)); 40 | timeTable.add(Period("OOPS", 60)); 41 | timeTable.add(Period("Recess", 60)); 42 | timeTable.add(Period("DM", 60)); 43 | timeTable.add(Period("CSA/HW Lab", 120)); 44 | break; 45 | 46 | case "Friday": 47 | timeTable.add(Period("DBMS", 60)); 48 | timeTable.add(Period("ADA", 60)); 49 | timeTable.add(Period("CSA", 60)); 50 | timeTable.add(Period("Recess", 60)); 51 | timeTable.add(Period("DM", 60)); 52 | timeTable.add(Period("DBMS Lab", 120)); 53 | break; 54 | 55 | case "Saturday": 56 | timeTable.add(Period("ADA", 60)); 57 | timeTable.add(Period("DBMS", 60)); 58 | timeTable.add(Period("CSA", 60)); 59 | timeTable.add(Period("OOPS", 60)); 60 | break; 61 | } 62 | setupExactTimes(); 63 | } 64 | 65 | // ----------------------------------------------------------------------------- 66 | 67 | String determinePeriod() { 68 | DateTime now = DateTime.now(); 69 | if (now.compareTo(collegeStart) >= 0 && now.compareTo(collegeEnd) <= 0) { 70 | displayTimer = true; 71 | for (Period period in timeTable) { 72 | if (now.compareTo(period.startsAt) >= 0 && 73 | now.compareTo(period.endsAt) <= 0) { 74 | relativeEnding = period.endsAt; 75 | return period.name; 76 | } 77 | } 78 | } 79 | 80 | return ""; 81 | } 82 | 83 | void setupExactTimes() { 84 | DateTime tmpTime = collegeStart; 85 | for (Period period in timeTable) { 86 | period.startsAt = tmpTime; 87 | tmpTime = tmpTime.add(Duration(minutes: period.lengthInMinutes)); 88 | period.endsAt = tmpTime; 89 | } 90 | } 91 | 92 | // ----------------------------------------------------------------------------- 93 | 94 | Future asyncDayChooser(BuildContext context) async { 95 | return await showDialog( 96 | context: context, 97 | barrierDismissible: true, 98 | builder: (BuildContext context) { 99 | return SimpleDialog( 100 | title: Text('Choose day', 101 | style: TextStyle( 102 | fontSize: SizeConfig.safeBlockHorizontal * 7, 103 | fontWeight: FontWeight.bold)), 104 | children: [ 105 | SimpleDialogOption( 106 | onPressed: () { 107 | assignTimeTable('Monday'); 108 | todayState.refresh('Monday'); 109 | Navigator.pop(context); 110 | remainingState.refresh(); 111 | }, 112 | child: Text('Monday', 113 | style: TextStyle( 114 | fontSize: SizeConfig.safeBlockHorizontal * 5.5)), 115 | ), 116 | SimpleDialogOption( 117 | onPressed: () { 118 | assignTimeTable('Tuesday'); 119 | todayState.refresh('Tuesday'); 120 | Navigator.pop(context); 121 | remainingState.refresh(); 122 | }, 123 | child: Text('Tuesday', 124 | style: TextStyle( 125 | fontSize: SizeConfig.safeBlockHorizontal * 5.5)), 126 | ), 127 | SimpleDialogOption( 128 | onPressed: () { 129 | assignTimeTable('Wednesday'); 130 | todayState.refresh('Wednesday'); 131 | Navigator.pop(context); 132 | remainingState.refresh(); 133 | }, 134 | child: Text('Wednesday', 135 | style: TextStyle( 136 | fontSize: SizeConfig.safeBlockHorizontal * 5.5)), 137 | ), 138 | SimpleDialogOption( 139 | onPressed: () { 140 | assignTimeTable('Thursday'); 141 | todayState.refresh('Thursday'); 142 | Navigator.pop(context); 143 | remainingState.refresh(); 144 | }, 145 | child: Text('Thursday', 146 | style: TextStyle( 147 | fontSize: SizeConfig.safeBlockHorizontal * 5.5)), 148 | ), 149 | SimpleDialogOption( 150 | onPressed: () { 151 | assignTimeTable('Friday'); 152 | todayState.refresh('Friday'); 153 | Navigator.pop(context); 154 | remainingState.refresh(); 155 | }, 156 | child: Text('Friday', 157 | style: TextStyle( 158 | fontSize: SizeConfig.safeBlockHorizontal * 5.5)), 159 | ), 160 | SimpleDialogOption( 161 | onPressed: () { 162 | assignTimeTable('Saturday'); 163 | todayState.refresh('Saturday'); 164 | Navigator.pop(context); 165 | remainingState.refresh(); 166 | }, 167 | child: Text('Saturday', 168 | style: TextStyle( 169 | fontSize: SizeConfig.safeBlockHorizontal * 5.5))), 170 | ], 171 | ); 172 | }); 173 | } 174 | -------------------------------------------------------------------------------- /lib/student/student_profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:college_managment/student/student_zone.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class StudentProfile extends StatefulWidget { 5 | 6 | @override 7 | _StudentProfileState createState() => _StudentProfileState(); 8 | } 9 | 10 | class _StudentProfileState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: PreferredSize( 15 | preferredSize: Size.fromHeight(50), 16 | child: AppBar( 17 | leading: InkWell( 18 | onTap: () { 19 | Navigator.push(context, MaterialPageRoute(builder: (_) { 20 | return StudentZone(); 21 | })); 22 | }, 23 | child: Icon(Icons.arrow_back, size: 30,), 24 | ), 25 | backgroundColor: Color(0xff002c51), 26 | centerTitle: true, 27 | title: Text( 28 | 'STUDENT ZONE', 29 | style: TextStyle(fontSize: 20), 30 | ), 31 | ), 32 | ), 33 | body: SafeArea( 34 | child: Column( 35 | children: [ 36 | 37 | _getHeader(), 38 | SizedBox( 39 | height: 10, 40 | ), 41 | _profileName("Dhruvi Patel"), 42 | SizedBox( 43 | height: 14, 44 | ), 45 | _heading("Personal Details"), 46 | SizedBox( 47 | height: 6, 48 | ), 49 | _detailsCard(), 50 | SizedBox( 51 | height: 6, 52 | ), 53 | _heading("Counsellor Details"), 54 | SizedBox( 55 | height: 6, 56 | ), 57 | _counsellorCard(), 58 | Spacer(), 59 | logoutButton() 60 | ], 61 | )), 62 | ); 63 | } 64 | 65 | Widget _getHeader() { 66 | return Row( 67 | mainAxisAlignment: MainAxisAlignment.center, 68 | children: [ 69 | Padding( 70 | padding: const EdgeInsets.all(10.0), 71 | child: Container( 72 | height: 100, 73 | width: 100, 74 | decoration: BoxDecoration( 75 | //borderRadius: BorderRadius.all(Radius.circular(10.0)), 76 | shape: BoxShape.circle, 77 | image: DecorationImage( 78 | fit: BoxFit.fill, 79 | image: NetworkImage( 80 | "http://assets.stickpng.com/images/585e4bf3cb11b227491c339a.png")) 81 | // color: Colors.orange[100], 82 | ), 83 | ), 84 | ), 85 | ], 86 | ); 87 | } 88 | 89 | Widget _profileName(String name) { 90 | return Container( 91 | width: MediaQuery.of(context).size.width * 0.80, //80% of width, 92 | child: Center( 93 | child: Text( 94 | name, 95 | style: TextStyle( 96 | color: Colors.black, fontSize: 24, fontWeight: FontWeight.w800), 97 | ), 98 | ), 99 | ); 100 | } 101 | 102 | Widget _heading(String heading) { 103 | return Container( 104 | width: MediaQuery.of(context).size.width * 0.80, //80% of width, 105 | child: Text( 106 | heading, 107 | style: TextStyle(fontSize: 16), 108 | ), 109 | ); 110 | } 111 | 112 | Widget _detailsCard() { 113 | return Padding( 114 | padding: const EdgeInsets.all(8.0), 115 | child: Card( 116 | elevation: 4, 117 | child: Column( 118 | children: [ 119 | //row for each details 120 | ListTile( 121 | leading: Icon(Icons.email), 122 | title: Text("dhruvi@gmail.com"), 123 | ), 124 | Divider( 125 | height: 0.6, 126 | color: Colors.black87, 127 | ), 128 | ListTile( 129 | leading: Icon(Icons.phone), 130 | title: Text("9876543210"), 131 | ), 132 | Divider( 133 | height: 0.6, 134 | color: Colors.black87, 135 | ), 136 | ListTile( 137 | leading: Icon(Icons.note), 138 | title: Text("Student ID: 083"), 139 | ), 140 | Divider( 141 | height: 0.6, 142 | color: Colors.black87, 143 | ), 144 | ListTile( 145 | leading: Icon(Icons.location_city), 146 | title: Text("Ananad"), 147 | ), 148 | Divider( 149 | color: Colors.black87, 150 | height: 0.6, 151 | ), 152 | 153 | 154 | ], 155 | ), 156 | ), 157 | ); 158 | } 159 | 160 | // ignore: non_constant_identifier_names 161 | Widget _counsellorCard() { 162 | return Padding( 163 | padding: const EdgeInsets.all(8.0), 164 | child: Card( 165 | elevation: 4, 166 | child: Column( 167 | children: [ 168 | //row for each details 169 | ListTile( 170 | leading: Icon(Icons.topic), 171 | title: Text("Name: XYZ"), 172 | ), 173 | Divider( 174 | height: 0.6, 175 | color: Colors.black87, 176 | ), 177 | ListTile( 178 | leading: Icon(Icons.email), 179 | title: Text("faculty@gmail.com"), 180 | ), 181 | Divider( 182 | height: 0.6, 183 | color: Colors.black87, 184 | ), 185 | ListTile( 186 | leading: Icon(Icons.phone), 187 | title: Text("123456789"), 188 | ) 189 | ], 190 | ), 191 | ), 192 | ); 193 | } 194 | 195 | Widget logoutButton() { 196 | return InkWell( 197 | onTap: () {}, 198 | child: Container( 199 | color: Color(0xff002c51), 200 | child: Padding( 201 | padding: const EdgeInsets.all(10.0), 202 | child: Row( 203 | mainAxisAlignment: MainAxisAlignment.center, 204 | children: [ 205 | Icon( 206 | Icons.logout, 207 | color: Colors.white, 208 | ), 209 | SizedBox(width: 10), 210 | Text( 211 | "Logout", 212 | style: TextStyle(color: Colors.white, fontSize: 18), 213 | ) 214 | ], 215 | ), 216 | )), 217 | ); 218 | } 219 | } -------------------------------------------------------------------------------- /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.5.0" 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 | carousel_pro: 19 | dependency: "direct main" 20 | description: 21 | name: carousel_pro 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.0.0" 25 | characters: 26 | dependency: transitive 27 | description: 28 | name: characters 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.1.0" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.2.0" 39 | clock: 40 | dependency: transitive 41 | description: 42 | name: clock 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.0" 46 | cloud_firestore: 47 | dependency: "direct main" 48 | description: 49 | name: cloud_firestore 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.7" 53 | cloud_firestore_platform_interface: 54 | dependency: transitive 55 | description: 56 | name: cloud_firestore_platform_interface 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "4.0.3" 60 | cloud_firestore_web: 61 | dependency: transitive 62 | description: 63 | name: cloud_firestore_web 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.0.7" 67 | collection: 68 | dependency: transitive 69 | description: 70 | name: collection 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.15.0" 74 | cupertino_icons: 75 | dependency: "direct main" 76 | description: 77 | name: cupertino_icons 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.1.2" 81 | fake_async: 82 | dependency: transitive 83 | description: 84 | name: fake_async 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.2.0" 88 | firebase_auth: 89 | dependency: "direct main" 90 | description: 91 | name: firebase_auth 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "0.6.2+1" 95 | firebase_core: 96 | dependency: "direct main" 97 | description: 98 | name: firebase_core 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.4.0" 102 | firebase_core_platform_interface: 103 | dependency: transitive 104 | description: 105 | name: firebase_core_platform_interface 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "4.0.1" 109 | firebase_core_web: 110 | dependency: transitive 111 | description: 112 | name: firebase_core_web 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.1.0" 116 | flutter: 117 | dependency: "direct main" 118 | description: flutter 119 | source: sdk 120 | version: "0.0.0" 121 | flutter_test: 122 | dependency: "direct dev" 123 | description: flutter 124 | source: sdk 125 | version: "0.0.0" 126 | flutter_web_plugins: 127 | dependency: transitive 128 | description: flutter 129 | source: sdk 130 | version: "0.0.0" 131 | fluttertoast: 132 | dependency: "direct main" 133 | description: 134 | name: fluttertoast 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "8.0.8" 138 | image_slider: 139 | dependency: "direct main" 140 | description: 141 | name: image_slider 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.0.2" 145 | intl: 146 | dependency: "direct main" 147 | description: 148 | name: intl 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "0.16.0" 152 | js: 153 | dependency: transitive 154 | description: 155 | name: js 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.6.3" 159 | matcher: 160 | dependency: transitive 161 | description: 162 | name: matcher 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "0.12.10" 166 | meta: 167 | dependency: transitive 168 | description: 169 | name: meta 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.3.0" 173 | path: 174 | dependency: transitive 175 | description: 176 | name: path 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.8.0" 180 | plugin_platform_interface: 181 | dependency: transitive 182 | description: 183 | name: plugin_platform_interface 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.0.1" 187 | simple_gesture_detector: 188 | dependency: transitive 189 | description: 190 | name: simple_gesture_detector 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.1.6" 194 | sky_engine: 195 | dependency: transitive 196 | description: flutter 197 | source: sdk 198 | version: "0.0.99" 199 | source_span: 200 | dependency: transitive 201 | description: 202 | name: source_span 203 | url: "https://pub.dartlang.org" 204 | source: hosted 205 | version: "1.8.1" 206 | stack_trace: 207 | dependency: transitive 208 | description: 209 | name: stack_trace 210 | url: "https://pub.dartlang.org" 211 | source: hosted 212 | version: "1.10.0" 213 | stream_channel: 214 | dependency: transitive 215 | description: 216 | name: stream_channel 217 | url: "https://pub.dartlang.org" 218 | source: hosted 219 | version: "2.1.0" 220 | string_scanner: 221 | dependency: transitive 222 | description: 223 | name: string_scanner 224 | url: "https://pub.dartlang.org" 225 | source: hosted 226 | version: "1.1.0" 227 | table_calendar: 228 | dependency: "direct main" 229 | description: 230 | name: table_calendar 231 | url: "https://pub.dartlang.org" 232 | source: hosted 233 | version: "2.3.3" 234 | term_glyph: 235 | dependency: transitive 236 | description: 237 | name: term_glyph 238 | url: "https://pub.dartlang.org" 239 | source: hosted 240 | version: "1.2.0" 241 | test_api: 242 | dependency: transitive 243 | description: 244 | name: test_api 245 | url: "https://pub.dartlang.org" 246 | source: hosted 247 | version: "0.2.19" 248 | typed_data: 249 | dependency: transitive 250 | description: 251 | name: typed_data 252 | url: "https://pub.dartlang.org" 253 | source: hosted 254 | version: "1.3.0" 255 | vector_math: 256 | dependency: transitive 257 | description: 258 | name: vector_math 259 | url: "https://pub.dartlang.org" 260 | source: hosted 261 | version: "2.1.0" 262 | sdks: 263 | dart: ">=2.12.0 <3.0.0" 264 | flutter: ">=1.17.0" 265 | -------------------------------------------------------------------------------- /lib/Login/forgotpassword.dart: -------------------------------------------------------------------------------- 1 | //@dart=2.9 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:fluttertoast/fluttertoast.dart'; 5 | import 'login.dart'; 6 | 7 | class forgotpassword extends StatefulWidget{ 8 | @override 9 | _forgotpasswordState createState() => _forgotpasswordState(); 10 | } 11 | 12 | class _forgotpasswordState extends State { 13 | final TextEditingController _emailController = TextEditingController(); 14 | final GlobalKey _formKey = GlobalKey(); 15 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 16 | 17 | Widget Title = Container( 18 | padding: EdgeInsets.symmetric(horizontal: 20,vertical: 40), 19 | child: Column( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | children: [ 22 | Row( 23 | mainAxisAlignment: MainAxisAlignment.center, 24 | children: [ 25 | const Text( 26 | "FORGOT", 27 | style: TextStyle( 28 | color: Colors.black87, 29 | fontWeight: FontWeight.bold, 30 | fontSize: 30 31 | ), 32 | ), 33 | Container(width: 5), 34 | const Text( 35 | "PASSWORD", 36 | style: TextStyle( 37 | color: Colors.black87, 38 | fontWeight: FontWeight.bold, 39 | fontSize: 30 40 | ), 41 | ), 42 | ], 43 | ), 44 | ], 45 | ), 46 | ); 47 | Widget back = Container( 48 | child: Stack( 49 | alignment: Alignment.bottomCenter, 50 | children: [ 51 | Container(height: 615, width: 300,), 52 | Positioned(top: 0, 53 | child: Container( 54 | decoration: BoxDecoration( 55 | color: Colors.white, 56 | border: Border.all( 57 | color: Colors.white, 58 | ), 59 | borderRadius: BorderRadius.all(Radius.circular(20)) 60 | ), 61 | height: 510, width: 290, 62 | margin: EdgeInsets.symmetric(vertical: 15.0, horizontal: 35), 63 | ), 64 | ), 65 | ], 66 | 67 | ) 68 | ); 69 | 70 | Widget text(BuildContext context) { 71 | return Container( 72 | child: Column( 73 | mainAxisAlignment: MainAxisAlignment.center, 74 | crossAxisAlignment: CrossAxisAlignment.center, 75 | children: [ 76 | Container( 77 | child: const Text("Forgot Password?", 78 | style: TextStyle( 79 | fontSize: 30, 80 | color: Colors.black 81 | ), 82 | ), 83 | ), 84 | SizedBox(height: 15), 85 | Text("Enter the email address associated", 86 | style: TextStyle(fontSize: 16)), 87 | Text("with the account", style: TextStyle(fontSize: 16)), 88 | SizedBox(height: 5), 89 | Text("We will email you a link to reset", 90 | style: TextStyle(color: Colors.black54)), 91 | Text(" your password", style: TextStyle(color: Colors.black54)), 92 | SizedBox(height: 150), 93 | Container( 94 | decoration: BoxDecoration( 95 | border: Border.all(color: Colors.black54), 96 | borderRadius: BorderRadius.circular(12) 97 | 98 | ), 99 | child: Container( 100 | padding: EdgeInsets.all(10), 101 | constraints: const BoxConstraints( 102 | minWidth: 80, minHeight: 40, maxWidth: 260), 103 | child: Row( 104 | children: [ 105 | Icon(Icons.email), 106 | SizedBox(width: 10), 107 | Column( 108 | mainAxisAlignment: MainAxisAlignment.start, 109 | crossAxisAlignment: CrossAxisAlignment.start, 110 | children: [ 111 | const Text("EMAIL", 112 | style: TextStyle( 113 | color: Colors.black54 114 | ), 115 | ), 116 | SizedBox( 117 | width: 180, height: 30, 118 | child: TextFormField( 119 | controller: _emailController, 120 | decoration: const InputDecoration( 121 | border: UnderlineInputBorder(), 122 | ), 123 | validator: (String value) { 124 | if (value.isEmpty) { 125 | return 'Please enter some text'; 126 | } 127 | return null; 128 | }, 129 | ), 130 | ) 131 | ] 132 | ), 133 | ], 134 | ) 135 | ), 136 | ), 137 | SizedBox(height: 13), 138 | Container( 139 | // width: 120, 140 | padding: EdgeInsets.only(left: 30, top: 7, right: 7, bottom: 7), 141 | decoration: const BoxDecoration( 142 | gradient: LinearGradient( 143 | colors: [Colors.lightBlueAccent, Color(0xFF044E4C)]), 144 | borderRadius: BorderRadius.horizontal( 145 | right: Radius.circular(40), left: Radius.circular(40)) 146 | ), 147 | child: Row( 148 | mainAxisAlignment: MainAxisAlignment.center, 149 | mainAxisSize: MainAxisSize.min, 150 | children: [ 151 | const Text("NEXT", style: TextStyle( 152 | color: Colors.white, 153 | fontSize: 20 154 | ),), 155 | Container(width: 15), 156 | Container( 157 | decoration: const BoxDecoration( 158 | shape: BoxShape.circle, 159 | color: Colors.lightBlueAccent 160 | ), 161 | child: IconButton(onPressed: () async { 162 | resetPassword(); 163 | }, 164 | icon: Icon(Icons.arrow_forward_rounded), 165 | iconSize: 25, 166 | color: Colors.black54), width: 40, height: 40,) 167 | ] 168 | ), 169 | ), 170 | SizedBox(height: 12), 171 | Row( 172 | mainAxisAlignment: MainAxisAlignment.center, 173 | children: [ 174 | const Text("Back to ", 175 | style: TextStyle( 176 | fontSize: 13 177 | ), 178 | ), 179 | GestureDetector( 180 | onTap: () { 181 | setState(() { 182 | Navigator.pushReplacement(context, 183 | MaterialPageRoute(builder: (context) => LOGIN()),); 184 | }); 185 | }, 186 | child: Container( 187 | child: const Text("SIGN IN NOW", 188 | style: TextStyle( 189 | color: Color(0xFF4BE0DB) 190 | ), 191 | ) 192 | ), 193 | ), 194 | ], 195 | ), 196 | SizedBox(height: 80, width: 20), 197 | ] 198 | ) 199 | ); 200 | } 201 | 202 | 203 | @override 204 | Widget build(BuildContext context) { 205 | const color3 = const Color(0xFF4BE0DB); 206 | return Form( 207 | key: _formKey, 208 | child: MaterialApp( 209 | debugShowCheckedModeBanner: false, 210 | theme: ThemeData(fontFamily: 'Balsamiq_Sans'), 211 | home: Scaffold( 212 | backgroundColor: color3, 213 | body: Container( 214 | child: Container( 215 | // margin: EdgeInsets.symmetric(horizontal: 15.0), 216 | child: ListView( 217 | children: [ 218 | Title, 219 | Stack( 220 | alignment: Alignment.center, 221 | children: [ 222 | back, 223 | text(context), 224 | 225 | ] 226 | ) 227 | ] 228 | ), 229 | ), 230 | ) 231 | ) 232 | )); 233 | } 234 | 235 | resetPassword() async { 236 | String email = _emailController.text.toString(); 237 | try { 238 | await _firebaseAuth.sendPasswordResetEmail(email: email); 239 | } 240 | catch (e) { 241 | Fluttertoast.showToast(msg: e.toString()); 242 | } 243 | } 244 | } -------------------------------------------------------------------------------- /lib/student/exam/quizepage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:math'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'resultpage.dart'; 7 | 8 | class getjson extends StatelessWidget { 9 | // accept the langname as a parameter 10 | 11 | String langname; 12 | getjson(this.langname); 13 | String assettoload; 14 | 15 | // a function 16 | // sets the asset to a particular JSON file 17 | // and opens the JSON 18 | setasset() { 19 | if (langname == "Python") { 20 | assettoload = "assets/python.json"; 21 | } else if (langname == "Java") { 22 | assettoload = "assets/java.json"; 23 | } else if (langname == "Javascript") { 24 | assettoload = "assets/js.json"; 25 | } else if (langname == "C++") { 26 | assettoload = "assets/cpp.json"; 27 | } else { 28 | assettoload = "assets/linux.json"; 29 | } 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | // this function is called before the build so that 35 | // the string assettoload is avialable to the DefaultAssetBuilder 36 | setasset(); 37 | // and now we return the FutureBuilder to load and decode JSON 38 | return FutureBuilder( 39 | future: 40 | DefaultAssetBundle.of(context).loadString(assettoload, cache: false), 41 | builder: (context, snapshot) { 42 | List mydata = json.decode(snapshot.data.toString()); 43 | if (mydata == null) { 44 | return Scaffold( 45 | body: Center( 46 | child: Text( 47 | "Loading", 48 | ), 49 | ), 50 | ); 51 | } else { 52 | return quizpage(mydata: mydata); 53 | } 54 | }, 55 | ); 56 | } 57 | } 58 | 59 | class quizpage extends StatefulWidget { 60 | final List mydata; 61 | 62 | quizpage({Key key, @required this.mydata}) : super(key: key); 63 | @override 64 | _quizpageState createState() => _quizpageState(mydata); 65 | } 66 | 67 | class _quizpageState extends State { 68 | final List mydata; 69 | _quizpageState(this.mydata); 70 | 71 | Color colortoshow = Colors.indigoAccent; 72 | Color right = Colors.green; 73 | Color wrong = Colors.red; 74 | int marks = 0; 75 | int i = 1; 76 | bool disableAnswer = false; 77 | // extra varibale to iterate 78 | int j = 1; 79 | int timer = 30; 80 | String showtimer = "30"; 81 | var random_array; 82 | 83 | Map btncolor = { 84 | "a": Colors.indigoAccent, 85 | "b": Colors.indigoAccent, 86 | "c": Colors.indigoAccent, 87 | "d": Colors.indigoAccent, 88 | }; 89 | 90 | bool canceltimer = false; 91 | 92 | // code inserted for choosing questions randomly 93 | // to create the array elements randomly use the dart:math module 94 | // ----- CODE TO GENERATE ARRAY RANDOMLY 95 | 96 | genrandomarray(){ 97 | var distinctIds = []; 98 | var rand = new Random(); 99 | for (int i = 0; ;) { 100 | distinctIds.add(rand.nextInt(10)); 101 | random_array = distinctIds.toSet().toList(); 102 | if(random_array.length < 10){ 103 | continue; 104 | }else{ 105 | break; 106 | } 107 | } 108 | print(random_array); 109 | } 110 | 111 | // var random_array; 112 | // var distinctIds = []; 113 | // var rand = new Random(); 114 | // for (int i = 0; ;) { 115 | // distinctIds.add(rand.nextInt(10)); 116 | // random_array = distinctIds.toSet().toList(); 117 | // if(random_array.length < 10){ 118 | // continue; 119 | // }else{ 120 | // break; 121 | // } 122 | // } 123 | // print(random_array); 124 | 125 | // ----- END OF CODE 126 | // var random_array = [1, 6, 7, 2, 4, 10, 8, 3, 9, 5]; 127 | 128 | // overriding the initstate function to start timer as this screen is created 129 | @override 130 | void initState() { 131 | starttimer(); 132 | genrandomarray(); 133 | super.initState(); 134 | } 135 | 136 | // overriding the setstate function to be called only if mounted 137 | @override 138 | void setState(fn) { 139 | if (mounted) { 140 | super.setState(fn); 141 | } 142 | } 143 | 144 | void starttimer() async { 145 | const onesec = Duration(seconds: 1); 146 | Timer.periodic(onesec, (Timer t) { 147 | setState(() { 148 | if (timer < 1) { 149 | t.cancel(); 150 | nextquestion(); 151 | } else if (canceltimer == true) { 152 | t.cancel(); 153 | } else { 154 | timer = timer - 1; 155 | } 156 | showtimer = timer.toString(); 157 | }); 158 | }); 159 | } 160 | 161 | void nextquestion() { 162 | canceltimer = false; 163 | timer = 30; 164 | setState(() { 165 | if (j < 10) { 166 | i = random_array[j]; 167 | j++; 168 | } else { 169 | Navigator.of(context).pushReplacement(MaterialPageRoute( 170 | builder: (context) => resultpage(marks: marks), 171 | )); 172 | } 173 | btncolor["a"] = Colors.indigoAccent; 174 | btncolor["b"] = Colors.indigoAccent; 175 | btncolor["c"] = Colors.indigoAccent; 176 | btncolor["d"] = Colors.indigoAccent; 177 | disableAnswer = false; 178 | }); 179 | starttimer(); 180 | } 181 | 182 | void checkanswer(String k) { 183 | 184 | // in the previous version this was 185 | // mydata[2]["1"] == mydata[1]["1"][k] 186 | // which i forgot to change 187 | // so nake sure that this is now corrected 188 | if (mydata[2][i.toString()] == mydata[1][i.toString()][k]) { 189 | // just a print sattement to check the correct working 190 | // debugPrint(mydata[2][i.toString()] + " is equal to " + mydata[1][i.toString()][k]); 191 | marks = marks + 5; 192 | // changing the color variable to be green 193 | colortoshow = right; 194 | } else { 195 | // just a print sattement to check the correct working 196 | // debugPrint(mydata[2]["1"] + " is equal to " + mydata[1]["1"][k]); 197 | colortoshow = wrong; 198 | } 199 | setState(() { 200 | // applying the changed color to the particular button that was selected 201 | btncolor[k] = colortoshow; 202 | canceltimer = true; 203 | disableAnswer = true; 204 | }); 205 | // nextquestion(); 206 | // changed timer duration to 1 second 207 | Timer(Duration(seconds: 2), nextquestion); 208 | } 209 | 210 | Widget choicebutton(String k) { 211 | return Padding( 212 | padding: EdgeInsets.symmetric( 213 | vertical: 10.0, 214 | horizontal: 20.0, 215 | ), 216 | child: MaterialButton( 217 | onPressed: () => checkanswer(k), 218 | child: Text( 219 | mydata[1][i.toString()][k], 220 | style: TextStyle( 221 | color: Colors.white, 222 | fontFamily: "Alike", 223 | fontSize: 16.0, 224 | ), 225 | maxLines: 1, 226 | ), 227 | color: btncolor[k], 228 | splashColor: Colors.indigo[700], 229 | highlightColor: Colors.indigo[700], 230 | minWidth: 200.0, 231 | height: 45.0, 232 | shape: 233 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)), 234 | ), 235 | ); 236 | } 237 | 238 | @override 239 | Widget build(BuildContext context) { 240 | SystemChrome.setPreferredOrientations( 241 | [DeviceOrientation.portraitDown, DeviceOrientation.portraitUp]); 242 | return WillPopScope( 243 | onWillPop: () { 244 | return showDialog( 245 | context: context, 246 | builder: (context) => AlertDialog( 247 | title: Text( 248 | "Quizstar", 249 | ), 250 | content: Text("You Can't Go Back At This Stage."), 251 | actions: [ 252 | FlatButton( 253 | onPressed: () { 254 | Navigator.of(context).pop(); 255 | }, 256 | child: Text( 257 | 'Ok', 258 | ), 259 | ) 260 | ], 261 | )); 262 | }, 263 | child: Scaffold( 264 | body: Column( 265 | children: [ 266 | Expanded( 267 | flex: 3, 268 | child: Container( 269 | padding: EdgeInsets.all(15.0), 270 | alignment: Alignment.bottomLeft, 271 | child: Text( 272 | mydata[0][i.toString()], 273 | style: TextStyle( 274 | fontSize: 16.0, 275 | fontFamily: "Quando", 276 | ), 277 | ), 278 | ), 279 | ), 280 | Expanded( 281 | flex: 6, 282 | child: AbsorbPointer( 283 | absorbing: disableAnswer, 284 | child: Container( 285 | child: Column( 286 | mainAxisAlignment: MainAxisAlignment.center, 287 | children: [ 288 | choicebutton('a'), 289 | choicebutton('b'), 290 | choicebutton('c'), 291 | choicebutton('d'), 292 | ], 293 | ), 294 | ), 295 | ), 296 | ), 297 | Expanded( 298 | flex: 1, 299 | child: Container( 300 | alignment: Alignment.topCenter, 301 | child: Center( 302 | child: Text( 303 | showtimer, 304 | style: TextStyle( 305 | fontSize: 35.0, 306 | fontWeight: FontWeight.w700, 307 | fontFamily: 'Times New Roman', 308 | ), 309 | ), 310 | ), 311 | ), 312 | ), 313 | ], 314 | ), 315 | ), 316 | ); 317 | } 318 | } 319 | -------------------------------------------------------------------------------- /lib/admin/t_register.dart: -------------------------------------------------------------------------------- 1 | import 'dart:core'; 2 | import 'package:college_managment/admin/admin_zone.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:firebase_core/firebase_core.dart'; 6 | 7 | void main() async { 8 | WidgetsFlutterBinding.ensureInitialized(); 9 | await Firebase.initializeApp(); 10 | runApp(MaterialApp( 11 | debugShowCheckedModeBanner: false, 12 | theme: ThemeData( 13 | brightness: Brightness.light, 14 | primaryColor: Colors.deepOrange, 15 | accentColor: Colors.deepOrangeAccent), 16 | )); 17 | } 18 | class TRegister extends StatefulWidget { 19 | @override 20 | _TRegisterState createState() => _TRegisterState(); 21 | } 22 | 23 | class _TRegisterState extends State { 24 | FirebaseFirestore firestore = FirebaseFirestore.instance; 25 | String FirstName, LastName, MiddleName, Mobilnumber, AadharcardNumber,Experience, 26 | Address, Pincode; 27 | 28 | 29 | getFirstName(fname) { 30 | this.FirstName = fname; 31 | } 32 | getMiddleName(mname) { 33 | this.MiddleName = mname; 34 | } 35 | getLastName(lname) { 36 | this.LastName = lname; 37 | } 38 | getAddress(address) { 39 | this.Address = address; 40 | } 41 | getPincode(pincode) { 42 | this.Pincode = pincode; 43 | } 44 | getMobileNumber(mno) { 45 | this.Mobilnumber = mno; 46 | } 47 | getAadharcardNumber(ano) { 48 | this.AadharcardNumber = ano; 49 | } 50 | getExperience(exp) { 51 | this.Experience = exp; 52 | } 53 | 54 | createData() { 55 | DocumentReference documentReference = 56 | FirebaseFirestore.instance.collection("Information").doc(FirstName); 57 | Map Information = { 58 | 'FirstName': FirstName, 59 | 'MiddleName': MiddleName, 60 | 'LastName': LastName, 61 | 'Address': Address, 62 | 'Pincode': Pincode, 63 | 'MobilNumber':Mobilnumber, 64 | 'AadharcardNumber':AadharcardNumber, 65 | 'Experience': Experience 66 | 67 | }; 68 | documentReference.set(Information).whenComplete(() { 69 | print('$FirstName created'); 70 | }); 71 | } 72 | 73 | updateData() { 74 | DocumentReference documentReference = 75 | FirebaseFirestore.instance.collection("Information").doc(FirstName); 76 | Map Information = { 77 | 'FirstName': FirstName, 78 | 'MiddleName': MiddleName, 79 | 'LastName': LastName, 80 | 'Address': Address, 81 | 'Pincode': Pincode, 82 | 'MobilNumber':Mobilnumber, 83 | 'AadharcardNumber':AadharcardNumber, 84 | 'Experience': Experience 85 | }; 86 | documentReference.set(Information).whenComplete(() { 87 | print('$FirstName updated'); 88 | }); 89 | } 90 | 91 | deleteData() { 92 | DocumentReference documentReference = 93 | FirebaseFirestore.instance.collection("Information").doc(FirstName); 94 | 95 | documentReference.delete().whenComplete(() => print('$FirstName deleted')); 96 | } 97 | 98 | @override 99 | Widget build(BuildContext context) { 100 | return Scaffold( 101 | appBar: PreferredSize( 102 | preferredSize: Size.fromHeight(70), 103 | child: AppBar( 104 | leading: InkWell( 105 | onTap: () { 106 | Navigator.push(context, MaterialPageRoute(builder: (_) { 107 | return AdminZone(); 108 | })); 109 | }, 110 | child: Icon(Icons.arrow_back, size: 50,), 111 | ), 112 | backgroundColor: Color(0xfffe5722), 113 | centerTitle: true, 114 | title: Text( 115 | 'TEACHER DATA', 116 | style: TextStyle(fontSize: 30), 117 | ), 118 | ), 119 | ), 120 | body: SingleChildScrollView( 121 | child: Column( 122 | children: [ 123 | Padding( 124 | padding: const EdgeInsets.all(8.0), 125 | child: TextFormField( 126 | decoration: InputDecoration( 127 | labelText: 'First Name', 128 | fillColor: Colors.white, 129 | border: OutlineInputBorder( 130 | borderSide: 131 | BorderSide(color: Colors.tealAccent, width: 2.0))), 132 | onChanged: (fname) { 133 | getFirstName(fname); 134 | }, 135 | ), 136 | ), 137 | Padding( 138 | padding: const EdgeInsets.all(8.0), 139 | child: TextFormField( 140 | decoration: InputDecoration( 141 | labelText: 'Middle Name', 142 | fillColor: Colors.white, 143 | border: OutlineInputBorder( 144 | borderSide: 145 | BorderSide(color: Colors.tealAccent, width: 2.0))), 146 | onChanged: (mname) { 147 | getFirstName(mname); 148 | }, 149 | ), 150 | ), 151 | Padding( 152 | padding: const EdgeInsets.all(8.0), 153 | child: TextFormField( 154 | decoration: InputDecoration( 155 | labelText: 'Last Name', 156 | fillColor: Colors.white, 157 | border: OutlineInputBorder( 158 | borderSide: 159 | BorderSide(color: Colors.tealAccent, width: 2.0))), 160 | onChanged: (lname) { 161 | getLastName(lname); 162 | }, 163 | ), 164 | ), 165 | Padding( 166 | padding: const EdgeInsets.all(8.0), 167 | child: TextFormField( 168 | decoration: InputDecoration( 169 | labelText: 'Address', 170 | fillColor: Colors.white, 171 | border: OutlineInputBorder( 172 | borderSide: 173 | BorderSide(color: Colors.tealAccent, width: 2.0))), 174 | onChanged: (address) { 175 | getLastName(address); 176 | }, 177 | ), 178 | ), 179 | Padding( 180 | padding: const EdgeInsets.all(8.0), 181 | child: TextFormField( 182 | decoration: InputDecoration( 183 | labelText: 'Pincode', 184 | fillColor: Colors.white, 185 | border: OutlineInputBorder( 186 | borderSide: 187 | BorderSide(color: Colors.tealAccent, width: 2.0))), 188 | onChanged: (pincode) { 189 | getPincode(pincode); 190 | }, 191 | ), 192 | ), 193 | Padding( 194 | padding: const EdgeInsets.all(8.0), 195 | child: TextFormField( 196 | decoration: InputDecoration( 197 | labelText: 'Mobile Number', 198 | fillColor: Colors.white, 199 | border: OutlineInputBorder( 200 | borderSide: 201 | BorderSide(color: Colors.tealAccent, width: 2.0))), 202 | onChanged: (mno) { 203 | getLastName(mno); 204 | }, 205 | ), 206 | ), 207 | Padding( 208 | padding: const EdgeInsets.all(8.0), 209 | child: TextFormField( 210 | decoration: InputDecoration( 211 | labelText: 'Aadharcard Number', 212 | fillColor: Colors.white, 213 | border: OutlineInputBorder( 214 | borderSide: 215 | BorderSide(color: Colors.tealAccent, width: 2.0))), 216 | onChanged: (ano) { 217 | getLastName(ano); 218 | }, 219 | ), 220 | ), 221 | Padding( 222 | padding: const EdgeInsets.all(8.0), 223 | child: TextFormField( 224 | decoration: InputDecoration( 225 | labelText: 'Experience of Years', 226 | fillColor: Colors.white, 227 | border: OutlineInputBorder( 228 | borderSide: 229 | BorderSide(color: Colors.tealAccent, width: 2.0))), 230 | onChanged: (Experience) { 231 | getLastName(Experience); 232 | }, 233 | ), 234 | ), 235 | Row( 236 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 237 | children: [ 238 | TextButton( 239 | style: ElevatedButton.styleFrom( 240 | primary: Theme.of(context).primaryColor), 241 | onPressed: () { 242 | createData(); 243 | }, 244 | child: Text( 245 | 'Create', 246 | style: TextStyle(color: Colors.white), 247 | )), 248 | TextButton( 249 | style: ElevatedButton.styleFrom( 250 | primary: Theme.of(context).primaryColor), 251 | onPressed: () { 252 | updateData(); 253 | }, 254 | child: Text( 255 | 'Update', 256 | style: TextStyle(color: Colors.white), 257 | )), 258 | TextButton( 259 | style: ElevatedButton.styleFrom( 260 | primary: Theme.of(context).primaryColor), 261 | onPressed: () { 262 | deleteData(); 263 | }, 264 | child: Text( 265 | 'Delete', 266 | style: TextStyle(color: Colors.white), 267 | )), 268 | ], 269 | ), 270 | SizedBox( 271 | height: 10, 272 | ), 273 | ], 274 | ), 275 | ), 276 | ); 277 | } 278 | } 279 | 280 | -------------------------------------------------------------------------------- /lib/student/academic_calendar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:table_calendar/table_calendar.dart'; 3 | 4 | import 'student_zone.dart'; 5 | 6 | final Map _holidays = { 7 | DateTime(2021, 1, 1): ['New Year\'s Day'], 8 | DateTime(2021, 1, 12): ['Birthday of Swami Vivekananda'], 9 | DateTime(2021, 1, 23): ['Birthday of Netaji'], 10 | DateTime(2021, 1, 26): ['Republic Day'], 11 | DateTime(2021, 1, 30): ['Saraswati Puja'], 12 | DateTime(2021, 1, 31): ['Saraswati Puja'], 13 | DateTime(2021, 2, 21): ['Shivratri'], 14 | DateTime(2021, 3, 9): ['Doljatra'], 15 | DateTime(2021, 3, 10): ['Holi'], 16 | DateTime(2021, 3, 23): ['Shab-e-Meraj'], 17 | DateTime(2021, 4, 5): ['University Foundation Day'], 18 | DateTime(2021, 4, 9): ['Shab-e-Barat'], 19 | DateTime(2021, 4, 10): ['Good Friday'], 20 | DateTime(2021, 4, 14): ['Bengali New Year\'s Day'], 21 | DateTime(2021, 5, 1): ['Mayday'], 22 | DateTime(2021, 5, 7): ['Buddha Purnima'], 23 | DateTime(2021, 5, 8): ['Birthday of Rabindra Nath Tagore'], 24 | DateTime(2021, 5, 21): ['Shab-e-Qadr'], 25 | DateTime(2021, 5, 22): ['Jummatul-Wada'], 26 | DateTime(2021, 5, 24): ['Eid-ul-Fitr'], 27 | DateTime(2021, 5, 25): ['Eid-ul-Fitr'], 28 | DateTime(2021, 5, 26): ['Eid-ul-Fitr'], 29 | DateTime(2021, 7, 31): ['Eid-ul-Azha'], 30 | DateTime(2021, 8, 1): ['Eid-ul-Azha'], 31 | DateTime(2021, 8, 2): ['Eid-ul-Azha'], 32 | DateTime(2021, 8, 3): ['Eid-ul-Azha'], 33 | DateTime(2021, 8, 11): ['Janmastami'], 34 | DateTime(2021, 8, 15): ['Independance Day'], 35 | DateTime(2021, 8, 30): ['Muharram'], 36 | DateTime(2021, 9, 17): ['Mahalaya'], 37 | DateTime(2021, 10, 2): ['Birthday of Gandhiji'], 38 | DateTime(2021, 10, 7): ['Calcutta Madrasah Foundation Day'], 39 | DateTime(2021, 10, 14): ['Akhri Chahar Shambah'], 40 | DateTime(2021, 10, 19): ['Puja Holiday\'s'], 41 | DateTime(2021, 10, 20): ['Puja Holiday\'s'], 42 | DateTime(2021, 10, 21): ['Puja Holiday\'s'], 43 | DateTime(2021, 10, 22): ['Puja Holiday\'s'], 44 | DateTime(2021, 10, 23): ['Puja Holiday\'s'], 45 | DateTime(2021, 10, 24): ['Puja Holiday\'s'], 46 | DateTime(2021, 10, 25): ['Puja Holiday\'s'], 47 | DateTime(2021, 10, 26): ['Puja Holiday\'s'], 48 | DateTime(2021, 10, 27): ['Puja Holiday\'s'], 49 | DateTime(2021, 10, 28): ['Puja Holiday\'s'], 50 | DateTime(2021, 10, 29): ['Puja Holiday\'s'], 51 | DateTime(2021, 10, 30): ['Puja Holiday\'s'], 52 | DateTime(2021, 11, 14): ['Kali Puja'], 53 | DateTime(2021, 11, 16): ['Bhatriditya'], 54 | DateTime(2021, 11, 17): ['Bhatriditya'], 55 | DateTime(2021, 11, 19): ['Chaat Puja'], 56 | DateTime(2021, 11, 20): ['Chaat Puja'], 57 | DateTime(2021, 11, 27): ['Fateha-Yez-Daham'], 58 | DateTime(2021, 11, 30): ['Birthday of Guru Nanak'], 59 | DateTime(2021, 12, 25): ['Christmas'], 60 | }; 61 | 62 | class Calendar extends StatefulWidget { 63 | @override 64 | _CalendarState createState() => _CalendarState(); 65 | } 66 | 67 | class _CalendarState extends State { 68 | Map _events; 69 | List _selectedEvents; 70 | CalendarController _calendarController; 71 | 72 | @override 73 | void initState() { 74 | super.initState(); 75 | final _selectedDay = DateTime.now(); 76 | 77 | _events = { 78 | DateTime(2021, 1, 1): ['New Year\'s Day'], 79 | DateTime(2021, 1, 12): ['Birthday of Swami Vivekananda'], 80 | DateTime(2021, 1, 23): ['Birthday of Netaji'], 81 | DateTime(2021, 1, 26): ['Republic Day'], 82 | DateTime(2021, 1, 30): ['Saraswati Puja'], 83 | DateTime(2021, 1, 31): ['Saraswati Puja'], 84 | DateTime(2021, 2, 21): ['Shivratri'], 85 | DateTime(2021, 3, 9): ['Doljatra'], 86 | DateTime(2021, 3, 10): ['Holi'], 87 | DateTime(2021, 3, 23): ['Shab-e-Meraj'], 88 | DateTime(2021, 4, 5): ['University Foundation Day'], 89 | DateTime(2021, 4, 9): ['Shab-e-Barat'], 90 | DateTime(2021, 4, 10): ['Good Friday'], 91 | DateTime(2021, 4, 14): ['Bengali New Year\'s Day'], 92 | DateTime(2021, 5, 1): ['Mayday'], 93 | DateTime(2021, 5, 7): ['Buddha Purnima'], 94 | DateTime(2021, 5, 8): ['Birthday of Rabindra Nath Tagore'], 95 | DateTime(2021, 5, 21): ['Shab-e-Qadr'], 96 | DateTime(2021, 5, 22): ['Jummatul-Wada'], 97 | DateTime(2021, 5, 24): ['Eid-ul-Fitr'], 98 | DateTime(2021, 5, 25): ['Eid-ul-Fitr'], 99 | DateTime(2021, 5, 26): ['Eid-ul-Fitr'], 100 | DateTime(2021, 7, 31): ['Eid-ul-Azha'], 101 | DateTime(2021, 8, 1): ['Eid-ul-Azha'], 102 | DateTime(2021, 8, 2): ['Eid-ul-Azha'], 103 | DateTime(2021, 8, 3): ['Eid-ul-Azha'], 104 | DateTime(2021, 8, 11): ['Janmastami'], 105 | DateTime(2021, 8, 15): ['Independance Day'], 106 | DateTime(2021, 8, 30): ['Muharram'], 107 | DateTime(2021, 9, 17): ['Mahalaya'], 108 | DateTime(2021, 10, 2): ['Birthday of Gandhiji'], 109 | DateTime(2021, 10, 7): ['Calcutta Madrasah Foundation Day'], 110 | DateTime(2021, 10, 14): ['Akhri Chahar Shambah'], 111 | DateTime(2021, 10, 19): ['Puja Holiday\'s'], 112 | DateTime(2021, 10, 20): ['Puja Holiday\'s'], 113 | DateTime(2021, 10, 21): ['Puja Holiday\'s'], 114 | DateTime(2021, 10, 22): ['Puja Holiday\'s'], 115 | DateTime(2021, 10, 23): ['Puja Holiday\'s'], 116 | DateTime(2021, 10, 24): ['Puja Holiday\'s'], 117 | DateTime(2021, 10, 25): ['Puja Holiday\'s'], 118 | DateTime(2021, 10, 26): ['Puja Holiday\'s'], 119 | DateTime(2021, 10, 27): ['Puja Holiday\'s'], 120 | DateTime(2021, 10, 28): ['Puja Holiday\'s'], 121 | DateTime(2021, 10, 29): ['Puja Holiday\'s'], 122 | DateTime(2021, 10, 30): ['Puja Holiday\'s'], 123 | DateTime(2021, 11, 14): ['Kali Puja'], 124 | DateTime(2021, 11, 16): ['Bhatriditya'], 125 | DateTime(2021, 11, 17): ['Bhatriditya'], 126 | DateTime(2021, 11, 19): ['Chaat Puja'], 127 | DateTime(2021, 11, 20): ['Chaat Puja'], 128 | DateTime(2021, 11, 27): ['Fateha-Yez-Daham'], 129 | DateTime(2021, 11, 30): ['Birthday of Guru Nanak'], 130 | DateTime(2021, 12, 25): ['Christmas'], 131 | }; 132 | _selectedEvents = _events[_selectedDay] ?? []; 133 | _calendarController = CalendarController(); 134 | } 135 | 136 | @override 137 | void dispose() { 138 | _calendarController.dispose(); 139 | super.dispose(); 140 | } 141 | 142 | void _onDaySelected(DateTime day, List events) { 143 | setState(() { 144 | _selectedEvents = events; 145 | }); 146 | } 147 | 148 | @override 149 | Widget build(BuildContext context) { 150 | return Scaffold( 151 | appBar: PreferredSize( 152 | preferredSize: Size.fromHeight(50), 153 | child: AppBar( 154 | leading: InkWell( 155 | onTap: () { 156 | Navigator.push(context, MaterialPageRoute(builder: (_) { 157 | return StudentZone(); 158 | })); 159 | }, 160 | child: Icon(Icons.arrow_back, size: 30,), 161 | ), 162 | backgroundColor: Color(0xff002c51), 163 | centerTitle: true, 164 | title: Text( 165 | 'ACADEMIC CALENDAR', 166 | style: TextStyle(fontSize: 20), 167 | ), 168 | ), 169 | ), 170 | body: SafeArea( 171 | child: Column( 172 | children: [ 173 | SizedBox( 174 | height: 30,), 175 | _buildTableCalendar(), 176 | const SizedBox(height: 10.0), 177 | Expanded(child: _buildEventList()), 178 | ], 179 | ), 180 | ), 181 | ); 182 | } 183 | 184 | Widget _buildTableCalendar() { 185 | return TableCalendar( 186 | availableCalendarFormats: const {CalendarFormat.month: 'Month'}, 187 | calendarController: _calendarController, 188 | events: _events, 189 | holidays: _holidays, 190 | startingDayOfWeek: StartingDayOfWeek.monday, 191 | calendarStyle: CalendarStyle( 192 | outsideDaysVisible: false, 193 | todayColor: Theme.of(context).primaryColor, 194 | holidayStyle: TextStyle().copyWith(color: Colors.red[900]), 195 | markersColor: Theme.of(context).primaryColor, 196 | todayStyle: TextStyle( 197 | fontWeight: FontWeight.bold, fontSize: 18.0, color: Colors.red[900]), 198 | ), 199 | headerStyle: HeaderStyle( 200 | centerHeaderTitle: true, 201 | formatButtonTextStyle: 202 | TextStyle().copyWith(color: Colors.white, fontSize: 15.0), 203 | formatButtonDecoration: BoxDecoration( 204 | color: Colors.purpleAccent, 205 | borderRadius: BorderRadius.circular(16.0), 206 | ), 207 | ), 208 | builders: CalendarBuilders( 209 | selectedDayBuilder: (context, date, events) => Container( 210 | margin: const EdgeInsets.all(4.0), 211 | alignment: Alignment.center, 212 | decoration: BoxDecoration( 213 | color:Color(0xff002c51), 214 | borderRadius: BorderRadius.circular(10.0), 215 | ), 216 | child: Text( 217 | date.day.toString(), 218 | style: TextStyle(color: Theme.of(context).primaryColor), 219 | ), 220 | ), 221 | todayDayBuilder: (context, date, events) => Container( 222 | margin: const EdgeInsets.all(4.0), 223 | alignment: Alignment.center, 224 | decoration: BoxDecoration( 225 | color: Color(0xff53c0c7), 226 | borderRadius: BorderRadius.circular(10.0)), 227 | child: Text( 228 | date.day.toString(), 229 | style: TextStyle(color: Colors.white), 230 | ), 231 | ), 232 | ), 233 | onDaySelected: (date, events, _) { 234 | setState(() { 235 | _selectedEvents = events; 236 | }); 237 | }, 238 | 239 | 240 | ); 241 | } 242 | 243 | Widget _buildEventList() { 244 | return ListView( 245 | children: _selectedEvents 246 | .map((event) => Container( 247 | decoration: BoxDecoration( 248 | border: Border.all(width: 0.2), 249 | borderRadius: BorderRadius.circular(25), 250 | ), 251 | margin: EdgeInsets.all(10.0), 252 | child: ListTile( 253 | title: Center(child: Text(event.toString())), 254 | onTap: () => print('$event tapped!'), 255 | ), 256 | )) 257 | .toList(), 258 | ); 259 | } 260 | } 261 | -------------------------------------------------------------------------------- /lib/Login/login.dart: -------------------------------------------------------------------------------- 1 | //@dart=2.9 2 | import 'package:college_managment/Home_page.dart'; 3 | import 'package:college_managment/Login/forgotpassword.dart'; 4 | import 'package:college_managment/Login/signup.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:flutter/cupertino.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter/widgets.dart'; 9 | import 'package:fluttertoast/fluttertoast.dart'; 10 | 11 | class LOGIN extends StatefulWidget { 12 | 13 | @override 14 | _LOGINState createState() => _LOGINState(); 15 | } 16 | class _LOGINState extends State { 17 | final GlobalKey _formKey = GlobalKey(); 18 | final TextEditingController _emailController = TextEditingController(); 19 | final TextEditingController _passwordController = TextEditingController(); 20 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 21 | 22 | final color3 = const Color(0xFF4BE0DB); 23 | 24 | Widget Title = Container( 25 | 26 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 40), 27 | child: Column( 28 | mainAxisAlignment: MainAxisAlignment.center, 29 | children: [ 30 | 31 | Row( 32 | mainAxisAlignment: MainAxisAlignment.center, 33 | children: [ 34 | const Text( 35 | "LOGIN", 36 | style: TextStyle( 37 | color: Colors.black87, 38 | fontWeight: FontWeight.bold, 39 | fontSize: 40 40 | ), 41 | ), 42 | Container(width: 5), 43 | const Text( 44 | "PAGE", 45 | style: TextStyle( 46 | color: Colors.black87, 47 | fontWeight: FontWeight.bold, 48 | fontSize: 40 49 | ), 50 | ), 51 | ], 52 | ), 53 | ], 54 | ), 55 | ); 56 | Widget back = Container( 57 | child: Stack( 58 | alignment: Alignment.bottomCenter, 59 | children: [ 60 | 61 | Container(height: 615, width: 300), 62 | Positioned(top: 0, 63 | child: Container( 64 | decoration: BoxDecoration( 65 | color: Colors.white, 66 | border: Border.all( 67 | color: Colors.white, 68 | ), 69 | borderRadius: BorderRadius.all(Radius.circular(20)) 70 | ), 71 | height: 510, width: 290, 72 | margin: EdgeInsets.symmetric(vertical: 15.0, horizontal: 35), 73 | ), 74 | ), 75 | ], 76 | ) 77 | ); 78 | 79 | Widget text(BuildContext context) { 80 | return Container( 81 | child: Column( 82 | mainAxisAlignment: MainAxisAlignment.center, 83 | crossAxisAlignment: CrossAxisAlignment.center, 84 | children: [ 85 | Container( 86 | child: 87 | const Text("Welcome", 88 | style: TextStyle( 89 | fontSize: 30, 90 | ), 91 | ), 92 | ), 93 | SizedBox(height: 3), 94 | Container( 95 | child: Text("Login to continue", 96 | style: TextStyle( 97 | fontSize: 14, 98 | color: Colors.black54 99 | ), 100 | ), 101 | ), 102 | SizedBox(height: 50), 103 | Container( 104 | decoration: BoxDecoration( 105 | border: Border.all(color: Colors.black54), 106 | borderRadius: BorderRadius.circular(12) 107 | 108 | ), 109 | child: Container( 110 | padding: EdgeInsets.all(10), 111 | constraints: BoxConstraints( 112 | minWidth: 80, minHeight: 40, maxWidth: 260), 113 | child: Row( 114 | children: [ 115 | Icon(Icons.email), 116 | SizedBox(width: 10), 117 | Column( 118 | mainAxisAlignment: MainAxisAlignment.start, 119 | crossAxisAlignment: CrossAxisAlignment.start, 120 | children: [ 121 | Text("EMAIL", 122 | style: TextStyle( 123 | color: Colors.black54 124 | ), 125 | ), 126 | SizedBox( 127 | width: 180, height: 30, 128 | child: TextFormField( 129 | controller: _emailController, 130 | decoration: InputDecoration( 131 | border: UnderlineInputBorder(), 132 | ), 133 | validator: (String value) { 134 | if (value.isEmpty) { 135 | return 'Please enter some text'; 136 | } 137 | return null; 138 | }, 139 | 140 | ), 141 | ) 142 | // TextFormField( 143 | // decoration: InputDecoration( 144 | // ), 145 | // ) 146 | ] 147 | ), 148 | 149 | ], 150 | ) 151 | ), 152 | ), 153 | SizedBox(height: 7), 154 | Container( 155 | decoration: BoxDecoration( 156 | border: Border.all(color: Colors.black54), 157 | borderRadius: BorderRadius.circular(12) 158 | 159 | ), 160 | child: Container( 161 | padding: EdgeInsets.all(10), 162 | constraints: BoxConstraints( 163 | minWidth: 80, minHeight: 40, maxWidth: 260), 164 | child: Row( 165 | children: [ 166 | Icon(Icons.lock), 167 | SizedBox(width: 10), 168 | Column( 169 | mainAxisAlignment: MainAxisAlignment.start, 170 | crossAxisAlignment: CrossAxisAlignment.start, 171 | children: [ 172 | Text("PASSWORD", 173 | style: TextStyle( 174 | color: Colors.black54 175 | ),), 176 | SizedBox( 177 | width: 180, height: 30, 178 | child: TextFormField( 179 | controller: _passwordController, 180 | decoration: InputDecoration( 181 | border: UnderlineInputBorder(), 182 | ), 183 | validator: (String value) { 184 | if (value.isEmpty) { 185 | return 'Please enter some text'; 186 | } 187 | return null; 188 | }, 189 | ), 190 | ) 191 | // TextFormField( 192 | // decoration: InputDecoration( 193 | // ), 194 | // ) 195 | ] 196 | ), 197 | 198 | ], 199 | ) 200 | ), 201 | ), 202 | Row( 203 | mainAxisSize: MainAxisSize.min, 204 | crossAxisAlignment: CrossAxisAlignment.start, 205 | children: [ 206 | GestureDetector( 207 | onTap: () { 208 | setState(() { 209 | Navigator.pushReplacement(context, MaterialPageRoute( 210 | builder: (context) => forgotpassword()),); 211 | }); 212 | }, 213 | child: Container( 214 | margin: EdgeInsets.only(top: 20, left: 150), 215 | child: const Text("Forgot Passsword?", 216 | style: TextStyle( 217 | fontSize: 13, 218 | color: Color(0xFF4BE0DB) 219 | ), 220 | ) 221 | ), 222 | ), 223 | ], 224 | ), //Check 225 | SizedBox(height: 70), 226 | Container( 227 | // width: 120, 228 | padding: const EdgeInsets.only( 229 | left: 30, top: 7, right: 7, bottom: 7), 230 | decoration: const BoxDecoration( 231 | gradient: LinearGradient( 232 | colors: [Colors.lightBlueAccent, Color(0xFF044E4C)]), 233 | borderRadius: BorderRadius.horizontal( 234 | right: Radius.circular(40), left: Radius.circular(40)) 235 | ), 236 | child: Row( 237 | mainAxisAlignment: MainAxisAlignment.center, 238 | mainAxisSize: MainAxisSize.min, 239 | children: [ 240 | const Text("LOG IN", style: TextStyle( 241 | color: Colors.white, 242 | fontSize: 20 243 | ),), 244 | Container(width: 15), 245 | Container( 246 | decoration: const BoxDecoration( 247 | shape: BoxShape.circle, 248 | color: Colors.lightBlueAccent 249 | ), 250 | child: IconButton(onPressed: () async { 251 | if (_formKey.currentState.validate()) { 252 | setState(() { 253 | _signInWithEmailAndPassword(); 254 | }); 255 | } 256 | }, 257 | icon: Icon(Icons.arrow_forward_rounded), 258 | iconSize: 25, 259 | color: Colors.black54), width: 40, height: 40,) 260 | ] 261 | ), 262 | ), 263 | SizedBox(height: 30), 264 | const Text("Don't have an account?", 265 | style: TextStyle( 266 | fontSize: 13 267 | ), 268 | ), 269 | GestureDetector( 270 | onTap: () { 271 | setState(() { 272 | Navigator.pushReplacement(context, 273 | MaterialPageRoute(builder: (context) => signUp()),); 274 | }); 275 | }, 276 | child: Container( 277 | child: const Text("SIGN UP NOW", 278 | style: TextStyle( 279 | color: Color(0xFF4BE0DB) 280 | ), 281 | ) 282 | ), 283 | ), 284 | SizedBox(height: 80, width: 20), 285 | 286 | ] 287 | ) 288 | ); 289 | } 290 | 291 | @override 292 | Widget build(BuildContext context) { 293 | const color3 = const Color(0xFF4BE0DB); 294 | return Form( 295 | key: _formKey, 296 | child: MaterialApp( 297 | debugShowCheckedModeBanner: false, 298 | theme: ThemeData(fontFamily: 'Balsamiq_Sans'), 299 | home: Scaffold( 300 | backgroundColor: color3, 301 | body: Container( 302 | child: ListView( 303 | children: [ 304 | Title, 305 | Stack( 306 | alignment: Alignment.center, 307 | children: [ 308 | back, 309 | text(context), 310 | ] 311 | ) 312 | ] 313 | ), 314 | ), 315 | ) 316 | ) 317 | ); 318 | } 319 | 320 | _signInWithEmailAndPassword() async { 321 | try { 322 | final user = (await _firebaseAuth.signInWithEmailAndPassword( 323 | email: _emailController.text.trim(), 324 | password: _passwordController.text.trim())); 325 | if (user != null) { 326 | setState(() { 327 | Fluttertoast.showToast(msg: "Signed In Sucessfully"); 328 | Navigator.pushReplacement( 329 | context, MaterialPageRoute(builder: (context) => HomePage()),); 330 | }); 331 | } 332 | } catch (e) { 333 | Fluttertoast.showToast(msg: e.toString()); 334 | } 335 | } 336 | } -------------------------------------------------------------------------------- /lib/Login/signup.dart: -------------------------------------------------------------------------------- 1 | //@dart=2.9 2 | import 'package:college_managment/Home_page.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:fluttertoast/fluttertoast.dart'; 7 | import 'login.dart'; 8 | 9 | 10 | 11 | class signUp extends StatefulWidget{ 12 | @override 13 | _signUpState createState()=> _signUpState(); 14 | } 15 | class _signUpState extends State { 16 | final color3 = const Color(0xFF4BE0DB); 17 | final GlobalKey _formKey = GlobalKey(); 18 | final TextEditingController _emailController = TextEditingController(); 19 | final TextEditingController _passwordController = TextEditingController(); 20 | final TextEditingController _confpasswordController = TextEditingController(); 21 | final FirebaseAuth _auth = FirebaseAuth.instance; 22 | 23 | Widget Title = Container( 24 | padding: EdgeInsets.symmetric(horizontal: 20,vertical: 40), 25 | child: Column( 26 | mainAxisAlignment: MainAxisAlignment.center, 27 | children: [ 28 | Row( 29 | mainAxisAlignment: MainAxisAlignment.center, 30 | children: [ 31 | const Text( 32 | "REGISTER", 33 | style: TextStyle( 34 | color: Colors.black87, 35 | fontWeight: FontWeight.bold, 36 | fontSize: 40 37 | ), 38 | ), 39 | Container(width: 5), 40 | const Text( 41 | "PAGE", 42 | style: TextStyle( 43 | color: Colors.black87, 44 | fontWeight: FontWeight.bold, 45 | fontSize: 40 46 | ), 47 | ), 48 | ], 49 | ), 50 | ], 51 | ), 52 | ); 53 | Widget back = Container( 54 | child: Stack( 55 | alignment: Alignment.bottomCenter, 56 | children: [ 57 | 58 | Container(height: 615, width: 300,), 59 | Positioned(top: 0, 60 | child: Container( 61 | decoration: BoxDecoration( 62 | color: Colors.white, 63 | border: Border.all( 64 | color: Colors.white, 65 | ), 66 | borderRadius: BorderRadius.all(Radius.circular(20)) 67 | ), 68 | height: 510, width: 290, 69 | margin: EdgeInsets.symmetric(vertical: 15.0, horizontal: 35), 70 | ), 71 | ), 72 | ], 73 | 74 | ) 75 | ); 76 | 77 | Widget text(BuildContext context) { 78 | return Column( 79 | mainAxisAlignment: MainAxisAlignment.center, 80 | crossAxisAlignment: CrossAxisAlignment.center, 81 | children: [ 82 | Container( 83 | child: 84 | const Text("Sign Up", 85 | style: TextStyle( 86 | fontSize: 30, 87 | ), 88 | ), 89 | ), 90 | SizedBox(height: 3), 91 | Container( 92 | child: const Text("Create your account", 93 | style: TextStyle( 94 | fontSize: 14, 95 | color: Colors.black54 96 | ), 97 | ), 98 | ), 99 | SizedBox(height: 15), 100 | Container( 101 | decoration: BoxDecoration( 102 | border: Border.all(color: Colors.black54), 103 | borderRadius: BorderRadius.circular(12) 104 | 105 | ), 106 | child: Container( 107 | padding: EdgeInsets.all(10), 108 | constraints: const BoxConstraints( 109 | minWidth: 80, minHeight: 40, maxWidth: 260), 110 | child: Row( 111 | children: [ 112 | Icon(Icons.email), 113 | SizedBox(width: 10), 114 | Column( 115 | mainAxisAlignment: MainAxisAlignment.start, 116 | crossAxisAlignment: CrossAxisAlignment.start, 117 | children: [ 118 | const Text("EMAIL", 119 | style: TextStyle( 120 | color: Colors.black54 121 | ), 122 | ), 123 | SizedBox( 124 | width: 180, height: 30, 125 | child: TextFormField( 126 | controller: _emailController, 127 | validator: (String value) { 128 | if (value.isEmpty) { 129 | return 'Please enter some text'; 130 | } 131 | return null; 132 | }, 133 | decoration: const InputDecoration( 134 | border: UnderlineInputBorder(), 135 | ), 136 | 137 | ), 138 | ) 139 | // TextFormField( 140 | // decoration: InputDecoration( 141 | // ), 142 | // ) 143 | ] 144 | ), 145 | 146 | ], 147 | ) 148 | ), 149 | ), 150 | SizedBox(height: 7), 151 | Container( 152 | decoration: BoxDecoration( 153 | border: Border.all(color: Colors.black54), 154 | borderRadius: BorderRadius.circular(12) 155 | 156 | ), 157 | child: Container( 158 | padding: EdgeInsets.all(10), 159 | constraints: const BoxConstraints( 160 | minWidth: 80, minHeight: 40, maxWidth: 260), 161 | child: Row( 162 | children: [ 163 | Icon(Icons.lock), 164 | SizedBox(width: 10), 165 | Column( 166 | mainAxisAlignment: MainAxisAlignment.start, 167 | crossAxisAlignment: CrossAxisAlignment.start, 168 | children: [ 169 | const Text("PASSWORD", 170 | style: TextStyle( 171 | color: Colors.black54 172 | ),), 173 | SizedBox( 174 | width: 180, height: 30, 175 | child: TextFormField( 176 | controller: _passwordController, 177 | validator: (String value) { 178 | if (value.isEmpty) { 179 | return 'Please enter some text'; 180 | } 181 | return null; 182 | }, 183 | decoration: const InputDecoration( 184 | border: UnderlineInputBorder(), 185 | ), 186 | ), 187 | ) 188 | // TextFormField( 189 | // decoration: InputDecoration( 190 | // ), 191 | // ) 192 | ] 193 | ), 194 | 195 | ], 196 | ) 197 | ), 198 | ), 199 | SizedBox(height: 7), 200 | Container( 201 | decoration: BoxDecoration( 202 | border: Border.all(color: Colors.black54), 203 | borderRadius: BorderRadius.circular(12) 204 | 205 | ), 206 | child: Container( 207 | padding: EdgeInsets.all(10), 208 | constraints: const BoxConstraints( 209 | minWidth: 80, minHeight: 40, maxWidth: 260), 210 | child: Row( 211 | children: [ 212 | Icon(Icons.lock), 213 | SizedBox(width: 10), 214 | Column( 215 | mainAxisAlignment: MainAxisAlignment.start, 216 | crossAxisAlignment: CrossAxisAlignment.start, 217 | children: [ 218 | const Text("CONFIRM PASSWORD", 219 | style: TextStyle( 220 | color: Colors.black54 221 | ),), 222 | SizedBox( 223 | width: 180, height: 30, 224 | child: TextFormField( 225 | controller: _confpasswordController, 226 | validator: (String value) { 227 | if (value.isEmpty) { 228 | return 'Please enter some text'; 229 | } 230 | return null; 231 | }, 232 | decoration: const InputDecoration( 233 | border: UnderlineInputBorder(), 234 | ), 235 | ), 236 | ) 237 | // TextFormField( 238 | // decoration: InputDecoration( 239 | // ), 240 | // ) 241 | ] 242 | ), 243 | 244 | ], 245 | ) 246 | ), 247 | ), 248 | SizedBox(height: 10), 249 | Container( 250 | // width: 120, 251 | padding: EdgeInsets.only(left: 30, top: 7, right: 7, bottom: 7), 252 | decoration: const BoxDecoration( 253 | gradient: LinearGradient( 254 | colors: [Colors.lightBlueAccent, Color(0xFF044E4C)]), 255 | borderRadius: BorderRadius.horizontal( 256 | right: Radius.circular(40), left: Radius.circular(40)) 257 | ), 258 | child: Row( 259 | mainAxisAlignment: MainAxisAlignment.center, 260 | mainAxisSize: MainAxisSize.min, 261 | children: [ 262 | const Text("SIGN UP", style: TextStyle( 263 | color: Colors.white, 264 | fontSize: 20 265 | ),), 266 | Container(width: 15), 267 | Container( 268 | decoration: const BoxDecoration( 269 | shape: BoxShape.circle, 270 | color: Colors.lightBlueAccent 271 | ), 272 | child: IconButton(onPressed: () async { 273 | if (_formKey.currentState.validate()) { 274 | _register(); 275 | } 276 | }, 277 | icon: Icon(Icons.arrow_forward_rounded), 278 | iconSize: 25, 279 | color: Colors.black54), width: 40, height: 40,) 280 | ] 281 | ), 282 | ), 283 | SizedBox(height: 30), 284 | const Text("Already have an account?", 285 | style: TextStyle( 286 | fontSize: 13 287 | ), 288 | ), 289 | GestureDetector( 290 | onTap: () { 291 | Navigator.pushReplacement( 292 | context, MaterialPageRoute(builder: (context) => LOGIN()),); 293 | }, 294 | child: Container( 295 | //onPressed: }, 296 | child: const Text("SIGN IN NOW", 297 | style: TextStyle( 298 | color: Color(0xFF4BE0DB) 299 | ), 300 | ) 301 | ), 302 | ), 303 | SizedBox(height: 80, width: 20), 304 | ] 305 | ); 306 | } 307 | 308 | 309 | @override 310 | Widget build(BuildContext context) { 311 | const color3 = const Color(0xFF4BE0DB); 312 | return MaterialApp( 313 | debugShowCheckedModeBanner: false, 314 | theme: ThemeData(fontFamily: 'Balsamiq_Sans'), 315 | home: Scaffold( 316 | backgroundColor: color3, 317 | body: Form( 318 | key: _formKey, 319 | child: Container( 320 | // margin: EdgeInsets.symmetric(horizontal: 15.0), 321 | child: ListView( 322 | children: [ 323 | Title, 324 | Stack( 325 | alignment: Alignment.center, 326 | children: [ 327 | back, 328 | text(context), 329 | ] 330 | ) 331 | ] 332 | ), 333 | ), 334 | ) 335 | ) 336 | ); 337 | } 338 | 339 | @override 340 | void dispose() { 341 | _emailController.dispose(); 342 | _passwordController.dispose(); 343 | super.dispose(); 344 | } 345 | 346 | void _register() async { 347 | String email = _emailController.text.trim(); 348 | String password = _passwordController.text.trim(); 349 | String confirmpassword = _confpasswordController.text.trim(); 350 | if (password == confirmpassword) { 351 | try { 352 | 353 | final user = (await _auth.createUserWithEmailAndPassword( 354 | email: email, password: password)); 355 | setState(() { 356 | if (user != null) { 357 | Fluttertoast.showToast(msg: "user created"); 358 | Navigator.pushReplacement( 359 | context, MaterialPageRoute(builder: (context) => HomePage()),); 360 | } 361 | }); 362 | } catch (e) { 363 | Fluttertoast.showToast(msg: e.toString()); 364 | } 365 | } 366 | else { 367 | Fluttertoast.showToast(msg: "Passwords don't match"); 368 | } 369 | } 370 | } -------------------------------------------------------------------------------- /lib/admin/s_register.dart: -------------------------------------------------------------------------------- 1 | import 'dart:core'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:firebase_core/firebase_core.dart'; 5 | 6 | import 'admin_zone.dart'; 7 | 8 | void main() async { 9 | WidgetsFlutterBinding.ensureInitialized(); 10 | await Firebase.initializeApp(); 11 | runApp(MaterialApp( 12 | debugShowCheckedModeBanner: false, 13 | theme: ThemeData( 14 | brightness: Brightness.light, 15 | primaryColor: Colors.deepOrange, 16 | accentColor: Colors.deepOrangeAccent), 17 | )); 18 | } 19 | 20 | class SRegister extends StatefulWidget { 21 | @override 22 | _SRegisterState createState() => _SRegisterState(); 23 | } 24 | 25 | class _SRegisterState extends State { 26 | FirebaseFirestore firestore = FirebaseFirestore.instance; 27 | String FirstName, 28 | LastName, 29 | MiddleName, 30 | IDNumber, 31 | Mobilnumber, 32 | AadharcardNumber, 33 | TResult, 34 | TBoard, 35 | TYear, 36 | TwYear, 37 | TwResult, 38 | TwBoard, 39 | Address, 40 | Pincode; 41 | 42 | getFirstName(fname) { 43 | this.FirstName = fname; 44 | } 45 | 46 | getMiddleName(mname) { 47 | this.MiddleName = mname; 48 | } 49 | 50 | getLastName(lname) { 51 | this.LastName = lname; 52 | } 53 | 54 | getIDNumber(id) { 55 | this.IDNumber = id; 56 | } 57 | 58 | getAddress(address) { 59 | this.Address = address; 60 | } 61 | 62 | getPincode(pincode) { 63 | this.Pincode = pincode; 64 | } 65 | 66 | getMobileNumber(mno) { 67 | this.Mobilnumber = mno; 68 | } 69 | 70 | getAadharcardNumber(ano) { 71 | this.AadharcardNumber = ano; 72 | } 73 | 74 | getTResult(tr) { 75 | this.TResult = tr; 76 | } 77 | 78 | getTBoard(tb) { 79 | this.TBoard = tb; 80 | } 81 | 82 | getTYear(ty) { 83 | this.TYear = ty; 84 | } 85 | 86 | getTwResult(twr) { 87 | this.TwResult = twr; 88 | } 89 | 90 | getTwBoard(twb) { 91 | this.TwBoard = twb; 92 | } 93 | 94 | getTwYear(twy) { 95 | this.TwYear = twy; 96 | } 97 | 98 | createData() { 99 | DocumentReference documentReference = 100 | FirebaseFirestore.instance.collection("Information").doc(FirstName); 101 | Map Information = { 102 | 'FirstName': FirstName, 103 | 'MiddleName': MiddleName, 104 | 'LastName': LastName, 105 | 'IDNumber': IDNumber, 106 | 'Address': Address, 107 | 'Pincode': Pincode, 108 | 'MobilNumber': Mobilnumber, 109 | 'AadharcardNumber': AadharcardNumber, 110 | 'TenResult': TResult, 111 | 'TenBoard': TBoard, 112 | 'TenYear': TYear, 113 | 'TwelveResult': TwResult, 114 | 'TwelveBoard': TwBoard, 115 | 'TwelveYear': TwYear 116 | }; 117 | documentReference.set(Information).whenComplete(() { 118 | print('$FirstName created'); 119 | }); 120 | } 121 | 122 | updateData() { 123 | DocumentReference documentReference = 124 | FirebaseFirestore.instance.collection("Information").doc(FirstName); 125 | Map Information = { 126 | 'FirstName': FirstName, 127 | 'MiddleName': MiddleName, 128 | 'LastName': LastName, 129 | 'IDNumber': IDNumber, 130 | 'Address': Address, 131 | 'Pincode': Pincode, 132 | 'MobilNumber': Mobilnumber, 133 | 'AadharcardNumber': AadharcardNumber, 134 | 'TenResult': TResult, 135 | 'TenBoard': TBoard, 136 | 'TenYear': TYear, 137 | 'TwelveResult': TwResult, 138 | 'TwelveBoard': TwBoard, 139 | 'TwelveYear': TwYear, 140 | }; 141 | documentReference.set(Information).whenComplete(() { 142 | print('$FirstName updated'); 143 | }); 144 | } 145 | 146 | deleteData() { 147 | DocumentReference documentReference = 148 | FirebaseFirestore.instance.collection("Information").doc(FirstName); 149 | 150 | documentReference.delete().whenComplete(() => print('$FirstName deleted')); 151 | } 152 | 153 | @override 154 | Widget build(BuildContext context) { 155 | return Scaffold( 156 | appBar: PreferredSize( 157 | preferredSize: Size.fromHeight(70), 158 | child: AppBar( 159 | leading: InkWell( 160 | onTap: () { 161 | Navigator.push(context, MaterialPageRoute(builder: (_) { 162 | return AdminZone(); 163 | })); 164 | }, 165 | child: Icon( 166 | Icons.arrow_back, 167 | size: 50, 168 | ), 169 | ), 170 | backgroundColor: Color(0xfffe5722), 171 | centerTitle: true, 172 | title: Text( 173 | 'STUDENT DATA', 174 | style: TextStyle(fontSize: 30), 175 | ), 176 | ), 177 | ), 178 | body: SingleChildScrollView( 179 | child: Column( 180 | children: [ 181 | Padding( 182 | padding: const EdgeInsets.all(8.0), 183 | child: TextFormField( 184 | decoration: InputDecoration( 185 | labelText: 'First Name', 186 | fillColor: Colors.white, 187 | border: OutlineInputBorder( 188 | borderSide: 189 | BorderSide(color: Colors.tealAccent, width: 2.0))), 190 | onChanged: (fname) { 191 | getFirstName(fname); 192 | }, 193 | ), 194 | ), 195 | Padding( 196 | padding: const EdgeInsets.all(8.0), 197 | child: TextFormField( 198 | decoration: InputDecoration( 199 | labelText: 'Middle Name', 200 | fillColor: Colors.white, 201 | border: OutlineInputBorder( 202 | borderSide: 203 | BorderSide(color: Colors.tealAccent, width: 2.0))), 204 | onChanged: (mname) { 205 | getFirstName(mname); 206 | }, 207 | ), 208 | ), 209 | Padding( 210 | padding: const EdgeInsets.all(8.0), 211 | child: TextFormField( 212 | decoration: InputDecoration( 213 | labelText: 'Last Name', 214 | fillColor: Colors.white, 215 | border: OutlineInputBorder( 216 | borderSide: 217 | BorderSide(color: Colors.tealAccent, width: 2.0))), 218 | onChanged: (lname) { 219 | getLastName(lname); 220 | }, 221 | ), 222 | ), 223 | Padding( 224 | padding: const EdgeInsets.all(8.0), 225 | child: TextFormField( 226 | decoration: InputDecoration( 227 | labelText: 'ID Number', 228 | fillColor: Colors.white, 229 | border: OutlineInputBorder( 230 | borderSide: 231 | BorderSide(color: Colors.tealAccent, width: 2.0))), 232 | onChanged: (id) { 233 | getIDNumber(id); 234 | }, 235 | ), 236 | ), 237 | Padding( 238 | padding: const EdgeInsets.all(8.0), 239 | child: TextFormField( 240 | decoration: InputDecoration( 241 | labelText: 'Address', 242 | fillColor: Colors.white, 243 | border: OutlineInputBorder( 244 | borderSide: 245 | BorderSide(color: Colors.tealAccent, width: 2.0))), 246 | onChanged: (address) { 247 | getLastName(address); 248 | }, 249 | ), 250 | ), 251 | Padding( 252 | padding: const EdgeInsets.all(8.0), 253 | child: TextFormField( 254 | decoration: InputDecoration( 255 | labelText: 'Pincode', 256 | fillColor: Colors.white, 257 | border: OutlineInputBorder( 258 | borderSide: 259 | BorderSide(color: Colors.tealAccent, width: 2.0))), 260 | onChanged: (pincode) { 261 | getPincode(pincode); 262 | }, 263 | ), 264 | ), 265 | Padding( 266 | padding: const EdgeInsets.all(8.0), 267 | child: TextFormField( 268 | decoration: InputDecoration( 269 | labelText: 'Mobile Number', 270 | fillColor: Colors.white, 271 | border: OutlineInputBorder( 272 | borderSide: 273 | BorderSide(color: Colors.tealAccent, width: 2.0))), 274 | onChanged: (mno) { 275 | getLastName(mno); 276 | }, 277 | ), 278 | ), 279 | Padding( 280 | padding: const EdgeInsets.all(8.0), 281 | child: TextFormField( 282 | decoration: InputDecoration( 283 | labelText: 'Aadharcard Number', 284 | fillColor: Colors.white, 285 | border: OutlineInputBorder( 286 | borderSide: 287 | BorderSide(color: Colors.tealAccent, width: 2.0))), 288 | onChanged: (ano) { 289 | getLastName(ano); 290 | }, 291 | ), 292 | ), 293 | Padding( 294 | padding: const EdgeInsets.all(8.0), 295 | child: TextFormField( 296 | decoration: InputDecoration( 297 | labelText: '10th Result', 298 | fillColor: Colors.white, 299 | border: OutlineInputBorder( 300 | borderSide: 301 | BorderSide(color: Colors.tealAccent, width: 2.0))), 302 | onChanged: (TReult) { 303 | getLastName(TResult); 304 | }, 305 | ), 306 | ), 307 | Padding( 308 | padding: const EdgeInsets.all(8.0), 309 | child: TextFormField( 310 | decoration: InputDecoration( 311 | labelText: '10th Board', 312 | fillColor: Colors.white, 313 | border: OutlineInputBorder( 314 | borderSide: 315 | BorderSide(color: Colors.tealAccent, width: 2.0))), 316 | onChanged: (TBoard) { 317 | getLastName(TBoard); 318 | }, 319 | ), 320 | ), 321 | Padding( 322 | padding: const EdgeInsets.all(8.0), 323 | child: TextFormField( 324 | decoration: InputDecoration( 325 | labelText: '10th Passing Year ', 326 | fillColor: Colors.white, 327 | border: OutlineInputBorder( 328 | borderSide: 329 | BorderSide(color: Colors.tealAccent, width: 2.0))), 330 | onChanged: (TYear) { 331 | getLastName(TYear); 332 | }, 333 | ), 334 | ), 335 | Padding( 336 | padding: const EdgeInsets.all(8.0), 337 | child: TextFormField( 338 | decoration: InputDecoration( 339 | labelText: '12th Result', 340 | fillColor: Colors.white, 341 | border: OutlineInputBorder( 342 | borderSide: 343 | BorderSide(color: Colors.tealAccent, width: 2.0))), 344 | onChanged: (TwReult) { 345 | getLastName(TwResult); 346 | }, 347 | ), 348 | ), 349 | Padding( 350 | padding: const EdgeInsets.all(8.0), 351 | child: TextFormField( 352 | decoration: InputDecoration( 353 | labelText: '12th Board', 354 | fillColor: Colors.white, 355 | border: OutlineInputBorder( 356 | borderSide: 357 | BorderSide(color: Colors.tealAccent, width: 2.0))), 358 | onChanged: (TwBoard) { 359 | getLastName(TwBoard); 360 | }, 361 | ), 362 | ), 363 | Padding( 364 | padding: const EdgeInsets.all(8.0), 365 | child: TextFormField( 366 | decoration: InputDecoration( 367 | labelText: '12th Passing Year ', 368 | fillColor: Colors.white, 369 | border: OutlineInputBorder( 370 | borderSide: 371 | BorderSide(color: Colors.tealAccent, width: 2.0))), 372 | onChanged: (TwYear) { 373 | getLastName(TwYear); 374 | }, 375 | ), 376 | ), 377 | Row( 378 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 379 | children: [ 380 | TextButton( 381 | style: ElevatedButton.styleFrom( 382 | primary: Theme.of(context).primaryColor), 383 | onPressed: () { 384 | createData(); 385 | }, 386 | child: Text( 387 | 'Create', 388 | style: TextStyle(color: Colors.white), 389 | )), 390 | TextButton( 391 | style: ElevatedButton.styleFrom( 392 | primary: Theme.of(context).primaryColor), 393 | onPressed: () { 394 | updateData(); 395 | }, 396 | child: Text( 397 | 'Update', 398 | style: TextStyle(color: Colors.white), 399 | )), 400 | TextButton( 401 | style: ElevatedButton.styleFrom( 402 | primary: Theme.of(context).primaryColor), 403 | onPressed: () { 404 | deleteData(); 405 | }, 406 | child: Text( 407 | 'Delete', 408 | style: TextStyle(color: Colors.white), 409 | )), 410 | ], 411 | ), 412 | SizedBox( 413 | height: 10, 414 | ), 415 | Padding( 416 | padding: EdgeInsets.all(8.0), 417 | child: Row( 418 | textDirection: TextDirection.ltr, 419 | children: [ 420 | Expanded(child: Text('FName')), 421 | Expanded( 422 | child: Text('LName'), 423 | ), 424 | Expanded( 425 | child: Text('City'), 426 | ), 427 | Expanded( 428 | child: Text('Pin'), 429 | ) 430 | ], 431 | ), 432 | ), 433 | SizedBox( 434 | height: 15, 435 | ), 436 | StreamBuilder( 437 | stream: FirebaseFirestore.instance 438 | .collection("Information") 439 | .snapshots(), 440 | builder: (context, snapshot) { 441 | if (snapshot.hasData) { 442 | return ListView.builder( 443 | shrinkWrap: true, 444 | itemCount: snapshot.data.docs.length, 445 | itemBuilder: (context, index) { 446 | DocumentSnapshot documentSnapshot = 447 | snapshot.data.docs[index]; 448 | return Row( 449 | children: [ 450 | Expanded( 451 | child: Text(documentSnapshot["FirstName"])), 452 | Expanded( 453 | child: Text(documentSnapshot["LastName"])), 454 | Expanded(child: Text(documentSnapshot["City"])), 455 | Expanded( 456 | child: Text(documentSnapshot["Pincode"])), 457 | ], 458 | ); 459 | }); 460 | } else { 461 | return Align( 462 | alignment: FractionalOffset.bottomCenter, 463 | child: CircularProgressIndicator(), 464 | ); 465 | } 466 | }) 467 | ], 468 | ), 469 | ), 470 | ); 471 | } 472 | } 473 | --------------------------------------------------------------------------------