├── 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 │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── attendance │ │ │ └── MainActivity.java │ └── build.gradle ├── .gitignore ├── settings.gradle ├── build.gradle ├── gradlew.bat └── gradlew ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── 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 │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ └── contents.xcworkspacedata ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj └── .gitignore ├── flutter_01.png ├── images ├── logo.png ├── professor.jpg ├── student.jpg ├── img_no_data.png └── navbackground.jpg ├── .gitignore ├── lib ├── components │ ├── appbar.dart │ ├── student_appbar.dart │ ├── professor-appbar.dart │ └── professor-drawer.dart ├── main.dart ├── common-functions.dart ├── preferences │ ├── professor-preferences.dart │ └── student-preferences.dart ├── config.dart ├── splash.dart ├── student │ ├── dashboard.dart │ ├── courses-list.dart │ ├── attendance-record.dart │ └── attend-class.dart ├── professor │ ├── view-students.dart │ ├── view-sessions.dart │ └── dashboard.dart ├── login.dart └── homepage.dart ├── .metadata ├── README.md ├── android.iml ├── attendance.iml ├── test └── widget_test.dart ├── attendance_android.iml ├── pubspec.yaml └── pubspec.lock /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 | -------------------------------------------------------------------------------- /flutter_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/flutter_01.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/images/logo.png -------------------------------------------------------------------------------- /images/professor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/images/professor.jpg -------------------------------------------------------------------------------- /images/student.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/images/student.jpg -------------------------------------------------------------------------------- /images/img_no_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/images/img_no_data.png -------------------------------------------------------------------------------- /images/navbackground.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/images/navbackground.jpg -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .idea 4 | .vscode/ 5 | .packages 6 | .pub/ 7 | build/ 8 | ios/.generated/ 9 | packages 10 | .flutter-plugins 11 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/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/bhattjaldhi/attendance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhattjaldhi/attendance/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/bhattjaldhi/attendance/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /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/components/appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MyAppBar { 4 | 5 | createAppbar(title) { 6 | return new AppBar(title: new Text(title, style: new TextStyle(color: Colors.white))); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /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.1-all.zip 7 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 3ea4d06340a97a1e9d7cae97567c64e0569dcaa2 8 | channel: beta 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | Clone this repository using below command, 4 | git clone https://github.com/bhattjaldhi/attendance 5 | 6 | Then, open command prompt and type below commands, 7 | 1) cd attendance 8 | 2) flutter run 9 | 10 | ## Getting Started 11 | 12 | For help getting started with Flutter, view our online 13 | [documentation](https://flutter.io/). 14 | "# attendance" 15 | -------------------------------------------------------------------------------- /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/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:attendance/homepage.dart'; 2 | import 'package:attendance/splash.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | void main() => runApp(new MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return new MaterialApp( 11 | title: 'Attendee', 12 | theme: new ThemeData( 13 | primarySwatch: Colors.red, 14 | accentColor: Colors.blue, 15 | ), 16 | home: new SplashScreen(), 17 | ); 18 | } 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.0.1' 9 | classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | jcenter() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | *.pbxuser 16 | *.mode1v3 17 | *.mode2v3 18 | *.perspectivev3 19 | 20 | !default.pbxuser 21 | !default.mode1v3 22 | !default.mode2v3 23 | !default.perspectivev3 24 | 25 | xcuserdata 26 | 27 | *.moved-aside 28 | 29 | *.pyc 30 | *sync/ 31 | Icon? 32 | .tags* 33 | 34 | /Flutter/app.flx 35 | /Flutter/app.zip 36 | /Flutter/flutter_assets/ 37 | /Flutter/App.framework 38 | /Flutter/Flutter.framework 39 | /Flutter/Generated.xcconfig 40 | /ServiceDefinitions.json 41 | 42 | Pods/ 43 | -------------------------------------------------------------------------------- /attendance.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /lib/common-functions.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CommonFunctions { 4 | static showProgressDialog(_scaffoldContext) { 5 | showDialog( 6 | context: _scaffoldContext, 7 | child: new Column( 8 | crossAxisAlignment: CrossAxisAlignment.stretch, 9 | mainAxisAlignment: MainAxisAlignment.center, 10 | children: [ 11 | new Container( 12 | margin: const EdgeInsets.all(20.0), 13 | height: 90.0, 14 | child: new Card( 15 | child: new ListTile( 16 | leading: new CircularProgressIndicator(), 17 | title: new Text("Please Wait"), 18 | ), 19 | ), 20 | ), 21 | ], 22 | ), 23 | ); 24 | } 25 | 26 | 27 | static dismissDialog(_scaffoldContext) { 28 | Navigator.of(_scaffoldContext).pop(); 29 | } 30 | } -------------------------------------------------------------------------------- /lib/preferences/professor-preferences.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | import 'dart:core'; 3 | class ProfessorPreferences { 4 | static var KEY_PROFESSOR_ID = "professor-id"; 5 | static var KEY_PROFESSOR_NAME = "professor-name"; 6 | static var KEY_PROFESSOR_EMAIL = "professor-email"; 7 | static var KEY_PROFESSOR_DEPTID = "professor-department-id"; 8 | static var KEY_PROFESSOR_ORGANIZATION_ID = "professor-organization-id"; 9 | 10 | storeDataAtLogin(data) async { 11 | SharedPreferences prefs = await SharedPreferences.getInstance(); 12 | prefs.setInt(KEY_PROFESSOR_ID, data['professor_detail']['id']); 13 | prefs.setString(KEY_PROFESSOR_NAME, data['professor_detail']['name']); 14 | prefs.setString(KEY_PROFESSOR_EMAIL, data['professor_detail']['email']); 15 | prefs.setInt(KEY_PROFESSOR_DEPTID, data['professor_detail']['department_id']); 16 | prefs.setInt(KEY_PROFESSOR_ORGANIZATION_ID, data['professor_detail']['organization_id']); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /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 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:attendance/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /lib/preferences/student-preferences.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:shared_preferences/shared_preferences.dart'; 4 | import 'dart:core'; 5 | 6 | class StudentPreferences { 7 | static var KEY_STUDENT_ID = "student-id"; 8 | static var KEY_STUDENT_NAME = "student-name"; 9 | static var KEY_STUDENT_EMAIL = "student-email"; 10 | static var KEY_STUDENT_DEPTID = "student-department-id"; 11 | static var KEY_STUDENT_ENROLLMENT = "student-enrollment"; 12 | static var KEY_STUDENT_ORGANIZATION_ID = "student-organization-id"; 13 | 14 | storeDataAtLogin(data) async { 15 | SharedPreferences prefs = await SharedPreferences.getInstance(); 16 | prefs.setInt(KEY_STUDENT_ID, data['data']['id']); 17 | prefs.setString(KEY_STUDENT_NAME, data['data']['name']); 18 | prefs.setString(KEY_STUDENT_EMAIL, data['data']['email']); 19 | prefs.setInt(KEY_STUDENT_DEPTID, data['data']['department_id']); 20 | prefs.setString(KEY_STUDENT_ENROLLMENT, data['data']['enrollment']); 21 | prefs.setInt(KEY_STUDENT_ORGANIZATION_ID, data['data']['organization_id']); 22 | } 23 | 24 | static Future getStudentId() async{ 25 | SharedPreferences prefs = await SharedPreferences.getInstance(); 26 | return prefs.getInt(KEY_STUDENT_ID); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/config.dart: -------------------------------------------------------------------------------- 1 | class Config{ 2 | 3 | static var baseUrl = "http://192.168.1.106:8000"; 4 | 5 | // Professor 6 | static var professorLoginUrl = baseUrl+"/api/v1/professor/login"; 7 | static var professorViewStudentsUrl = baseUrl+"/api/v1/professor/get-all-students"; 8 | static var createNewSessionUrl = baseUrl+"/api/v1/professor/create-new-session"; 9 | static var getRecentSessionUrl = baseUrl+"/api/v1/professor/get-recent-session"; 10 | static var getAllSessionUrl = baseUrl+"/api/v1/professor/get-all-sessions"; 11 | static var getAllCoursesOfProfessorUrl = baseUrl+"/api/v1/professor/get-all-courses-of-professor"; 12 | static var changeSessionStatusUrl = baseUrl+"/api/v1/professor/change-session-status"; 13 | 14 | // Student 15 | static var storeStudentDataUrl = baseUrl+"/api/v1/student/login-student"; 16 | static var checkStudentStatusUrl = baseUrl+"/api/v1/student/check-student-status"; 17 | static var getCoursesUrl = baseUrl+"/api/v1/student/get-courses"; 18 | static var registerCoursesUrl = baseUrl+"/api/v1/student/register-course"; 19 | static var unregisterCoursesUrl = baseUrl+"/api/v1/student/remove-course"; 20 | static var attendClassUrl = baseUrl+"/api/v1/student/attend-class"; 21 | static var getAttendanceRecordUrl = baseUrl+"/api/v1/student/get-attendance-record"; 22 | 23 | 24 | } -------------------------------------------------------------------------------- /lib/components/student_appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:attendance/preferences/student-preferences.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:shared_preferences/shared_preferences.dart'; 4 | 5 | class StudentAppbar extends StatefulWidget { 6 | @override 7 | _StudentAppbarState createState() => new _StudentAppbarState(); 8 | } 9 | 10 | class _StudentAppbarState extends State { 11 | void _selectOptionMenu(Choice choice) { 12 | switch (choice.index) { 13 | case 0: 14 | _viewProfile(); 15 | break; 16 | } 17 | } 18 | 19 | void _viewProfile() async {} 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return new PopupMenuButton( 24 | // overflow menu 25 | onSelected: _selectOptionMenu, 26 | itemBuilder: (BuildContext context) { 27 | return choices.map((Choice choice) { 28 | return new PopupMenuItem( 29 | value: choice, 30 | child: new Text(choice.title), 31 | ); 32 | }).toList(); 33 | }, 34 | ); 35 | } 36 | } 37 | 38 | class Choice { 39 | const Choice({this.index, this.title}); 40 | 41 | final String title; 42 | final int index; 43 | } 44 | 45 | const List choices = const [ 46 | const Choice(index: 0, title: 'View Profile'), 47 | ]; 48 | -------------------------------------------------------------------------------- /attendance_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /lib/splash.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:attendance/homepage.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class SplashScreen extends StatefulWidget { 7 | @override 8 | _SplashScreenState createState() => new _SplashScreenState(); 9 | } 10 | 11 | class _SplashScreenState extends State 12 | with SingleTickerProviderStateMixin { 13 | AnimationController _iconAnimationController; 14 | Animation _iconAnimation; 15 | 16 | void handleTimeout() { 17 | 18 | 19 | Navigator.of(context).pushReplacement( 20 | new MaterialPageRoute(builder: (_) => new MyHomePage())); 21 | } 22 | 23 | startTimeout() async { 24 | var duration = const Duration(seconds: 3); 25 | return new Timer(duration, handleTimeout); 26 | } 27 | 28 | @override 29 | void initState() { 30 | // TODO: implement initState 31 | super.initState(); 32 | 33 | _iconAnimationController = new AnimationController( 34 | vsync: this, duration: new Duration(milliseconds: 2000)); 35 | 36 | _iconAnimation = new CurvedAnimation( 37 | parent: _iconAnimationController, curve: Curves.easeIn); 38 | _iconAnimation.addListener(() => this.setState(() {})); 39 | 40 | _iconAnimationController.forward(); 41 | 42 | startTimeout(); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return new Scaffold( 48 | body: new Scaffold( 49 | body: new Center( 50 | child: new Image( 51 | image: new AssetImage("images/logo.png"), 52 | width: _iconAnimation.value * 100, 53 | height: _iconAnimation.value * 100, 54 | )), 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/components/professor-appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:attendance/preferences/professor-preferences.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:shared_preferences/shared_preferences.dart'; 4 | 5 | class ProfessorAppbar extends StatefulWidget { 6 | @override 7 | _ProfessorAppbarState createState() => new _ProfessorAppbarState(); 8 | } 9 | 10 | class _ProfessorAppbarState extends State { 11 | void _selectOptionMenu(Choice choice) { 12 | switch (choice.title) { 13 | case "Logout": 14 | _logout(); 15 | break; 16 | } 17 | } 18 | 19 | void _logout() async { 20 | SharedPreferences prefs = await SharedPreferences.getInstance(); 21 | prefs.remove(ProfessorPreferences.KEY_PROFESSOR_ID); 22 | prefs.remove(ProfessorPreferences.KEY_PROFESSOR_EMAIL); 23 | prefs.remove(ProfessorPreferences.KEY_PROFESSOR_NAME); 24 | prefs.remove(ProfessorPreferences.KEY_PROFESSOR_DEPTID); 25 | prefs.remove(ProfessorPreferences.KEY_PROFESSOR_ORGANIZATION_ID); 26 | 27 | Navigator.of(context).pop(true); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return new PopupMenuButton( 33 | // overflow menu 34 | onSelected: _selectOptionMenu, 35 | itemBuilder: (BuildContext context) { 36 | return choices.map((Choice choice) { 37 | return new PopupMenuItem( 38 | value: choice, 39 | child: new Text(choice.title), 40 | ); 41 | }).toList(); 42 | }, 43 | ); 44 | } 45 | } 46 | 47 | class Choice { 48 | const Choice({this.title}); 49 | 50 | final String title; 51 | } 52 | 53 | const List choices = const [ 54 | const Choice(title: 'Logout'), 55 | ]; 56 | -------------------------------------------------------------------------------- /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 | attendance 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /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 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | 25 | defaultConfig { 26 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 27 | applicationId "com.example.attendance" 28 | minSdkVersion 16 29 | targetSdkVersion 27 30 | versionCode 1 31 | versionName "1.0" 32 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 33 | } 34 | 35 | buildTypes { 36 | release { 37 | // TODO: Add your own signing config for the release build. 38 | // Signing with the debug keys for now, so `flutter run --release` works. 39 | signingConfig signingConfigs.debug 40 | } 41 | } 42 | } 43 | 44 | flutter { 45 | source '../..' 46 | } 47 | 48 | dependencies { 49 | testImplementation 'junit:junit:4.12' 50 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 51 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 52 | } 53 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 17 | 21 | 28 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/attendance/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.attendance; 2 | 3 | import android.os.Bundle; 4 | import android.content.Intent; 5 | import android.accounts.AccountManager; 6 | import android.provider.Settings.Secure; 7 | 8 | 9 | import io.flutter.app.FlutterActivity; 10 | import io.flutter.plugins.GeneratedPluginRegistrant; 11 | 12 | import io.flutter.app.FlutterActivity; 13 | import io.flutter.plugin.common.MethodCall; 14 | import io.flutter.plugin.common.MethodChannel; 15 | import io.flutter.plugins.GeneratedPluginRegistrant; 16 | 17 | public class MainActivity extends FlutterActivity { 18 | 19 | private static final String CHANNEL = "attendance.student"; 20 | MethodChannel.Result resultE; 21 | 22 | @Override 23 | protected void onCreate(Bundle savedInstanceState) { 24 | super.onCreate(savedInstanceState); 25 | GeneratedPluginRegistrant.registerWith(this); 26 | 27 | new MethodChannel(getFlutterView(), CHANNEL).setMethodCallHandler(new MethodChannel.MethodCallHandler() { 28 | @Override 29 | public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) { 30 | if (methodCall.method.equals("getStudentSelectedAccount")) { 31 | resultE = result; 32 | getStudentSelectedAccount(); 33 | 34 | } else if (methodCall.method.equals("getAndroidID")) { 35 | result.success(getAndroidID()); 36 | } else { 37 | result.notImplemented(); 38 | } 39 | } 40 | }); 41 | } 42 | 43 | private String getAndroidID() { 44 | return Secure.getString(this.getContentResolver(), 45 | Secure.ANDROID_ID); 46 | } 47 | 48 | private void getStudentSelectedAccount() { 49 | Intent intent = AccountManager.newChooseAccountIntent(null, null, 50 | new String[]{"com.google"}, true, null, null, 51 | null, null); 52 | startActivityForResult(intent, 111); 53 | } 54 | 55 | @Override 56 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 57 | 58 | switch (requestCode) { 59 | case 111: 60 | if (data != null) 61 | this.resultE.success(data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME)); 62 | break; 63 | } 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /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/dashboard.dart: -------------------------------------------------------------------------------- 1 | import 'package:attendance/components/student_appbar.dart'; 2 | import 'package:attendance/student/attendance-record.dart'; 3 | import 'package:attendance/student/courses-list.dart'; 4 | import 'package:attendance/student/attend-class.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class StudentDashboard extends StatefulWidget { 8 | @override 9 | _StudentDashboardState createState() => new _StudentDashboardState(); 10 | } 11 | 12 | class _StudentDashboardState extends State 13 | with SingleTickerProviderStateMixin { 14 | TabController _tabController; 15 | var _scaffoldContext; 16 | var _currrentIndex = 0; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | _tabController = new TabController(vsync: this, length: 3); 22 | _tabController.addListener(() { 23 | setState(() { 24 | _currrentIndex = _tabController.index; 25 | }); 26 | }); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | var _appBar = new AppBar( 32 | title: new Text("Student"), 33 | actions: [ 34 | new StudentAppbar(), 35 | ], 36 | ); 37 | 38 | return new Scaffold( 39 | appBar: _appBar, 40 | bottomNavigationBar: new BottomNavigationBar( 41 | items: [ 42 | new BottomNavigationBarItem( 43 | icon: const Icon(Icons.check_box), title: new Text("Attend")), 44 | new BottomNavigationBarItem( 45 | icon: const Icon(Icons.collections_bookmark), 46 | title: new Text("Courses")), 47 | new BottomNavigationBarItem( 48 | icon: const Icon(Icons.list), title: new Text("Record")), 49 | ], 50 | onTap: (int position) { 51 | _tabController.animateTo(position); 52 | }, 53 | type: BottomNavigationBarType.fixed, 54 | currentIndex: _currrentIndex, 55 | ), 56 | body: new Builder(builder: (BuildContext context) { 57 | _scaffoldContext = context; 58 | return new TabBarView( 59 | controller: _tabController, 60 | children: [ 61 | new AttendClass( 62 | scaffoldContext: _scaffoldContext, 63 | ), 64 | new CoursesList(), 65 | new AttendanceRecord(), 66 | ], 67 | ); 68 | })); 69 | } 70 | 71 | @override 72 | void dispose() { 73 | _tabController.dispose(); 74 | super.dispose(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: attendance 2 | description: A new Flutter project. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | barcodescanner: 8 | #this will be replaced with a proper dependency, once the plugin is release to dart-pub 9 | git: https://github.com/swissonid/BarcodeScannerPlugin.git 10 | shared_preferences: 0.3.3 11 | cached_network_image: ^0.3.0 12 | location: ^1.1.7 13 | image_picker: ^0.2.1 14 | font_awesome_flutter: 6.0.0 15 | connectivity: ^0.3.0 16 | device_info: ^0.2.0 17 | share: "^0.4.0" 18 | url_launcher: "^3.0.0" 19 | 20 | # The following adds the Cupertino Icons font to your application. 21 | # Use with the CupertinoIcons class for iOS style icons. 22 | cupertino_icons: ^0.1.0 23 | 24 | dev_dependencies: 25 | flutter_test: 26 | sdk: flutter 27 | 28 | 29 | 30 | # For information on the generic Dart part of this file, see the 31 | # following page: https://www.dartlang.org/tools/pub/pubspec 32 | 33 | # The following section is specific to Flutter. 34 | flutter: 35 | 36 | # The following line ensures that the Material Icons font is 37 | # included with your application, so that you can use the icons in 38 | # the material Icons class. 39 | uses-material-design: true 40 | 41 | # To add assets to your application, add an assets section, like this: 42 | assets: 43 | - images/professor.jpg 44 | - images/student.jpg 45 | - images/logo.png 46 | - images/navbackground.jpg 47 | - images/img_no_data.png 48 | 49 | # An image asset can refer to one or more resolution-specific "variants", see 50 | # https://flutter.io/assets-and-images/#resolution-aware. 51 | 52 | # For details regarding adding assets from package dependencies, see 53 | # https://flutter.io/assets-and-images/#from-packages 54 | 55 | # To add custom fonts to your application, add a fonts section here, 56 | # in this "flutter" section. Each entry in this list should have a 57 | # "family" key with the font family name, and a "fonts" key with a 58 | # list giving the asset and other descriptors for the font. For 59 | # example: 60 | # fonts: 61 | # - family: Schyler 62 | # fonts: 63 | # - asset: fonts/Schyler-Regular.ttf 64 | # - asset: fonts/Schyler-Italic.ttf 65 | # style: italic 66 | # - family: Trajan Pro 67 | # fonts: 68 | # - asset: fonts/TrajanPro.ttf 69 | # - asset: fonts/TrajanPro_Bold.ttf 70 | # weight: 700 71 | # 72 | # For details regarding fonts from package dependencies, 73 | # see https://flutter.io/custom-fonts/#from-packages 74 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner.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/components/professor-drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:attendance/preferences/professor-preferences.dart'; 2 | import 'package:attendance/professor/dashboard.dart'; 3 | import 'package:attendance/professor/view-sessions.dart'; 4 | import 'package:attendance/professor/view-students.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:cached_network_image/cached_network_image.dart'; 7 | import 'package:shared_preferences/shared_preferences.dart'; 8 | 9 | class ProfessorDrawer extends StatefulWidget { 10 | BuildContext currentState; 11 | 12 | ProfessorDrawer({this.currentState}); 13 | 14 | @override 15 | _ProfessorDrawerState createState() => new _ProfessorDrawerState(); 16 | } 17 | 18 | class _ProfessorDrawerState extends State { 19 | var name = "", email = ""; 20 | 21 | String currentProfilePic = 22 | "https://scontent-bom1-1.cdninstagram.com/vp/63a30cc70bdb9162cd44ee8d1659d087/5B290D9A/t51.2885-19/s150x150/28428337_2175166739416117_1436518324010745856_n.jpg"; 23 | 24 | _getProfessorData() async { 25 | SharedPreferences prefs = await SharedPreferences.getInstance(); 26 | setState(() { 27 | this.name = prefs.getString(ProfessorPreferences.KEY_PROFESSOR_NAME); 28 | this.email = prefs.getString(ProfessorPreferences.KEY_PROFESSOR_EMAIL); 29 | }); 30 | } 31 | 32 | @override 33 | void initState() { 34 | // TODO: implement initState 35 | super.initState(); 36 | 37 | _getProfessorData(); 38 | } 39 | 40 | void handleOntap(index) { 41 | switch (index) { 42 | case 0: 43 | if (widget.currentState.widget.toString() == "ProfessorDashboard") { 44 | Navigator.of(widget.currentState).pop(true); 45 | } else { 46 | Navigator.of(context).pushReplacement(new MaterialPageRoute( 47 | builder: (BuildContext context) => new ProfessorDashboard())); 48 | } 49 | break; 50 | case 1: 51 | if (widget.currentState.widget.toString() == "ViewStudents") { 52 | Navigator.of(widget.currentState).pop(true); 53 | } else { 54 | Navigator.of(context).pushReplacement(new MaterialPageRoute( 55 | builder: (BuildContext context) => new ViewStudents())); 56 | } 57 | break; 58 | case 2: 59 | if (widget.currentState.widget.toString() == "ViewSessions") { 60 | Navigator.of(widget.currentState).pop(true); 61 | } else { 62 | Navigator.of(context).pushReplacement(new MaterialPageRoute( 63 | builder: (BuildContext context) => new ViewSessions())); 64 | } 65 | break; 66 | } 67 | } 68 | 69 | @override 70 | Widget build(BuildContext context) { 71 | return new ListView( 72 | children: [ 73 | new UserAccountsDrawerHeader( 74 | accountName: new Text(this.name), 75 | accountEmail: new Text(this.email), 76 | currentAccountPicture: new GestureDetector( 77 | child: new CircleAvatar( 78 | backgroundImage: new CachedNetworkImageProvider(currentProfilePic), 79 | ), 80 | ), 81 | decoration: new BoxDecoration( 82 | image: new DecorationImage( 83 | fit: BoxFit.fill, 84 | image: new AssetImage("images/navbackground.jpg"), 85 | ), 86 | ), 87 | ), 88 | new ListTile( 89 | leading: new Icon(Icons.home), 90 | title: new Text("Dashboard"), 91 | onTap: () { 92 | handleOntap(0); 93 | }, 94 | ), 95 | new ListTile( 96 | leading: new Icon(Icons.person), 97 | title: new Text("View students"), 98 | onTap: () { 99 | handleOntap(1); 100 | }, 101 | ), 102 | new ListTile( 103 | leading: new Icon(Icons.ac_unit), 104 | title: new Text("All Sessions"), 105 | onTap: () { 106 | handleOntap(2); 107 | }, 108 | ), 109 | ], 110 | ); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/professor/view-students.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:attendance/components/professor-appbar.dart'; 5 | import 'package:attendance/components/professor-drawer.dart'; 6 | import 'package:attendance/config.dart'; 7 | import 'package:attendance/preferences/professor-preferences.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:cached_network_image/cached_network_image.dart'; 10 | import 'package:http/http.dart' as http; 11 | import 'package:shared_preferences/shared_preferences.dart'; 12 | 13 | class ViewStudents extends StatefulWidget { 14 | @override 15 | _ViewStudentsState createState() => new _ViewStudentsState(); 16 | } 17 | 18 | class _ViewStudentsState extends State { 19 | List data; 20 | var isLoading = false; 21 | 22 | getData() async { 23 | var response = await http.post( 24 | Uri.encodeFull(Config.professorViewStudentsUrl), 25 | headers: {"Accept": "application/json"}, 26 | body: {'organization_id': "1", 'department_id': "1"}); 27 | 28 | print("Success"); 29 | 30 | this.setState(() { 31 | data = JSON.decode(response.body)['data']; 32 | isLoading = false; 33 | }); 34 | } 35 | 36 | 37 | @override 38 | void initState() { 39 | this.setState(() { 40 | isLoading = true; 41 | }); 42 | this.getData(); 43 | } 44 | 45 | // simulate a http request 46 | Future _onRefresh() async{ 47 | Completer completer = new Completer(); 48 | 49 | setState(() { 50 | data == null; 51 | }); 52 | 53 | SharedPreferences prefs = await SharedPreferences.getInstance(); 54 | var organization_id = prefs.getInt(ProfessorPreferences.KEY_PROFESSOR_ORGANIZATION_ID); 55 | var department_id = prefs.getInt(ProfessorPreferences.KEY_PROFESSOR_DEPTID); 56 | 57 | var response = await http.post( 58 | Uri.encodeFull(Config.professorViewStudentsUrl), 59 | headers: {"Accept": "application/json"}, 60 | body: {'organization_id': organization_id.toString(), 'department_id': department_id.toString()}); 61 | 62 | print(response.body); 63 | 64 | this.setState(() { 65 | data = JSON.decode(response.body)['data']; 66 | completer.complete(); 67 | }); 68 | 69 | return completer.future; 70 | } 71 | 72 | @override 73 | Widget build(BuildContext context) { 74 | var _progressIndicator = new Center( 75 | child: new CircularProgressIndicator(), 76 | ); 77 | 78 | var _drawer = new Drawer( 79 | child: new ProfessorDrawer(currentState: context), 80 | ); 81 | 82 | var _appBar = new AppBar( 83 | title: new Text("View students"), 84 | actions: [ 85 | new ProfessorAppbar(), 86 | ], 87 | ); 88 | 89 | var _listViewBuilder = new ListView.builder( 90 | itemCount: data == null ? 0 : data.length, 91 | itemBuilder: (BuildContext context, int index) { 92 | return new Container( 93 | padding: new EdgeInsets.symmetric(horizontal: 5.0), 94 | child: new Card( 95 | child: new InkWell( 96 | onTap: () { 97 | print(data[index]['name']); 98 | }, 99 | child: new StudentRow( 100 | name: data[index]['name'], 101 | enrollment: data[index]['enrollment'], 102 | image: data[index]['image'], 103 | ), 104 | ), 105 | ), 106 | ); 107 | }, 108 | ); 109 | 110 | var refreshListner = 111 | new RefreshIndicator(child: _listViewBuilder, onRefresh: _onRefresh); 112 | 113 | return new Scaffold( 114 | appBar: _appBar, 115 | drawer: _drawer, 116 | body: isLoading ? _progressIndicator : refreshListner, 117 | ); 118 | } 119 | } 120 | 121 | class StudentRow extends StatelessWidget { 122 | StudentRow({this.name, this.enrollment, this.image}); 123 | 124 | final String name, enrollment, image; 125 | 126 | @override 127 | Widget build(BuildContext context) { 128 | return new Container( 129 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 130 | margin: const EdgeInsets.symmetric(vertical: 8.0), 131 | child: new Row( 132 | crossAxisAlignment: CrossAxisAlignment.start, 133 | children: [ 134 | new Container( 135 | margin: const EdgeInsets.only(right: 18.0), 136 | child: new CircleAvatar( 137 | child: new Container( 138 | decoration: new BoxDecoration( 139 | color: const Color(0xff7c94b6), 140 | image: new DecorationImage( 141 | image: new CachedNetworkImageProvider( 142 | Config.baseUrl + "/storage/student_images/" + image), 143 | ), 144 | borderRadius: new BorderRadius.all(new Radius.circular(80.0)), 145 | ), 146 | ), 147 | ), 148 | ), 149 | new Expanded( 150 | child: new Column( 151 | crossAxisAlignment: CrossAxisAlignment.start, 152 | children: [ 153 | new Text(this.name, style: Theme.of(context).textTheme.subhead), 154 | new Container( 155 | margin: const EdgeInsets.only(top: 6.0), 156 | child: new Text(this.enrollment), 157 | ) 158 | ], 159 | )) 160 | ], 161 | ), 162 | ); 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /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/login.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:attendance/config.dart'; 4 | import 'package:attendance/preferences/professor-preferences.dart'; 5 | import 'package:attendance/professor/dashboard.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:attendance/components/appbar.dart'; 8 | import 'package:flutter/services.dart'; 9 | import 'package:flutter/scheduler.dart'; 10 | import 'package:http/http.dart' as http; 11 | 12 | class LoginPage extends StatefulWidget { 13 | @override 14 | _LoginPageState createState() => new _LoginPageState(); 15 | } 16 | 17 | class _LoginPageState extends State { 18 | TextEditingController _emailController = new TextEditingController(); 19 | TextEditingController _passwordController = new TextEditingController(); 20 | 21 | var isProcessing = false; 22 | var message=""; 23 | var messageType = 0; 24 | 25 | // Make Http request to server for login professor 26 | // if result code is 200 then success and 27 | // replace navigator to professor dashboard 28 | // result code is 400 then failed login attempt 29 | tryLogin() async { 30 | 31 | 32 | 33 | if(_emailController.text.trim().isEmpty && 34 | _passwordController.text.trim().isEmpty){ 35 | return; 36 | } 37 | 38 | setState(() { 39 | isProcessing = true; 40 | }); 41 | 42 | var response = await http.post(Uri.encodeFull(Config.professorLoginUrl), 43 | headers: { 44 | "Accept": "application/json" 45 | }, 46 | body: { 47 | "email": _emailController.text.trim(), 48 | "password": _passwordController.text.trim() 49 | }); 50 | 51 | setState(() { 52 | isProcessing = false; 53 | }); 54 | 55 | print(response.body); 56 | 57 | var data = JSON.decode(response.body); 58 | 59 | if (data['resultCode'] == 200) { 60 | setState(() { 61 | this.messageType = 1; 62 | this.message = data['message']; 63 | }); 64 | 65 | new ProfessorPreferences().storeDataAtLogin(data); 66 | 67 | Navigator.of(context).pushReplacement(new MaterialPageRoute( 68 | builder: (BuildContext context) => new ProfessorDashboard())); 69 | } else { 70 | setState(() { 71 | this.messageType = 0; 72 | this.message = data['message']; 73 | }); 74 | } 75 | } 76 | 77 | @override 78 | Widget build(BuildContext context) { 79 | timeDilation = 2.0; // 1.0 means normal animation speed. 80 | 81 | 82 | final logo = new Hero( 83 | tag: 'professor-logo', 84 | child: new CircleAvatar( 85 | backgroundColor: Colors.transparent, 86 | radius: 48.0, 87 | child: new Image.asset('images/professor.jpg'), 88 | ), 89 | ); 90 | 91 | final email = new TextFormField( 92 | autocorrect: true, 93 | controller: _emailController, 94 | keyboardType: TextInputType.emailAddress, 95 | autofocus: false, 96 | decoration: new InputDecoration( 97 | hintText: 'Email', 98 | contentPadding: new EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), 99 | border: new OutlineInputBorder( 100 | borderRadius: new BorderRadius.circular(32.0)), 101 | ), 102 | ); 103 | 104 | 105 | 106 | final password = new TextFormField( 107 | controller: _passwordController, 108 | autofocus: false, 109 | obscureText: true, 110 | decoration: new InputDecoration( 111 | hintText: 'Password', 112 | contentPadding: new EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), 113 | border: new OutlineInputBorder( 114 | borderRadius: new BorderRadius.circular(32.0)), 115 | ), 116 | ); 117 | 118 | final loginButton = new Padding( 119 | padding: new EdgeInsets.symmetric(vertical: 16.0), 120 | child: new Material( 121 | borderRadius: new BorderRadius.circular(30.0), 122 | shadowColor: Colors.lightBlueAccent.shade100, 123 | elevation: 5.0, 124 | child: new MaterialButton( 125 | minWidth: 200.0, 126 | height: 42.0, 127 | onPressed: () { 128 | this.tryLogin(); 129 | }, 130 | color: Colors.lightBlueAccent, 131 | child: new Text('Log In', style: new TextStyle(color: Colors.white)), 132 | ), 133 | ), 134 | ); 135 | 136 | final forgotLabel = new FlatButton( 137 | child: new Text( 138 | 'Forgot password ?', 139 | style: new TextStyle(color: Colors.black54), 140 | ), 141 | onPressed: () {}, 142 | ); 143 | 144 | return new Scaffold( 145 | appBar: new MyAppBar().createAppbar("Professor login"), 146 | backgroundColor: Colors.white, 147 | body: new Center( 148 | child: new ListView( 149 | shrinkWrap: true, 150 | padding: new EdgeInsets.only(left: 24.0, right: 24.0), 151 | children: [ 152 | logo, 153 | new SizedBox(height: 48.0), 154 | email, 155 | new SizedBox(height: 8.0), 156 | password, 157 | new SizedBox(height: 24.0), 158 | new Center( 159 | child: isProcessing == true 160 | ? new CircularProgressIndicator() 161 | : new Text(this.message, 162 | style: this.messageType == 0 163 | ? new TextStyle(color: Colors.red) 164 | : new TextStyle(color: Colors.green)), 165 | ), 166 | new SizedBox(height: 24.0), 167 | loginButton, 168 | forgotLabel 169 | ], 170 | ), 171 | ), 172 | ); 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /lib/student/courses-list.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:attendance/config.dart'; 4 | import 'package:attendance/preferences/student-preferences.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'package:shared_preferences/shared_preferences.dart'; 8 | 9 | class CoursesList extends StatefulWidget { 10 | @override 11 | _CoursesListState createState() => new _CoursesListState(); 12 | } 13 | 14 | class _CoursesListState extends State { 15 | var data; 16 | var isLoading = false; 17 | 18 | getData() async { 19 | SharedPreferences prefs = await SharedPreferences.getInstance(); 20 | var departmentId = prefs.getInt(StudentPreferences.KEY_STUDENT_DEPTID); 21 | var studentId = prefs.getInt(StudentPreferences.KEY_STUDENT_ID); 22 | 23 | var response = await http.post(Uri.encodeFull(Config.getCoursesUrl), 24 | headers: { 25 | "Accept": "application/json" 26 | }, 27 | body: { 28 | 'department_id': departmentId.toString(), 29 | 'student_id': studentId.toString() 30 | }); 31 | 32 | setState(() { 33 | data = JSON.decode(response.body); 34 | isLoading = false; 35 | }); 36 | } 37 | 38 | @override 39 | void initState() { 40 | this.setState(() { 41 | isLoading = true; 42 | }); 43 | this.getData(); 44 | } 45 | 46 | @override 47 | void dispose() { 48 | // TODO: implement dispose 49 | super.dispose(); 50 | 51 | data = null; 52 | } 53 | 54 | @override 55 | Widget build(BuildContext context) { 56 | var _progressIndicator = new Center( 57 | child: new CircularProgressIndicator(), 58 | ); 59 | 60 | var _listRegisteredViewBuilder = new ListView.builder( 61 | itemCount: data == null 62 | ? 0 63 | : data['registered_courses'].length + 64 | data['unregistered_courses'].length, 65 | itemBuilder: (BuildContext context, int index) { 66 | return new Container( 67 | padding: new EdgeInsets.symmetric(horizontal: 5.0), 68 | child: new Card( 69 | child: index < data['registered_courses'].length 70 | ? new Courses( 71 | courseName: data['registered_courses'][index] 72 | ['course_name'], 73 | professorName: data['registered_courses'][index] 74 | ['professor']['name'], 75 | courseId: data['registered_courses'][index]['id'], 76 | type: true, 77 | ) 78 | : new Courses( 79 | courseName: data['unregistered_courses'] 80 | [index - data['registered_courses'].length] 81 | ['course_name'], 82 | professorName: data['unregistered_courses'] 83 | [index - data['registered_courses'].length] 84 | ['professor']['name'], 85 | courseId: data['unregistered_courses'] 86 | [index - data['registered_courses'].length]['id'], 87 | type: false, 88 | ), 89 | ), 90 | ); 91 | }, 92 | ); 93 | 94 | return isLoading ? _progressIndicator : _listRegisteredViewBuilder; 95 | } 96 | } 97 | 98 | class Courses extends StatefulWidget { 99 | Courses({this.courseId, this.courseName, this.professorName, this.type}); 100 | 101 | bool type; 102 | int courseId; 103 | String courseName, professorName; 104 | 105 | @override 106 | _CoursesState createState() => new _CoursesState(); 107 | } 108 | 109 | class _CoursesState extends State { 110 | registerCourse(id) async { 111 | 112 | setState(() { 113 | widget.type = true; 114 | }); 115 | 116 | SharedPreferences prefs = await SharedPreferences.getInstance(); 117 | var studentId = prefs.getInt(StudentPreferences.KEY_STUDENT_ID); 118 | 119 | var response = await http.post(Uri.encodeFull(Config.registerCoursesUrl), 120 | headers: {"Accept": "application/json"}, 121 | body: {'student_id': studentId.toString(), 'course_id': id.toString()}); 122 | } 123 | 124 | unregisterCourse(id) async { 125 | 126 | setState(() { 127 | widget.type = false; 128 | }); 129 | 130 | SharedPreferences prefs = await SharedPreferences.getInstance(); 131 | var studentId = prefs.getInt(StudentPreferences.KEY_STUDENT_ID); 132 | 133 | var response = await http.post(Uri.encodeFull(Config.unregisterCoursesUrl), 134 | headers: {"Accept": "application/json"}, 135 | body: {'student_id': studentId.toString(), 'course_id': id.toString()}); 136 | } 137 | 138 | @override 139 | Widget build(BuildContext context) { 140 | return new Container( 141 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 142 | margin: const EdgeInsets.symmetric(vertical: 8.0), 143 | child: new Row( 144 | crossAxisAlignment: CrossAxisAlignment.start, 145 | children: [ 146 | new Expanded( 147 | child: new ListTile( 148 | title: new Column( 149 | crossAxisAlignment: CrossAxisAlignment.start, 150 | children: [ 151 | new Text(widget.courseName, 152 | style: Theme.of(context).textTheme.subhead), 153 | new Container( 154 | margin: const EdgeInsets.only(top: 6.0), 155 | child: new Text(widget.professorName, 156 | style: new TextStyle(color: Colors.grey)), 157 | ) 158 | ], 159 | ), 160 | trailing: new FlatButton( 161 | onPressed: () { 162 | widget.type == true 163 | ? unregisterCourse(widget.courseId) 164 | : registerCourse(widget.courseId); 165 | }, 166 | child: new Text( 167 | widget.type == true ? "Remove" : "Register", 168 | style: new TextStyle( 169 | color: widget.type == true 170 | ? Colors.redAccent 171 | : Colors.blueAccent), 172 | ), 173 | ), 174 | ), 175 | ), 176 | ], 177 | ), 178 | ); 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /lib/professor/view-sessions.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:attendance/components/professor-appbar.dart'; 5 | import 'package:attendance/components/professor-drawer.dart'; 6 | import 'package:attendance/config.dart'; 7 | import 'package:attendance/preferences/professor-preferences.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:http/http.dart' as http; 10 | import 'package:shared_preferences/shared_preferences.dart'; 11 | import 'package:url_launcher/url_launcher.dart'; 12 | 13 | class ViewSessions extends StatefulWidget { 14 | @override 15 | _ViewSessionsState createState() => new _ViewSessionsState(); 16 | } 17 | 18 | class _ViewSessionsState extends State { 19 | List data; 20 | int current_page = 1; 21 | int lastpage; 22 | var isLoading = false, isLoadMore = false; 23 | 24 | DateTime selectedDateTime; 25 | String selectedDate = "", selectedCourse = ""; 26 | bool noDataFound = false; 27 | 28 | // Get student attendance data from server 29 | getData({bool isDateSelected: false, bool isCourseSelected: false}) async { 30 | if (isDateSelected || isCourseSelected) { 31 | setState(() { 32 | data = null; 33 | }); 34 | } 35 | 36 | SharedPreferences prefs = await SharedPreferences.getInstance(); 37 | var professorId = prefs.getInt(ProfessorPreferences.KEY_PROFESSOR_ID); 38 | 39 | var response = await http.post( 40 | Uri.encodeFull( 41 | Config.getAllSessionUrl + "?page=" + current_page.toString()), 42 | headers: { 43 | "Accept": "application/json" 44 | }, 45 | body: { 46 | 'professor_id': professorId.toString(), 47 | 'date': selectedDate 48 | }); 49 | 50 | var responseData = JSON.decode(response.body); 51 | 52 | print(response.body); 53 | 54 | setState(() { 55 | isLoading = false; 56 | 57 | if (data == null) { 58 | data = responseData['data']; 59 | lastpage = responseData['last_page']; 60 | 61 | if (data.length == 0) { 62 | noDataFound = true; 63 | return; 64 | } 65 | noDataFound = false; 66 | } else { 67 | isLoadMore = false; 68 | for (var i = 0; i < responseData['data'].length; i++) { 69 | data.add(responseData['data'][i]); 70 | } 71 | } 72 | }); 73 | } 74 | 75 | @override 76 | void initState() { 77 | this.setState(() { 78 | isLoading = true; 79 | }); 80 | this.getData(); 81 | } 82 | 83 | @override 84 | void dispose() { 85 | // TODO: implement dispose 86 | super.dispose(); 87 | 88 | setState(() { 89 | data = null; 90 | }); 91 | } 92 | 93 | _onNotification(value) { 94 | if (value is OverscrollNotification) { 95 | if (value.overscroll > 0 && current_page < lastpage) { 96 | setState(() { 97 | current_page++; 98 | isLoadMore = true; 99 | }); 100 | getData(); 101 | } 102 | } 103 | } 104 | 105 | // show date picker 106 | // when user select date, load data accordingly 107 | _showDatePicker() async { 108 | Future future = showDatePicker( 109 | context: context, 110 | firstDate: new DateTime(2018), 111 | initialDate: 112 | selectedDateTime != null ? selectedDateTime : new DateTime.now(), 113 | lastDate: new DateTime.now(), 114 | ); 115 | 116 | future.then((dateTime) { 117 | setState(() { 118 | selectedDate = dateTime.toIso8601String(); 119 | selectedDateTime = dateTime; 120 | isLoading = true; 121 | }); 122 | this.getData(isDateSelected: true); 123 | }).catchError((e) { 124 | print(e.message); 125 | }); 126 | } 127 | 128 | @override 129 | Widget build(BuildContext context) { 130 | var _progressIndicator = new Container( 131 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 132 | child: new Center( 133 | child: new CircularProgressIndicator(), 134 | ), 135 | ); 136 | 137 | var _listRegisteredViewBuilder = new NotificationListener( 138 | onNotification: (value) { 139 | _onNotification(value); 140 | }, 141 | child: new ListView.builder( 142 | scrollDirection: Axis.vertical, 143 | itemCount: 144 | data == null ? 0 : (isLoadMore ? data.length + 1 : data.length), 145 | itemBuilder: (BuildContext context, int index) { 146 | return new Container( 147 | padding: new EdgeInsets.symmetric(horizontal: 5.0), 148 | child: isLoadMore && index == data.length 149 | ? _progressIndicator 150 | : new Card( 151 | child: new Rows( 152 | courseName: data[index]['courses']['course_name'], 153 | sessionCode: data[index]['session_code'], 154 | createdAt:data[index]['created_at'], 155 | ), 156 | ), 157 | ); 158 | }, 159 | ), 160 | ); 161 | 162 | var _noDataFoundView = new Container( 163 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 164 | child: new Center( 165 | child: new Image.asset("images/img_no_data.png"), 166 | ), 167 | ); 168 | 169 | var _topButtons = new Container( 170 | child: new Column( 171 | children: [ 172 | new SizedBox(height: 24.0), 173 | new Row( 174 | crossAxisAlignment: CrossAxisAlignment.start, 175 | children: [ 176 | new FlatButton( 177 | onPressed: () { 178 | _showDatePicker(); 179 | }, 180 | child: new Icon( 181 | Icons.calendar_today, 182 | color: Colors.blueAccent, 183 | )), 184 | ]), 185 | new Expanded( 186 | child: noDataFound ? _noDataFoundView : _listRegisteredViewBuilder, 187 | ) 188 | ], 189 | ), 190 | ); 191 | 192 | var _drawer = new Drawer( 193 | child: new ProfessorDrawer(currentState: context), 194 | ); 195 | 196 | var _appBar = new AppBar( 197 | title: new Text("All Sessions"), 198 | actions: [ 199 | new ProfessorAppbar(), 200 | ], 201 | ); 202 | 203 | return new Scaffold( 204 | appBar: _appBar, 205 | drawer: _drawer, 206 | body: isLoading ? _progressIndicator : _topButtons, 207 | ); 208 | } 209 | } 210 | 211 | // Signle row design 212 | class Rows extends StatefulWidget { 213 | Rows({this.courseName, this.sessionCode, this.createdAt}); 214 | 215 | String courseName, sessionCode, createdAt; 216 | 217 | @override 218 | _RowsState createState() => new _RowsState(); 219 | } 220 | 221 | class _RowsState extends State { 222 | 223 | 224 | @override 225 | Widget build(BuildContext context) { 226 | return new Container( 227 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 228 | margin: const EdgeInsets.symmetric(vertical: 8.0), 229 | child: new Row( 230 | crossAxisAlignment: CrossAxisAlignment.start, 231 | children: [ 232 | new Expanded( 233 | child: new ListTile( 234 | title: new Column( 235 | crossAxisAlignment: CrossAxisAlignment.start, 236 | children: [ 237 | new Text(widget.courseName, 238 | style: Theme.of(context).textTheme.subhead), 239 | new Container( 240 | margin: const EdgeInsets.only(top: 6.0), 241 | child: new Text(widget.sessionCode, 242 | style: new TextStyle(color: Colors.grey)), 243 | ) 244 | ], 245 | ), 246 | trailing: new Text(widget.createdAt), 247 | ), 248 | ), 249 | ], 250 | ), 251 | ); 252 | } 253 | } 254 | -------------------------------------------------------------------------------- /lib/student/attendance-record.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:attendance/config.dart'; 5 | import 'package:attendance/preferences/student-preferences.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:http/http.dart' as http; 8 | import 'package:shared_preferences/shared_preferences.dart'; 9 | import 'package:url_launcher/url_launcher.dart'; 10 | 11 | class AttendanceRecord extends StatefulWidget { 12 | @override 13 | _CoursesListState createState() => new _CoursesListState(); 14 | } 15 | 16 | class _CoursesListState extends State { 17 | List data; 18 | int current_page = 1; 19 | int lastpage; 20 | var isLoading = false, isLoadMore = false; 21 | 22 | DateTime selectedDateTime; 23 | String selectedDate = "", selectedCourse = ""; 24 | bool noDataFound = false; 25 | 26 | // Get student attendance data from server 27 | getData({bool isDateSelected: false, bool isCourseSelected: false}) async { 28 | if (isDateSelected || isCourseSelected) { 29 | setState(() { 30 | data = null; 31 | }); 32 | } 33 | 34 | SharedPreferences prefs = await SharedPreferences.getInstance(); 35 | var studentId = prefs.getInt(StudentPreferences.KEY_STUDENT_ID); 36 | 37 | var response = await http.post( 38 | Uri.encodeFull( 39 | Config.getAttendanceRecordUrl + "?page=" + current_page.toString()), 40 | headers: { 41 | "Accept": "application/json" 42 | }, 43 | body: { 44 | 'student_id': studentId.toString(), 45 | 'course_id': selectedCourse, 46 | 'date': selectedDate 47 | }); 48 | 49 | var responseData = JSON.decode(response.body); 50 | 51 | print(response.body); 52 | 53 | setState(() { 54 | isLoading = false; 55 | 56 | if (data == null) { 57 | data = responseData['data']; 58 | 59 | if (data.length == 0) { 60 | noDataFound = true; 61 | return; 62 | } 63 | noDataFound = false; 64 | lastpage = responseData['last_page']; 65 | } else { 66 | isLoadMore = false; 67 | for (var i = 0; i < responseData['data'].length; i++) { 68 | data.add(responseData['data'][i]); 69 | } 70 | } 71 | }); 72 | } 73 | 74 | @override 75 | void initState() { 76 | this.setState(() { 77 | isLoading = true; 78 | }); 79 | this.getData(); 80 | } 81 | 82 | @override 83 | void dispose() { 84 | // TODO: implement dispose 85 | super.dispose(); 86 | 87 | setState(() { 88 | data = null; 89 | }); 90 | } 91 | 92 | _onNotification(value) { 93 | if (value is OverscrollNotification) { 94 | if (value.overscroll > 0 && current_page < lastpage) { 95 | setState(() { 96 | current_page++; 97 | isLoadMore = true; 98 | }); 99 | getData(); 100 | } 101 | } 102 | } 103 | 104 | // show date picker 105 | // when user select date, load data accordingly 106 | _showDatePicker() async { 107 | Future future = showDatePicker( 108 | context: context, 109 | firstDate: new DateTime(2018), 110 | initialDate: 111 | selectedDateTime != null ? selectedDateTime : new DateTime.now(), 112 | lastDate: new DateTime.now(), 113 | ); 114 | 115 | future.then((dateTime) { 116 | setState(() { 117 | selectedDate = dateTime.toIso8601String(); 118 | selectedDateTime = dateTime; 119 | isLoading = true; 120 | }); 121 | this.getData(isDateSelected: true); 122 | }).catchError((e) { 123 | print(e.message); 124 | }); 125 | } 126 | 127 | @override 128 | Widget build(BuildContext context) { 129 | var _progressIndicator = new Container( 130 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 131 | child: new Center( 132 | child: new CircularProgressIndicator(), 133 | ), 134 | ); 135 | 136 | var _listRegisteredViewBuilder = new NotificationListener( 137 | onNotification: (value) { 138 | _onNotification(value); 139 | }, 140 | child: new ListView.builder( 141 | scrollDirection: Axis.vertical, 142 | itemCount: 143 | data == null ? 0 : (isLoadMore ? data.length + 1 : data.length), 144 | itemBuilder: (BuildContext context, int index) { 145 | return new Container( 146 | padding: new EdgeInsets.symmetric(horizontal: 5.0), 147 | child: isLoadMore && index == data.length 148 | ? _progressIndicator 149 | : new Card( 150 | child: new Rows( 151 | courseName: data[index]['session']['courses'] 152 | ['course_name'], 153 | sessionCode: data[index]['session']['session_code'], 154 | latitude: data[index]['latitude'].toString(), 155 | longitude: data[index]['longitude'].toString(), 156 | ), 157 | ), 158 | ); 159 | }, 160 | ), 161 | ); 162 | 163 | var _noDataFoundView = new Container( 164 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 165 | child: new Center( 166 | child: new Image.asset("images/img_no_data.png"), 167 | ), 168 | ); 169 | 170 | var _topButtons = new Container( 171 | child: new Column( 172 | children: [ 173 | new SizedBox(height: 24.0), 174 | new Row( 175 | crossAxisAlignment: CrossAxisAlignment.start, 176 | children: [ 177 | new FlatButton( 178 | onPressed: () { 179 | _showDatePicker(); 180 | }, 181 | child: new Icon( 182 | Icons.calendar_today, 183 | color: Colors.blueAccent, 184 | )), 185 | ]), 186 | new Expanded( 187 | child: noDataFound ? _noDataFoundView : _listRegisteredViewBuilder, 188 | ) 189 | ], 190 | ), 191 | ); 192 | 193 | return isLoading ? _progressIndicator : _topButtons; 194 | } 195 | } 196 | 197 | // Signle row design 198 | class Rows extends StatefulWidget { 199 | Rows({this.courseName, this.sessionCode, this.latitude, this.longitude}); 200 | 201 | String courseName, sessionCode, latitude, longitude; 202 | 203 | @override 204 | _RowsState createState() => new _RowsState(); 205 | } 206 | 207 | class _RowsState extends State { 208 | // launch map with attendance latitude and longitude 209 | _launchMap() async { 210 | var url = "http://maps.google.com/maps?q=${widget.latitude},${widget 211 | .longitude}(" + 212 | "You were here" + 213 | ")&iwloc=A&hl=es"; 214 | if (await canLaunch(url)) { 215 | await launch(url); 216 | } else { 217 | throw 'Could not launch $url'; 218 | } 219 | } 220 | 221 | @override 222 | Widget build(BuildContext context) { 223 | return new Container( 224 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 225 | margin: const EdgeInsets.symmetric(vertical: 8.0), 226 | child: new Row( 227 | crossAxisAlignment: CrossAxisAlignment.start, 228 | children: [ 229 | new Expanded( 230 | child: new ListTile( 231 | title: new Column( 232 | crossAxisAlignment: CrossAxisAlignment.start, 233 | children: [ 234 | new Text(widget.courseName, 235 | style: Theme.of(context).textTheme.subhead), 236 | new Container( 237 | margin: const EdgeInsets.only(top: 6.0), 238 | child: new Text(widget.sessionCode, 239 | style: new TextStyle(color: Colors.grey)), 240 | ) 241 | ], 242 | ), 243 | trailing: new FlatButton( 244 | onPressed: () { 245 | _launchMap(); 246 | }, 247 | child: new Text( 248 | "View Location", 249 | style: new TextStyle(color: Colors.blueAccent), 250 | ), 251 | ), 252 | ), 253 | ), 254 | ], 255 | ), 256 | ); 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /lib/student/attend-class.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:shared_preferences/shared_preferences.dart'; 5 | import 'package:attendance/preferences/student-preferences.dart'; 6 | import 'package:location/location.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:barcodescanner/barcodescanner.dart'; 9 | import 'package:attendance/config.dart'; 10 | import 'package:attendance/common-functions.dart'; 11 | import 'package:cached_network_image/cached_network_image.dart'; 12 | import 'package:http/http.dart' as http; 13 | 14 | class AttendClass extends StatefulWidget { 15 | var scaffoldContext; 16 | AttendClass({this.scaffoldContext}); 17 | 18 | @override 19 | _AttendClassState createState() => new _AttendClassState(); 20 | } 21 | 22 | class _AttendClassState extends State { 23 | var email = ""; 24 | var enrollment = ""; 25 | var id = 0; 26 | 27 | var data; 28 | 29 | Map _currentLocation; 30 | StreamSubscription> _locationSubscription; 31 | Location _location = new Location(); 32 | 33 | TextEditingController _textController = new TextEditingController(); 34 | 35 | @override 36 | void initState() { 37 | super.initState(); 38 | getStudentData(); 39 | 40 | initPlatformState(); 41 | _locationSubscription = 42 | _location.onLocationChanged.listen((Map result) { 43 | setState(() { 44 | _currentLocation = result; 45 | }); 46 | }); 47 | } 48 | 49 | @override 50 | void dispose() { 51 | // TODO: implement dispose 52 | super.dispose(); 53 | _locationSubscription.cancel(); 54 | } 55 | 56 | 57 | 58 | 59 | // Platform messages are asynchronous, so we initialize in an async method. 60 | initPlatformState() async { 61 | Map location; 62 | // Platform messages may fail, so we use a try/catch PlatformException. 63 | 64 | try { 65 | location = await _location.getLocation; 66 | } on PlatformException { 67 | location = null; 68 | } 69 | 70 | // If the widget was removed from the tree while the asynchronous platform 71 | // message was in flight, we want to discard the reply rather than calling 72 | // setState to update our non-existent appearance. 73 | if (!mounted) return; 74 | 75 | setState(() { 76 | _currentLocation = location; 77 | }); 78 | } 79 | 80 | _btnAttendClick() async { 81 | if (_textController.text.isEmpty || _textController.text.length < 6) { 82 | showSnackBar("Please enter correct session code"); 83 | return; 84 | } 85 | 86 | print(_currentLocation['latitude'].toString() + 87 | " " + 88 | _currentLocation['longitude'].toString()); 89 | 90 | CommonFunctions.showProgressDialog(widget.scaffoldContext); 91 | 92 | var response = 93 | await http.post(Uri.encodeFull(Config.attendClassUrl), headers: { 94 | "Accept": "application/json" 95 | }, body: { 96 | 'student_id': this.id.toString(), 97 | 'session_code': _textController.text.trim(), 98 | 'latitude': _currentLocation['latitude'].toString(), 99 | 'longitude': _currentLocation['longitude'].toString() 100 | }); 101 | 102 | CommonFunctions.dismissDialog(widget.scaffoldContext); 103 | 104 | print(response.body); 105 | 106 | setState(() { 107 | data = JSON.decode(response.body); 108 | }); 109 | 110 | showSnackBar(data['message']); 111 | } 112 | 113 | getStudentData() async { 114 | SharedPreferences prefs = await SharedPreferences.getInstance(); 115 | email = prefs.getString(StudentPreferences.KEY_STUDENT_NAME); 116 | enrollment = prefs.getString(StudentPreferences.KEY_STUDENT_ENROLLMENT); 117 | id = prefs.getInt(StudentPreferences.KEY_STUDENT_ID); 118 | 119 | setState(() { 120 | this.email = email; 121 | this.enrollment = enrollment; 122 | this.id = id; 123 | }); 124 | } 125 | 126 | _scanBarcode() async { 127 | Future future = _startScan(); 128 | future.then((barcode) { 129 | print(barcode); 130 | }); 131 | } 132 | 133 | Future _startScan() async { 134 | Map barcodeData; 135 | try { 136 | //barcodeData is a JSON (Map) like this: 137 | //{barcode: '12345', barcodeFormat: 'ean-13'} 138 | barcodeData = await Barcodescanner.scanBarcode; 139 | print(barcodeData['barcode']); 140 | } on PlatformException { 141 | barcodeData = {'barcode': 'Could not scan barcode'}; 142 | } 143 | 144 | if (!mounted) return null; 145 | return barcodeData['barcode']; 146 | } 147 | 148 | showSnackBar(text) { 149 | Scaffold.of(widget.scaffoldContext).showSnackBar( 150 | new SnackBar( 151 | content: new Text(text), 152 | ), 153 | ); 154 | } 155 | 156 | @override 157 | Widget build(BuildContext context) { 158 | var _btnAttend = new RaisedButton( 159 | padding: new EdgeInsets.all(16.0), 160 | onPressed: () { 161 | _btnAttendClick(); 162 | }, 163 | elevation: 10.0, 164 | child: new Text( 165 | "Attend", 166 | style: new TextStyle(color: Colors.white), 167 | ), 168 | shape: new RoundedRectangleBorder( 169 | borderRadius: new BorderRadius.all( 170 | new Radius.circular(60.0), 171 | ), 172 | ), 173 | color: Colors.redAccent, 174 | ); 175 | 176 | var _btnScan = new RaisedButton( 177 | padding: new EdgeInsets.all(16.0), 178 | onPressed: () { 179 | _scanBarcode(); 180 | }, 181 | elevation: 10.0, 182 | child: new Text( 183 | "Scan", 184 | style: new TextStyle(color: Colors.white), 185 | ), 186 | shape: new RoundedRectangleBorder( 187 | borderRadius: new BorderRadius.all( 188 | new Radius.circular(60.0), 189 | ), 190 | ), 191 | color: Colors.redAccent, 192 | ); 193 | 194 | return new Center( 195 | child: new Container( 196 | margin: const EdgeInsets.symmetric(horizontal: 16.0), 197 | child: new Card( 198 | child: new ListView( 199 | shrinkWrap: true, 200 | padding: new EdgeInsets.only(left: 24.0, right: 24.0), 201 | children: [ 202 | new Container( 203 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 204 | decoration: new BoxDecoration( 205 | boxShadow: [ 206 | new BoxShadow( 207 | color: Colors.grey, 208 | offset: new Offset(0.0, 6.0), 209 | blurRadius: 20.0, 210 | ), 211 | ], 212 | color: Colors.blueAccent, 213 | borderRadius: new BorderRadius.all( 214 | new Radius.circular(10.0), 215 | ), 216 | ), 217 | child: new Row( 218 | crossAxisAlignment: CrossAxisAlignment.start, 219 | children: [ 220 | new Container( 221 | height: 60.0, 222 | width:60.0, 223 | margin: const EdgeInsets.fromLTRB(8.0,10.0,14.0,10.0), 224 | child: new CircleAvatar( 225 | child: new Container( 226 | decoration: new BoxDecoration( 227 | color: const Color(0xff7c94b6), 228 | image: new DecorationImage( 229 | image: new CachedNetworkImageProvider( 230 | Config.baseUrl + 231 | "/storage/student_images/"+enrollment+".jpg"), 232 | ), 233 | borderRadius: 234 | new BorderRadius.all(new Radius.circular(80.0)), 235 | ), 236 | ), 237 | ), 238 | ), 239 | new Expanded( 240 | child: new Column( 241 | crossAxisAlignment: CrossAxisAlignment.start, 242 | children: [ 243 | new Container( 244 | margin: const EdgeInsets.fromLTRB( 245 | 16.0, 16.0, 16.0, 8.0), 246 | child: new Text(email, 247 | style: new TextStyle(color: Colors.white)), 248 | ), 249 | new Container( 250 | margin: const EdgeInsets.fromLTRB( 251 | 16.0, 8.0, 16.0, 16.0), 252 | child: new Text(enrollment, 253 | style: new TextStyle(color: Colors.white)), 254 | ) 255 | ], 256 | ), 257 | ) 258 | ], 259 | ), 260 | ), 261 | new SizedBox(height: 48.0), 262 | new TextFormField( 263 | keyboardType: TextInputType.number, 264 | controller: _textController, 265 | decoration: 266 | new InputDecoration(labelText: "Enter Session Code"), 267 | ), 268 | new SizedBox(height: 8.0), 269 | new SizedBox(height: 24.0), 270 | _btnAttend, 271 | new SizedBox(height: 24.0), 272 | new Center( 273 | child: new Text( 274 | "OR", 275 | style: new TextStyle(fontWeight: FontWeight.bold), 276 | ), 277 | ), 278 | new SizedBox(height: 24.0), 279 | _btnScan, 280 | new SizedBox(height: 24.0), 281 | ], 282 | ), 283 | ), 284 | ), 285 | ); 286 | } 287 | } 288 | -------------------------------------------------------------------------------- /lib/homepage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:attendance/common-functions.dart'; 5 | import 'package:attendance/config.dart'; 6 | import 'package:attendance/login.dart'; 7 | import 'package:attendance/preferences/professor-preferences.dart'; 8 | import 'package:attendance/preferences/student-preferences.dart'; 9 | import 'package:attendance/professor/dashboard.dart'; 10 | import 'package:attendance/student/dashboard.dart'; 11 | import 'package:flutter/material.dart'; 12 | import 'package:attendance/components/appbar.dart'; 13 | import 'package:flutter/services.dart'; 14 | import 'package:http/http.dart' as http; 15 | import 'package:shared_preferences/shared_preferences.dart'; 16 | 17 | class MyHomePage extends StatefulWidget { 18 | @override 19 | _MyHomePageState createState() => new _MyHomePageState(); 20 | } 21 | 22 | class _MyHomePageState extends State { 23 | var data; 24 | var androidID; 25 | var _scaffoldContext, context; 26 | static const platform = const MethodChannel('attendance.student'); 27 | 28 | TextStyle btnLable = new TextStyle( 29 | color: Colors.white, fontSize: 20.0, fontWeight: FontWeight.w900); 30 | 31 | /* 32 | * 33 | * 34 | * 35 | * Open professor login page 36 | * 37 | * 38 | * 39 | * 40 | */ 41 | openProfessorLoginpage() async { 42 | SharedPreferences prefs = await SharedPreferences.getInstance(); 43 | 44 | if (prefs.getInt(ProfessorPreferences.KEY_PROFESSOR_ID) != null) { 45 | Navigator.of(context).push( 46 | new MaterialPageRoute(builder: (_) => new ProfessorDashboard())); 47 | } else { 48 | Navigator 49 | .of(context) 50 | .push(new MaterialPageRoute(builder: (_) => new LoginPage())); 51 | } 52 | } 53 | 54 | /* 55 | * 56 | * 57 | * 58 | * 59 | * open dialog to select gmail accounts 60 | * 61 | * Get selected gmail account by student 62 | * 63 | * 64 | * 65 | * 66 | */ 67 | Future _getStudentSelectedAccount() async { 68 | String result = ""; 69 | 70 | try { 71 | result = await platform.invokeMethod('getStudentSelectedAccount'); 72 | } on PlatformException catch (e) { 73 | print("Failed to get battery level: '${e.message}'."); 74 | } 75 | 76 | return result; 77 | } 78 | 79 | /* 80 | * 81 | * 82 | * 83 | * Get android id from custom plugin 84 | * 85 | * 86 | * 87 | */ 88 | Future _getAndroidID() async { 89 | String result = ""; 90 | 91 | try { 92 | result = await platform.invokeMethod('getAndroidID'); 93 | } on PlatformException catch (e) { 94 | print("Failed to get battery level: '${e.message}'."); 95 | } 96 | 97 | return result; 98 | } 99 | 100 | /* 101 | * 102 | * 103 | * 104 | * 105 | * 106 | * 107 | * 108 | * Check if student status is active or deactive 109 | * 110 | * if student status is active then Route to student dashboard 111 | * 112 | * otherwise display message in snackbar 113 | * 114 | * 115 | * 116 | * 117 | * 118 | * 119 | * 120 | */ 121 | checkStudentStatus(id) async { 122 | CommonFunctions.showProgressDialog(_scaffoldContext); 123 | 124 | var response = await http.post(Uri.encodeFull(Config.checkStudentStatusUrl), 125 | headers: {"Accept": "application/json"}, 126 | body: {'student_id': id.toString()}); 127 | 128 | CommonFunctions.dismissDialog(_scaffoldContext); 129 | await new Future.delayed(const Duration(milliseconds: 500)); 130 | 131 | data = JSON.decode(response.body); 132 | 133 | if (data['resultCode'] != 200) { 134 | Scaffold 135 | .of(_scaffoldContext) 136 | .showSnackBar(new SnackBar(content: new Text(data['message']))); 137 | } 138 | 139 | Navigator 140 | .of(context) 141 | .pushReplacement(new MaterialPageRoute(builder: (_) => new StudentDashboard())); 142 | } 143 | 144 | /* 145 | * 146 | * 147 | * 148 | * 149 | * 150 | * 151 | * check if student id is already saved or not 152 | * 153 | * if student id is already stored, then check student status 154 | * 155 | * otherwise open dialog to choose account 156 | * 157 | * Student will select account and then make http request along with android ID 158 | * 159 | * 160 | * 161 | * 162 | * 163 | * 164 | */ 165 | openStudentLoginPage() async { 166 | Future future_student = StudentPreferences.getStudentId(); 167 | 168 | future_student.then((value) { 169 | if (value != null) { 170 | checkStudentStatus(value); 171 | return; 172 | } 173 | 174 | Future selectedAccount = _getStudentSelectedAccount(); 175 | Future androidID = _getAndroidID(); 176 | 177 | androidID.then((value) { 178 | this.androidID = value; 179 | }).catchError((error) => (error) {}); 180 | 181 | selectedAccount 182 | .then((value) => _storeStudentData(value)) 183 | .catchError((error) => (error) {}); 184 | }); 185 | } 186 | 187 | /* 188 | * 189 | * 190 | * 191 | * 192 | * 193 | * 194 | * Get android ID and selected account by student 195 | * 196 | * Make HTTP request to store in database at first time 197 | * 198 | * 199 | * 200 | * 201 | */ 202 | void _storeStudentData(selectedAccount) async { 203 | if (selectedAccount != null && androidID != null) { 204 | CommonFunctions.showProgressDialog(_scaffoldContext); 205 | 206 | var response = await http.post(Uri.encodeFull(Config.storeStudentDataUrl), 207 | headers: {"Accept": "application/json"}, 208 | body: {'student_email': selectedAccount, 'android_id': androidID}); 209 | 210 | CommonFunctions.dismissDialog(_scaffoldContext); 211 | await new Future.delayed(const Duration(milliseconds: 500)); 212 | 213 | this.setState(() { 214 | data = JSON.decode(response.body); 215 | }); 216 | 217 | handleStudentData(); 218 | } 219 | } 220 | 221 | /* 222 | * 223 | * 224 | * 225 | * 226 | * 227 | * 228 | * 229 | * Check if student data is correct 230 | * 231 | * If it is correct, save in shared preferences 232 | * 233 | * Otherwise, display message from server 234 | * 235 | * 236 | * 237 | * 238 | * 239 | * 240 | */ 241 | void handleStudentData() { 242 | if (data['resultCode'] != 200) { 243 | Scaffold 244 | .of(_scaffoldContext) 245 | .showSnackBar(new SnackBar(content: new Text(data['message']))); 246 | return; 247 | } 248 | 249 | if (data['data']['status'] != 1) { 250 | Scaffold.of(_scaffoldContext).showSnackBar(new SnackBar( 251 | content: new Text( 252 | "Your account has been deactivated by organization admin"))); 253 | return; 254 | } 255 | 256 | new StudentPreferences().storeDataAtLogin(data); 257 | Navigator 258 | .of(context) 259 | .pushReplacement(new MaterialPageRoute(builder: (_) => new StudentDashboard())); 260 | } 261 | 262 | /* 263 | * 264 | * 265 | * 266 | * 267 | * 268 | * 269 | * 270 | * 271 | * 272 | * 273 | * 274 | * 275 | * 276 | */ 277 | 278 | @override 279 | Widget build(BuildContext context) { 280 | this.context = context; 281 | 282 | final professorLogo = new Hero( 283 | tag: 'professor-logo', 284 | child: new CircleAvatar( 285 | child: new Container( 286 | width: 150.0, 287 | height: 150.0, 288 | decoration: new BoxDecoration( 289 | color: const Color(0xff7c94b6), 290 | image: new DecorationImage( 291 | image: new AssetImage("images/professor.jpg"), 292 | ), 293 | borderRadius: new BorderRadius.all(new Radius.circular(80.0)), 294 | )), 295 | ), 296 | ); 297 | 298 | final studentLogo = new Hero( 299 | tag: 'student-logo', 300 | child: new CircleAvatar( 301 | child: new Container( 302 | width: 150.0, 303 | height: 150.0, 304 | decoration: new BoxDecoration( 305 | color: const Color(0xff7c94b6), 306 | image: new DecorationImage( 307 | image: new AssetImage("images/student.jpg"), 308 | ), 309 | borderRadius: new BorderRadius.all(new Radius.circular(80.0)), 310 | ), 311 | ), 312 | ), 313 | ); 314 | 315 | return new Scaffold( 316 | appBar: new MyAppBar().createAppbar("Attendee"), 317 | body: new Builder( 318 | builder: (BuildContext context) { 319 | _scaffoldContext = context; 320 | 321 | return new Container( 322 | decoration: new BoxDecoration( 323 | gradient: new LinearGradient( 324 | begin: Alignment.topCenter, 325 | end: new Alignment(1.0, 5.0), 326 | // 10% of the width, so there are ten blinds. 327 | colors: [Colors.white, Colors.blueAccent], // whitish to gray 328 | ), 329 | ), 330 | child: new Column( 331 | crossAxisAlignment: CrossAxisAlignment.stretch, 332 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 333 | children: [ 334 | new Column( 335 | children: [ 336 | new Container( 337 | width: 150.0, 338 | height: 150.0, 339 | child: professorLogo, 340 | margin: const EdgeInsets.all(16.0), 341 | ), 342 | ], 343 | ), 344 | new Container( 345 | child: new RaisedButton( 346 | padding: new EdgeInsets.all(16.0), 347 | color: Colors.blueAccent, 348 | elevation: 20.0, 349 | onPressed: () { 350 | openProfessorLoginpage(); 351 | }, 352 | child: new Text("I am Professor", style: btnLable), 353 | shape: new RoundedRectangleBorder( 354 | borderRadius: 355 | new BorderRadius.all(new Radius.circular(60.0))), 356 | ), 357 | margin: new EdgeInsets.only( 358 | bottom: 16.0, left: 16.0, right: 16.0), 359 | ), 360 | new Column( 361 | children: [ 362 | new Container( 363 | width: 150.0, 364 | height: 150.0, 365 | child: studentLogo, 366 | margin: const EdgeInsets.all(16.0), 367 | ), 368 | ], 369 | ), 370 | new Container( 371 | child: new RaisedButton( 372 | padding: new EdgeInsets.all(16.0), 373 | color: Colors.blueAccent, 374 | elevation: 20.0, 375 | onPressed: () { 376 | openStudentLoginPage(); 377 | }, 378 | child: new Text("I am Student", style: btnLable), 379 | shape: new RoundedRectangleBorder( 380 | borderRadius: 381 | new BorderRadius.all(new Radius.circular(60.0))), 382 | ), 383 | margin: new EdgeInsets.only( 384 | bottom: 16.0, left: 16.0, right: 16.0), 385 | ), 386 | ], 387 | ), 388 | ); 389 | }, 390 | ), 391 | ); 392 | } 393 | } 394 | -------------------------------------------------------------------------------- /lib/professor/dashboard.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:http/http.dart' as http; 5 | import 'package:flutter/services.dart'; 6 | import 'package:attendance/components/professor-appbar.dart'; 7 | import 'package:attendance/components/professor-drawer.dart'; 8 | import 'package:attendance/config.dart'; 9 | import 'package:location/location.dart'; 10 | import 'package:shared_preferences/shared_preferences.dart'; 11 | import 'package:attendance/preferences/professor-preferences.dart'; 12 | import 'package:flutter/material.dart'; 13 | 14 | var _scaffoldContext; 15 | 16 | class ProfessorDashboard extends StatefulWidget { 17 | @override 18 | _ProfessorDashboardState createState() => new _ProfessorDashboardState(); 19 | } 20 | 21 | List recentSessionData; 22 | 23 | class _ProfessorDashboardState extends State { 24 | final GlobalKey _scaffoldKey = new GlobalKey(); 25 | 26 | List coursesData; 27 | bool noDataFound = false; 28 | var isLoading = false; 29 | 30 | Map _currentLocation; 31 | StreamSubscription> _locationSubscription; 32 | Location _location = new Location(); 33 | 34 | /* 35 | * Get recent 5 session record of professor that has been created 36 | * By Logged in professor 37 | */ 38 | void getRecentSessionData() async { 39 | SharedPreferences prefs = await SharedPreferences.getInstance(); 40 | var professorId = prefs.getInt(ProfessorPreferences.KEY_PROFESSOR_ID); 41 | 42 | var response = await http.post(Uri.encodeFull(Config.getRecentSessionUrl), 43 | headers: {"Accept": "application/json"}, 44 | body: {'professor_id': professorId.toString()}); 45 | 46 | var responseData = JSON.decode(response.body); 47 | 48 | setState(() { 49 | recentSessionData = responseData; 50 | isLoading = false; 51 | 52 | if (recentSessionData != null && recentSessionData.length == 0) { 53 | noDataFound = true; 54 | return; 55 | } 56 | noDataFound = false; 57 | }); 58 | } 59 | 60 | /* 61 | * Get all courses in which professor is assigned 62 | * and display in Dialog when professor create a new session 63 | */ 64 | void getCourses() async { 65 | SharedPreferences prefs = await SharedPreferences.getInstance(); 66 | var professorId = prefs.getInt(ProfessorPreferences.KEY_PROFESSOR_ID); 67 | 68 | var response = await http.post( 69 | Uri.encodeFull(Config.getAllCoursesOfProfessorUrl), 70 | headers: {"Accept": "application/json"}, 71 | body: {'professor_id': professorId.toString()}); 72 | 73 | var responseData = JSON.decode(response.body); 74 | 75 | setState(() { 76 | coursesData = responseData; 77 | }); 78 | } 79 | 80 | /* 81 | * Create new session for selected course_id 82 | * get location of professor and pass in params 83 | */ 84 | void generateSession(courseId) async { 85 | _scaffoldKey.currentState 86 | .showSnackBar(new SnackBar(content: new Text('Generating Session...'))); 87 | 88 | SharedPreferences prefs = await SharedPreferences.getInstance(); 89 | var professorId = prefs.getInt(ProfessorPreferences.KEY_PROFESSOR_ID); 90 | 91 | var response = 92 | await http.post(Uri.encodeFull(Config.createNewSessionUrl), headers: { 93 | "Accept": "application/json" 94 | }, body: { 95 | 'professor_id': professorId.toString(), 96 | 'course_id': courseId, 97 | 'latitude': _currentLocation['latitude'].toString(), 98 | 'longitude': _currentLocation['longitude'].toString() 99 | }); 100 | 101 | var responseData = JSON.decode(response.body); 102 | if (responseData['resultCode'] == 200) { 103 | this.setState(() { 104 | isLoading = true; 105 | }); 106 | getRecentSessionData(); 107 | return; 108 | } 109 | 110 | _scaffoldKey.currentState.showSnackBar( 111 | new SnackBar(content: new Text('Something went wrong !'))); 112 | } 113 | 114 | void showCoursesDialog(_courseList) async { 115 | showDialog( 116 | context: _scaffoldKey.currentContext, 117 | child: new Dialog( 118 | child: new Column( 119 | mainAxisSize: MainAxisSize.min, 120 | crossAxisAlignment: CrossAxisAlignment.start, 121 | children: [ 122 | new Padding( 123 | padding: const EdgeInsets.all(20.0), 124 | child: new Text( 125 | "Select course", 126 | style: 127 | new TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0), 128 | ), 129 | ), 130 | new Container(height: 200.0, child: _courseList), 131 | ], 132 | ), 133 | ), 134 | ).then((value) { 135 | // The value passed to Navigator.pop() or null. 136 | if (value != null) { 137 | generateSession(value.toString()); 138 | } 139 | }); 140 | } 141 | 142 | @override 143 | void initState() { 144 | super.initState(); 145 | this.setState(() { 146 | isLoading = true; 147 | }); 148 | this.getCourses(); 149 | this.getRecentSessionData(); 150 | 151 | initPlatformState(); 152 | _locationSubscription = 153 | _location.onLocationChanged.listen((Map result) { 154 | setState(() { 155 | _currentLocation = result; 156 | }); 157 | }); 158 | } 159 | 160 | @override 161 | void dispose() { 162 | // TODO: implement dispose 163 | super.dispose(); 164 | _locationSubscription.cancel(); 165 | } 166 | 167 | // Platform messages are asynchronous, so we initialize in an async method. 168 | initPlatformState() async { 169 | Map location; 170 | // Platform messages may fail, so we use a try/catch PlatformException. 171 | 172 | try { 173 | location = await _location.getLocation; 174 | } on PlatformException { 175 | location = null; 176 | } 177 | 178 | // If the widget was removed from the tree while the asynchronous platform 179 | // message was in flight, we want to discard the reply rather than calling 180 | // setState to update our non-existent appearance. 181 | if (!mounted) return; 182 | 183 | setState(() { 184 | _currentLocation = location; 185 | }); 186 | } 187 | 188 | @override 189 | Widget build(BuildContext context) { 190 | var _drawer = new Drawer( 191 | child: new ProfessorDrawer(currentState: context), 192 | ); 193 | 194 | var _appBar = new AppBar( 195 | title: new Text("Dashboard"), 196 | actions: [ 197 | new ProfessorAppbar(), 198 | ], 199 | ); 200 | 201 | var _progressIndicator = new Container( 202 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 203 | child: new Center( 204 | child: new CircularProgressIndicator(), 205 | ), 206 | ); 207 | 208 | var _noDataFoundView = new Container( 209 | padding: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 210 | child: new Center( 211 | child: new Image.asset("images/img_no_data.png"), 212 | ), 213 | ); 214 | 215 | var _courseList = new ListView.builder( 216 | scrollDirection: Axis.vertical, 217 | itemCount: coursesData == null ? 0 : coursesData.length, 218 | itemBuilder: (BuildContext context, int index) { 219 | return new CourseItem( 220 | text: coursesData[index]['course_name'], 221 | onPressed: () { 222 | Navigator.pop(context, coursesData[index]['id']); 223 | }, 224 | ); 225 | }, 226 | ); 227 | 228 | var _listRegisteredViewBuilder = new ListView.builder( 229 | scrollDirection: Axis.vertical, 230 | itemCount: recentSessionData == null ? 0 : recentSessionData.length, 231 | itemBuilder: (BuildContext context, int index) { 232 | return new Container( 233 | padding: new EdgeInsets.symmetric(horizontal: 5.0), 234 | child: new Card( 235 | child: new Rows( 236 | index: index, 237 | sessionId: recentSessionData[index]['id'], 238 | courseName: recentSessionData[index]['courses']['course_name'], 239 | sessionCode: recentSessionData[index]['session_code'], 240 | status: recentSessionData[index]['status'], 241 | ), 242 | ), 243 | ); 244 | }, 245 | ); 246 | 247 | var _btnGenerateSession = new Container( 248 | child: new RaisedButton( 249 | padding: new EdgeInsets.all(16.0), 250 | color: Colors.white, 251 | elevation: 6.0, 252 | onPressed: () { 253 | showCoursesDialog(_courseList); 254 | }, 255 | child: new Text("Create new session"), 256 | shape: new RoundedRectangleBorder( 257 | borderRadius: new BorderRadius.all(new Radius.circular(60.0))), 258 | ), 259 | margin: new EdgeInsets.only(bottom: 16.0, left: 16.0, right: 16.0), 260 | ); 261 | 262 | return new Scaffold( 263 | key: _scaffoldKey, 264 | appBar: _appBar, 265 | drawer: _drawer, 266 | body: new Builder(builder: (BuildContext context) { 267 | _scaffoldContext = context; 268 | return new Container( 269 | child: new Column( 270 | crossAxisAlignment: CrossAxisAlignment.stretch, 271 | children: [ 272 | new SizedBox(height: 24.0), 273 | _btnGenerateSession, 274 | new Container( 275 | margin: const EdgeInsets.fromLTRB(16.0, 8.0, 16.0, 8.0), 276 | child: new Text( 277 | "Recent sessions", 278 | style: new TextStyle( 279 | fontSize: 16.0, 280 | fontWeight: FontWeight.bold, 281 | color: Colors.blueAccent), 282 | ), 283 | ), 284 | new Expanded( 285 | child: isLoading 286 | ? _progressIndicator 287 | : noDataFound 288 | ? _noDataFoundView 289 | : _listRegisteredViewBuilder, 290 | ) 291 | ], 292 | ), 293 | ); 294 | }), 295 | ); 296 | } 297 | } 298 | 299 | class Rows extends StatefulWidget { 300 | Rows({this.index, this.sessionId, this.status, this.sessionCode, this.courseName}); 301 | 302 | var index, sessionId, status, sessionCode, courseName; 303 | 304 | @override 305 | _RowsState createState() => new _RowsState(); 306 | } 307 | 308 | class _RowsState extends State { 309 | // chnage session status to active/deactive 310 | void changeSessionStatus() async { 311 | setState(() { 312 | if (widget.status == 1) { 313 | recentSessionData[widget.index]['status'] = 0; 314 | widget.status = 0; 315 | return; 316 | } 317 | recentSessionData[widget.index]['status'] = 1; 318 | widget.status = 1; 319 | }); 320 | 321 | var response = await http.post( 322 | Uri.encodeFull(Config.changeSessionStatusUrl), 323 | headers: {"Accept": "application/json"}, 324 | body: {'session_id': widget.sessionId.toString()}); 325 | } 326 | 327 | @override 328 | Widget build(BuildContext context) { 329 | return new Container( 330 | margin: const EdgeInsets.symmetric(vertical: 8.0), 331 | child: new Row( 332 | crossAxisAlignment: CrossAxisAlignment.start, 333 | children: [ 334 | new Expanded( 335 | child: new ListTile( 336 | title: new Text(widget.courseName, 337 | style: Theme.of(context).textTheme.subhead), 338 | subtitle: new Text(widget.sessionCode, 339 | style: new TextStyle(color: Colors.grey)), 340 | trailing: new FlatButton( 341 | onPressed: () { 342 | changeSessionStatus(); 343 | }, 344 | child: new Text( 345 | widget.status == 1 ? "Stop" : "Start", 346 | style: new TextStyle( 347 | color: widget.status == 1 348 | ? Colors.redAccent 349 | : Colors.blueAccent), 350 | ), 351 | ), 352 | ), 353 | ), 354 | ], 355 | ), 356 | ); 357 | } 358 | } 359 | 360 | class CourseItem extends StatelessWidget { 361 | const CourseItem({Key key, this.text, this.onPressed}) : super(key: key); 362 | 363 | final String text; 364 | final VoidCallback onPressed; 365 | 366 | @override 367 | Widget build(BuildContext context) { 368 | return new SimpleDialogOption( 369 | onPressed: onPressed, 370 | child: new Row( 371 | mainAxisAlignment: MainAxisAlignment.start, 372 | crossAxisAlignment: CrossAxisAlignment.center, 373 | children: [ 374 | new Padding( 375 | padding: const EdgeInsets.all(10.0), 376 | child: new Text(text), 377 | ), 378 | ], 379 | ), 380 | ); 381 | } 382 | } 383 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See http://pub.dartlang.org/doc/glossary.html#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.31.1" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.3.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.4" 25 | barback: 26 | dependency: transitive 27 | description: 28 | name: barback 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "0.15.2+14" 32 | barcodescanner: 33 | dependency: "direct main" 34 | description: 35 | path: "." 36 | ref: HEAD 37 | resolved-ref: "00e3c8dc1fe25aa115d790d5c0afd7f4dec59aec" 38 | url: "https://github.com/swissonid/BarcodeScannerPlugin.git" 39 | source: git 40 | version: "0.0.0" 41 | boolean_selector: 42 | dependency: transitive 43 | description: 44 | name: boolean_selector 45 | url: "https://pub.dartlang.org" 46 | source: hosted 47 | version: "1.0.2" 48 | cached_network_image: 49 | dependency: "direct main" 50 | description: 51 | name: cached_network_image 52 | url: "https://pub.dartlang.org" 53 | source: hosted 54 | version: "0.3.0" 55 | charcode: 56 | dependency: transitive 57 | description: 58 | name: charcode 59 | url: "https://pub.dartlang.org" 60 | source: hosted 61 | version: "1.1.1" 62 | cli_util: 63 | dependency: transitive 64 | description: 65 | name: cli_util 66 | url: "https://pub.dartlang.org" 67 | source: hosted 68 | version: "0.1.2+1" 69 | collection: 70 | dependency: transitive 71 | description: 72 | name: collection 73 | url: "https://pub.dartlang.org" 74 | source: hosted 75 | version: "1.14.5" 76 | connectivity: 77 | dependency: "direct main" 78 | description: 79 | name: connectivity 80 | url: "https://pub.dartlang.org" 81 | source: hosted 82 | version: "0.3.0" 83 | convert: 84 | dependency: transitive 85 | description: 86 | name: convert 87 | url: "https://pub.dartlang.org" 88 | source: hosted 89 | version: "2.0.1" 90 | crypto: 91 | dependency: transitive 92 | description: 93 | name: crypto 94 | url: "https://pub.dartlang.org" 95 | source: hosted 96 | version: "2.0.2+1" 97 | csslib: 98 | dependency: transitive 99 | description: 100 | name: csslib 101 | url: "https://pub.dartlang.org" 102 | source: hosted 103 | version: "0.14.1" 104 | cupertino_icons: 105 | dependency: "direct main" 106 | description: 107 | name: cupertino_icons 108 | url: "https://pub.dartlang.org" 109 | source: hosted 110 | version: "0.1.1" 111 | device_info: 112 | dependency: "direct main" 113 | description: 114 | name: device_info 115 | url: "https://pub.dartlang.org" 116 | source: hosted 117 | version: "0.2.0" 118 | flutter: 119 | dependency: "direct main" 120 | description: flutter 121 | source: sdk 122 | version: "0.0.0" 123 | flutter_cache_manager: 124 | dependency: transitive 125 | description: 126 | name: flutter_cache_manager 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "0.0.4+1" 130 | flutter_test: 131 | dependency: "direct dev" 132 | description: flutter 133 | source: sdk 134 | version: "0.0.0" 135 | font_awesome_flutter: 136 | dependency: "direct main" 137 | description: 138 | name: font_awesome_flutter 139 | url: "https://pub.dartlang.org" 140 | source: hosted 141 | version: "6.0.0" 142 | front_end: 143 | dependency: transitive 144 | description: 145 | name: front_end 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "0.1.0-alpha.9" 149 | glob: 150 | dependency: transitive 151 | description: 152 | name: glob 153 | url: "https://pub.dartlang.org" 154 | source: hosted 155 | version: "1.1.5" 156 | html: 157 | dependency: transitive 158 | description: 159 | name: html 160 | url: "https://pub.dartlang.org" 161 | source: hosted 162 | version: "0.13.2+2" 163 | http: 164 | dependency: transitive 165 | description: 166 | name: http 167 | url: "https://pub.dartlang.org" 168 | source: hosted 169 | version: "0.11.3+16" 170 | http_multi_server: 171 | dependency: transitive 172 | description: 173 | name: http_multi_server 174 | url: "https://pub.dartlang.org" 175 | source: hosted 176 | version: "2.0.4" 177 | http_parser: 178 | dependency: transitive 179 | description: 180 | name: http_parser 181 | url: "https://pub.dartlang.org" 182 | source: hosted 183 | version: "3.1.1" 184 | image_picker: 185 | dependency: "direct main" 186 | description: 187 | name: image_picker 188 | url: "https://pub.dartlang.org" 189 | source: hosted 190 | version: "0.2.1" 191 | io: 192 | dependency: transitive 193 | description: 194 | name: io 195 | url: "https://pub.dartlang.org" 196 | source: hosted 197 | version: "0.3.2+1" 198 | isolate: 199 | dependency: transitive 200 | description: 201 | name: isolate 202 | url: "https://pub.dartlang.org" 203 | source: hosted 204 | version: "1.1.0" 205 | js: 206 | dependency: transitive 207 | description: 208 | name: js 209 | url: "https://pub.dartlang.org" 210 | source: hosted 211 | version: "0.6.1" 212 | kernel: 213 | dependency: transitive 214 | description: 215 | name: kernel 216 | url: "https://pub.dartlang.org" 217 | source: hosted 218 | version: "0.3.0-alpha.9" 219 | location: 220 | dependency: "direct main" 221 | description: 222 | name: location 223 | url: "https://pub.dartlang.org" 224 | source: hosted 225 | version: "1.1.7" 226 | logging: 227 | dependency: transitive 228 | description: 229 | name: logging 230 | url: "https://pub.dartlang.org" 231 | source: hosted 232 | version: "0.11.3+1" 233 | matcher: 234 | dependency: transitive 235 | description: 236 | name: matcher 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "0.12.1+4" 240 | meta: 241 | dependency: transitive 242 | description: 243 | name: meta 244 | url: "https://pub.dartlang.org" 245 | source: hosted 246 | version: "1.1.2" 247 | mime: 248 | dependency: transitive 249 | description: 250 | name: mime 251 | url: "https://pub.dartlang.org" 252 | source: hosted 253 | version: "0.9.6" 254 | mockito: 255 | dependency: transitive 256 | description: 257 | name: mockito 258 | url: "https://pub.dartlang.org" 259 | source: hosted 260 | version: "2.2.3" 261 | multi_server_socket: 262 | dependency: transitive 263 | description: 264 | name: multi_server_socket 265 | url: "https://pub.dartlang.org" 266 | source: hosted 267 | version: "1.0.1" 268 | node_preamble: 269 | dependency: transitive 270 | description: 271 | name: node_preamble 272 | url: "https://pub.dartlang.org" 273 | source: hosted 274 | version: "1.4.0" 275 | package_config: 276 | dependency: transitive 277 | description: 278 | name: package_config 279 | url: "https://pub.dartlang.org" 280 | source: hosted 281 | version: "1.0.3" 282 | package_resolver: 283 | dependency: transitive 284 | description: 285 | name: package_resolver 286 | url: "https://pub.dartlang.org" 287 | source: hosted 288 | version: "1.0.2" 289 | path: 290 | dependency: transitive 291 | description: 292 | name: path 293 | url: "https://pub.dartlang.org" 294 | source: hosted 295 | version: "1.5.1" 296 | path_provider: 297 | dependency: transitive 298 | description: 299 | name: path_provider 300 | url: "https://pub.dartlang.org" 301 | source: hosted 302 | version: "0.3.1" 303 | plugin: 304 | dependency: transitive 305 | description: 306 | name: plugin 307 | url: "https://pub.dartlang.org" 308 | source: hosted 309 | version: "0.2.0+2" 310 | pool: 311 | dependency: transitive 312 | description: 313 | name: pool 314 | url: "https://pub.dartlang.org" 315 | source: hosted 316 | version: "1.3.4" 317 | pub_semver: 318 | dependency: transitive 319 | description: 320 | name: pub_semver 321 | url: "https://pub.dartlang.org" 322 | source: hosted 323 | version: "1.3.2" 324 | quiver: 325 | dependency: transitive 326 | description: 327 | name: quiver 328 | url: "https://pub.dartlang.org" 329 | source: hosted 330 | version: "0.28.0" 331 | share: 332 | dependency: "direct main" 333 | description: 334 | name: share 335 | url: "https://pub.dartlang.org" 336 | source: hosted 337 | version: "0.4.0" 338 | shared_preferences: 339 | dependency: "direct main" 340 | description: 341 | name: shared_preferences 342 | url: "https://pub.dartlang.org" 343 | source: hosted 344 | version: "0.3.3" 345 | shelf: 346 | dependency: transitive 347 | description: 348 | name: shelf 349 | url: "https://pub.dartlang.org" 350 | source: hosted 351 | version: "0.7.2" 352 | shelf_packages_handler: 353 | dependency: transitive 354 | description: 355 | name: shelf_packages_handler 356 | url: "https://pub.dartlang.org" 357 | source: hosted 358 | version: "1.0.3" 359 | shelf_static: 360 | dependency: transitive 361 | description: 362 | name: shelf_static 363 | url: "https://pub.dartlang.org" 364 | source: hosted 365 | version: "0.2.7" 366 | shelf_web_socket: 367 | dependency: transitive 368 | description: 369 | name: shelf_web_socket 370 | url: "https://pub.dartlang.org" 371 | source: hosted 372 | version: "0.2.2" 373 | sky_engine: 374 | dependency: transitive 375 | description: flutter 376 | source: sdk 377 | version: "0.0.99" 378 | source_map_stack_trace: 379 | dependency: transitive 380 | description: 381 | name: source_map_stack_trace 382 | url: "https://pub.dartlang.org" 383 | source: hosted 384 | version: "1.1.4" 385 | source_maps: 386 | dependency: transitive 387 | description: 388 | name: source_maps 389 | url: "https://pub.dartlang.org" 390 | source: hosted 391 | version: "0.10.4" 392 | source_span: 393 | dependency: transitive 394 | description: 395 | name: source_span 396 | url: "https://pub.dartlang.org" 397 | source: hosted 398 | version: "1.4.0" 399 | stack_trace: 400 | dependency: transitive 401 | description: 402 | name: stack_trace 403 | url: "https://pub.dartlang.org" 404 | source: hosted 405 | version: "1.9.1" 406 | stream_channel: 407 | dependency: transitive 408 | description: 409 | name: stream_channel 410 | url: "https://pub.dartlang.org" 411 | source: hosted 412 | version: "1.6.3" 413 | string_scanner: 414 | dependency: transitive 415 | description: 416 | name: string_scanner 417 | url: "https://pub.dartlang.org" 418 | source: hosted 419 | version: "1.0.2" 420 | synchronized: 421 | dependency: transitive 422 | description: 423 | name: synchronized 424 | url: "https://pub.dartlang.org" 425 | source: hosted 426 | version: "1.3.0" 427 | term_glyph: 428 | dependency: transitive 429 | description: 430 | name: term_glyph 431 | url: "https://pub.dartlang.org" 432 | source: hosted 433 | version: "1.0.0" 434 | test: 435 | dependency: transitive 436 | description: 437 | name: test 438 | url: "https://pub.dartlang.org" 439 | source: hosted 440 | version: "0.12.30+3" 441 | typed_data: 442 | dependency: transitive 443 | description: 444 | name: typed_data 445 | url: "https://pub.dartlang.org" 446 | source: hosted 447 | version: "1.1.5" 448 | url_launcher: 449 | dependency: "direct main" 450 | description: 451 | name: url_launcher 452 | url: "https://pub.dartlang.org" 453 | source: hosted 454 | version: "3.0.0" 455 | utf: 456 | dependency: transitive 457 | description: 458 | name: utf 459 | url: "https://pub.dartlang.org" 460 | source: hosted 461 | version: "0.9.0+4" 462 | uuid: 463 | dependency: transitive 464 | description: 465 | name: uuid 466 | url: "https://pub.dartlang.org" 467 | source: hosted 468 | version: "0.5.3" 469 | vector_math: 470 | dependency: transitive 471 | description: 472 | name: vector_math 473 | url: "https://pub.dartlang.org" 474 | source: hosted 475 | version: "2.0.5" 476 | watcher: 477 | dependency: transitive 478 | description: 479 | name: watcher 480 | url: "https://pub.dartlang.org" 481 | source: hosted 482 | version: "0.9.7+7" 483 | web_socket_channel: 484 | dependency: transitive 485 | description: 486 | name: web_socket_channel 487 | url: "https://pub.dartlang.org" 488 | source: hosted 489 | version: "1.0.7" 490 | yaml: 491 | dependency: transitive 492 | description: 493 | name: yaml 494 | url: "https://pub.dartlang.org" 495 | source: hosted 496 | version: "2.1.13" 497 | sdks: 498 | dart: ">=2.0.0-dev.28.0 <=2.0.0-edge.0d5cf900b021bf5c9fa593ffa12b15bcd1cc5fe0" 499 | flutter: ">=0.1.4 <2.0.0" 500 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 9740EEB11CF90186004384FC /* Flutter */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 78 | 3B80C3931E831B6300D905FE /* App.framework */, 79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 84 | ); 85 | name = Flutter; 86 | sourceTree = ""; 87 | }; 88 | 97C146E51CF9000F007C117D = { 89 | isa = PBXGroup; 90 | children = ( 91 | 9740EEB11CF90186004384FC /* Flutter */, 92 | 97C146F01CF9000F007C117D /* Runner */, 93 | 97C146EF1CF9000F007C117D /* Products */, 94 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 97C146EF1CF9000F007C117D /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146EE1CF9000F007C117D /* Runner.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 97C146F01CF9000F007C117D /* Runner */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 110 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 111 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 112 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 113 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 114 | 97C147021CF9000F007C117D /* Info.plist */, 115 | 97C146F11CF9000F007C117D /* Supporting Files */, 116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 118 | ); 119 | path = Runner; 120 | sourceTree = ""; 121 | }; 122 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 97C146F21CF9000F007C117D /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 97C146ED1CF9000F007C117D /* Runner */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 136 | buildPhases = ( 137 | 9740EEB61CF901F6004384FC /* Run Script */, 138 | 97C146EA1CF9000F007C117D /* Sources */, 139 | 97C146EB1CF9000F007C117D /* Frameworks */, 140 | 97C146EC1CF9000F007C117D /* Resources */, 141 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 142 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0910; 160 | ORGANIZATIONNAME = "The Chromium Authors"; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 191 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 194 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 195 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 196 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXResourcesBuildPhase section */ 201 | 202 | /* Begin PBXShellScriptBuildPhase section */ 203 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 204 | isa = PBXShellScriptBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | ); 208 | inputPaths = ( 209 | ); 210 | name = "Thin Binary"; 211 | outputPaths = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 216 | }; 217 | 9740EEB61CF901F6004384FC /* Run Script */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | name = "Run Script"; 225 | outputPaths = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 230 | }; 231 | /* End PBXShellScriptBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 97C146EA1CF9000F007C117D /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 239 | 97C146F31CF9000F007C117D /* main.m in Sources */, 240 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 97C146FB1CF9000F007C117D /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 97C147001CF9000F007C117D /* Base */, 259 | ); 260 | name = LaunchScreen.storyboard; 261 | sourceTree = ""; 262 | }; 263 | /* End PBXVariantGroup section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 97C147031CF9000F007C117D /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INFINITE_RECURSION = YES; 284 | CLANG_WARN_INT_CONVERSION = YES; 285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 287 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 288 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 289 | CLANG_WARN_STRICT_PROTOTYPES = YES; 290 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 294 | COPY_PHASE_STRIP = NO; 295 | DEBUG_INFORMATION_FORMAT = dwarf; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | ENABLE_TESTABILITY = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu99; 299 | GCC_DYNAMIC_NO_PIC = NO; 300 | GCC_NO_COMMON_BLOCKS = YES; 301 | GCC_OPTIMIZATION_LEVEL = 0; 302 | GCC_PREPROCESSOR_DEFINITIONS = ( 303 | "DEBUG=1", 304 | "$(inherited)", 305 | ); 306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 308 | GCC_WARN_UNDECLARED_SELECTOR = YES; 309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 310 | GCC_WARN_UNUSED_FUNCTION = YES; 311 | GCC_WARN_UNUSED_VARIABLE = YES; 312 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 313 | MTL_ENABLE_DEBUG_INFO = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = iphoneos; 316 | TARGETED_DEVICE_FAMILY = "1,2"; 317 | }; 318 | name = Debug; 319 | }; 320 | 97C147041CF9000F007C117D /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 350 | ENABLE_NS_ASSERTIONS = NO; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | 97C147061CF9000F007C117D /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 371 | buildSettings = { 372 | ARCHS = arm64; 373 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 374 | ENABLE_BITCODE = NO; 375 | FRAMEWORK_SEARCH_PATHS = ( 376 | "$(inherited)", 377 | "$(PROJECT_DIR)/Flutter", 378 | ); 379 | INFOPLIST_FILE = Runner/Info.plist; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 381 | LIBRARY_SEARCH_PATHS = ( 382 | "$(inherited)", 383 | "$(PROJECT_DIR)/Flutter", 384 | ); 385 | PRODUCT_BUNDLE_IDENTIFIER = com.example.attendance; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | }; 388 | name = Debug; 389 | }; 390 | 97C147071CF9000F007C117D /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 393 | buildSettings = { 394 | ARCHS = arm64; 395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 396 | ENABLE_BITCODE = NO; 397 | FRAMEWORK_SEARCH_PATHS = ( 398 | "$(inherited)", 399 | "$(PROJECT_DIR)/Flutter", 400 | ); 401 | INFOPLIST_FILE = Runner/Info.plist; 402 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 403 | LIBRARY_SEARCH_PATHS = ( 404 | "$(inherited)", 405 | "$(PROJECT_DIR)/Flutter", 406 | ); 407 | PRODUCT_BUNDLE_IDENTIFIER = com.example.attendance; 408 | PRODUCT_NAME = "$(TARGET_NAME)"; 409 | }; 410 | name = Release; 411 | }; 412 | /* End XCBuildConfiguration section */ 413 | 414 | /* Begin XCConfigurationList section */ 415 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 416 | isa = XCConfigurationList; 417 | buildConfigurations = ( 418 | 97C147031CF9000F007C117D /* Debug */, 419 | 97C147041CF9000F007C117D /* Release */, 420 | ); 421 | defaultConfigurationIsVisible = 0; 422 | defaultConfigurationName = Release; 423 | }; 424 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 425 | isa = XCConfigurationList; 426 | buildConfigurations = ( 427 | 97C147061CF9000F007C117D /* Debug */, 428 | 97C147071CF9000F007C117D /* Release */, 429 | ); 430 | defaultConfigurationIsVisible = 0; 431 | defaultConfigurationName = Release; 432 | }; 433 | /* End XCConfigurationList section */ 434 | }; 435 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 436 | } 437 | --------------------------------------------------------------------------------