├── lib ├── style.dart ├── locale │ └── locales.dart ├── PHP │ ├── Createdb.php │ ├── connection.php │ ├── deactivateuser.php │ ├── fetchstudent.php │ ├── addsubject.php │ ├── users.php │ ├── activateuser.php │ ├── addstudent.php │ ├── addteacher.php │ └── adddirector.php ├── screens │ ├── change_pin_screen.dart │ ├── parent_main_screen.dart │ ├── time_table_screen.dart │ ├── admin_main_screen.dart │ ├── student_main_screen.dart │ ├── compalin_screen.dart │ ├── payment_record.dart │ ├── teach_main_screen.dart │ ├── director_tasks.dart │ ├── stud_view.dart │ ├── teach_activities.dart │ ├── settings_screen.dart │ ├── add_user.dart │ ├── add_attendance.dart │ ├── login_screen.dart │ ├── home_screen.dart │ ├── parent_registration.dart │ └── director_main_screen.dart ├── models │ ├── student_grid_view.dart │ ├── users_category.dart │ └── json_convert_to_list.dart ├── widgets │ ├── mytextformfiled.dart │ ├── footer.dart │ ├── teach_main_drawer.dart │ ├── stud_main_drawer.dart │ ├── director_main_drawer.dart │ ├── admin_main_drawer.dart │ ├── exit_changepin_confirmation.dart │ └── add_post.dart ├── main.dart └── services │ ├── users.dart │ └── sample_http.dart ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.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 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── images ├── edu.jfif ├── lock.jpg ├── background.png ├── grad cape.jfif ├── knowledge.jfif ├── lockwithkey.jpg ├── stemclipart.jpg ├── coffeenotpad.jpg ├── learnedustudy.jfif ├── userwithlock.jpg ├── userwithlockblack.jpg └── timetable-3222249__340.jpg ├── fonts ├── Raleway-Bold.ttf ├── Lobster-Regular.ttf ├── Raleway-Light.ttf ├── Raleway-Regular.ttf ├── RobotoMono-Bold.ttf ├── RobotoMono-Italic.ttf ├── Raleway-BoldItalic.ttf ├── RobotoMono-Regular.ttf └── RobotoMono-BoldItalic.ttf ├── android ├── gradle.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 │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── my_school │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── CMakeLists.txt │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── flutter │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── .gitignore └── CMakeLists.txt ├── .metadata ├── README.md ├── .gitignore ├── test └── widget_test.dart ├── analysis_options.yaml ├── pubspec.yaml └── pubspec.lock /lib/style.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /images/edu.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/edu.jfif -------------------------------------------------------------------------------- /images/lock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/lock.jpg -------------------------------------------------------------------------------- /fonts/Raleway-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/Raleway-Bold.ttf -------------------------------------------------------------------------------- /images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/background.png -------------------------------------------------------------------------------- /images/grad cape.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/grad cape.jfif -------------------------------------------------------------------------------- /images/knowledge.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/knowledge.jfif -------------------------------------------------------------------------------- /images/lockwithkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/lockwithkey.jpg -------------------------------------------------------------------------------- /images/stemclipart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/stemclipart.jpg -------------------------------------------------------------------------------- /fonts/Lobster-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/Lobster-Regular.ttf -------------------------------------------------------------------------------- /fonts/Raleway-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/Raleway-Light.ttf -------------------------------------------------------------------------------- /fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /fonts/RobotoMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/RobotoMono-Bold.ttf -------------------------------------------------------------------------------- /images/coffeenotpad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/coffeenotpad.jpg -------------------------------------------------------------------------------- /images/learnedustudy.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/learnedustudy.jfif -------------------------------------------------------------------------------- /images/userwithlock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/userwithlock.jpg -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /fonts/RobotoMono-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/RobotoMono-Italic.ttf -------------------------------------------------------------------------------- /fonts/Raleway-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/Raleway-BoldItalic.ttf -------------------------------------------------------------------------------- /fonts/RobotoMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/RobotoMono-Regular.ttf -------------------------------------------------------------------------------- /images/userwithlockblack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/userwithlockblack.jpg -------------------------------------------------------------------------------- /fonts/RobotoMono-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/fonts/RobotoMono-BoldItalic.ttf -------------------------------------------------------------------------------- /images/timetable-3222249__340.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/images/timetable-3222249__340.jpg -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/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/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /lib/locale/locales.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Locales { 4 | static final all = [ 5 | const Locale('en','US'), 6 | const Locale('am','ET'), 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degisew/school-management-system/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/my_school/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.my_school 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/PHP/Createdb.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /lib/screens/change_pin_screen.dart: -------------------------------------------------------------------------------- 1 | // class extends StatelessWidget { 2 | // const ({ Key? key }) : super(key: key); 3 | 4 | // @override 5 | // Widget build(BuildContext context) { 6 | // return Container( 7 | 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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /lib/PHP/connection.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/screens/parent_main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ParentMainScreen extends StatelessWidget { 4 | const ParentMainScreen({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/PHP/deactivateuser.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/PHP/fetchstudent.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /lib/models/student_grid_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StudGridView { 4 | final String title; 5 | Icon icon; 6 | StudGridView({ 7 | required this.title, 8 | required this.icon, 9 | }); 10 | } 11 | 12 | class AdminDrawer { 13 | final String title; 14 | Icon icon; 15 | AdminDrawer({ 16 | required this.title, 17 | required this.icon, 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /lib/PHP/addsubject.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/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/screens/time_table_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widgets/stud_main_drawer.dart'; 3 | 4 | class TimeTableScreen extends StatelessWidget { 5 | const TimeTableScreen({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | appBar: AppBar( 11 | title: const Text('must get a title'), 12 | ), 13 | drawer: const Studmaindrawer(), 14 | body: const Center( 15 | child: Text('we will do it'), 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # my_school 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /lib/PHP/users.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/PHP/activateuser.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.5.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /lib/PHP/addstudent.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/screens/admin_main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widgets/admin_main_drawer.dart'; 3 | //import 'package:fluent_ui/fluent_ui.dart'; 4 | 5 | class AdminMainScreen extends StatelessWidget { 6 | const AdminMainScreen({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | appBar: AppBar( 12 | centerTitle: true, 13 | title: Text( 14 | 'welcome admin', 15 | // textAlign: TextAlign.center, 16 | style: Theme.of(context).appBarTheme.titleTextStyle, 17 | ), 18 | ), 19 | drawer:const AdminMainDrawer(), 20 | body: Center(child: Text('Admin Dashboard', 21 | style: Theme.of(context).textTheme.titleSmall,)), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /lib/PHP/addteacher.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/PHP/adddirector.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /lib/screens/student_main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | // import 'package:my_school/models/student_grid_view.dart'; 3 | // import 'package:my_school/screens/compalin_screen.dart'; 4 | import '../widgets/stud_main_drawer.dart'; 5 | 6 | class StudMainScreen extends StatelessWidget { 7 | const StudMainScreen({Key? key}) : super(key: key); 8 | final bool wilpop = false; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return WillPopScope( 13 | onWillPop: () async => wilpop, 14 | child: Scaffold( 15 | appBar: AppBar( 16 | //automaticallyImplyLeading: false, 17 | title: Center( 18 | child: Text( 19 | 'welcome Student', 20 | style: Theme.of(context).appBarTheme.titleTextStyle, 21 | ), 22 | ), 23 | ), 24 | drawer: const Studmaindrawer(), 25 | 26 | ) 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /lib/models/users_category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class Studentcategory { 4 | final String firstname; 5 | final String lastname; 6 | final String id; 7 | final String role; 8 | final String batch; 9 | final String status; 10 | final Image profile; 11 | 12 | Studentcategory( 13 | {required this.firstname, 14 | required this.id, 15 | required this.lastname, 16 | required this.role, 17 | required this.batch, 18 | required this.status, 19 | required this.profile}); 20 | } 21 | 22 | class InstructorCategory { 23 | final String firstname; 24 | final String lastname; 25 | final String id; 26 | final String role; 27 | final Image profile; 28 | 29 | InstructorCategory( 30 | {required this.firstname, 31 | required this.lastname, 32 | required this.id, 33 | required this.role, 34 | required this.profile}); 35 | } 36 | 37 | class SubjectCategory { 38 | final String subjectName; 39 | final String subjectCode; 40 | 41 | SubjectCategory({ 42 | required this.subjectName, 43 | required this.subjectCode, 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | import 'package:my_school/screens/login_screen.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(const LoginSceen()); 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/widgets/mytextformfiled.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TextFormfield extends StatelessWidget { 4 | //const TextFormfield({Key? key}) : super(key: key); 5 | // final String hinttext; 6 | final String label; 7 | final TextEditingController controller; 8 | final Function errorstyle; 9 | final TextInputType keyboardtype; 10 | 11 | const TextFormfield({Key? key, 12 | required this.label, 13 | required this.controller, 14 | required this.errorstyle, 15 | required this.keyboardtype, 16 | }) : super(key: key); 17 | @override 18 | Widget build(BuildContext context) { 19 | return TextFormField( 20 | keyboardType: keyboardtype, 21 | controller: controller, 22 | validator: (value) { 23 | if (value!.isEmpty) { 24 | return 'this field is required'; 25 | } 26 | 27 | return null; 28 | }, 29 | decoration: InputDecoration( 30 | errorStyle: errorstyle(), 31 | filled: true, 32 | fillColor: Colors.white, 33 | border: OutlineInputBorder( 34 | borderRadius: BorderRadius.circular(15), 35 | ), 36 | label: Text(label), 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/screens/compalin_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ComplainScreen extends StatelessWidget { 4 | const ComplainScreen({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Center(child: Text('add your complain')), 11 | ), 12 | body: Form( 13 | child: Column( 14 | children: [ 15 | Padding( 16 | padding: 17 | const EdgeInsets.only(top: 50, left: 10, right: 10, bottom: 30), 18 | child: TextFormField( 19 | // maxLength: 100, 20 | maxLines: 10, 21 | decoration: InputDecoration( 22 | border: OutlineInputBorder( 23 | borderRadius: BorderRadius.circular(15), 24 | ), 25 | hintText: 'write down your complain here', 26 | hintStyle: const TextStyle( 27 | fontSize: 20, 28 | fontWeight: FontWeight.normal, 29 | )), 30 | ), 31 | ), 32 | ElevatedButton( 33 | onPressed: () {}, 34 | child: const Text('Send'), 35 | ), 36 | ], 37 | )), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/models/json_convert_to_list.dart: -------------------------------------------------------------------------------- 1 | class Student { 2 | final int id; 3 | final String firstname; 4 | final String middlename; 5 | final String lastname; 6 | final int age; 7 | final String address; 8 | final String phone; 9 | final String gender; 10 | final String grade; 11 | final String username; 12 | final String password; 13 | final String status; 14 | final String role; 15 | Student( 16 | {required this.id, 17 | required this.firstname, 18 | required this.middlename, 19 | required this.lastname, 20 | required this.age, 21 | required this.gender, 22 | required this.address, 23 | required this.grade, 24 | required this.password, 25 | required this.phone, 26 | required this.role, 27 | required this.status, 28 | required this.username}); 29 | factory Student.fromJson(Map json) { 30 | return Student( 31 | id: int.tryParse(json['auto_id'].toString())!, 32 | firstname : json['firstname'], 33 | middlename: json['middlename'], 34 | lastname: json['lastname'], 35 | age: int.tryParse(json['age'].toString())!, 36 | gender: json['gender'], 37 | phone: json['phone'], 38 | address: json['address'], 39 | grade: json['grade'], 40 | username: json['username'], 41 | password: json['password'], 42 | status: json['statuss']!, 43 | role: json['role'] 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"my_school", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | My School 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | my_school 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | //import 'dart:html'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'screens/home_screen.dart'; 5 | //import 'package:abushakir/abushakir.dart'; 6 | //import 'package:intl/intl.dart'; 7 | // //import 'package:localization/localization.dart'; 8 | // import '../screens/homescreen.dart'; 9 | 10 | // import './screens/LoginScreen.dart'; 11 | 12 | void main() { 13 | runApp( 14 | MaterialApp( 15 | // localizationsDelegates: [ 16 | // // delegate from flutter_localization 17 | // GlobalMaterialLocalizations.delegate, 18 | // GlobalWidgetsLocalizations.delegate, 19 | // GlobalCupertinoLocalizations.delegate, 20 | // // delegate from localization package. 21 | // LocalJsonLocalization.delegate, 22 | // ], 23 | // supportedLocales: [ 24 | // const Locale('en', 'US'), // English 25 | // const Locale('he', 'IL'), // Hebrew 26 | // // ... other locales the app supports 27 | // ], 28 | debugShowCheckedModeBanner: false, 29 | title: 'welcome to montossorian School!', 30 | home: const Homescreen(), 31 | theme: ThemeData( 32 | appBarTheme: const AppBarTheme( 33 | titleTextStyle: TextStyle( 34 | color: Colors.black, 35 | fontFamily: 'lobster', 36 | fontSize: 40, 37 | fontWeight: FontWeight.bold), 38 | ), 39 | fontFamily: 'Raleway', 40 | textTheme: ThemeData.light().textTheme.copyWith( 41 | bodySmall: const TextStyle( 42 | color: Color.fromARGB(255, 194, 153, 31), 43 | ), 44 | titleSmall: const TextStyle( 45 | fontFamily: 'Lobster', 46 | fontSize: 20, 47 | ), 48 | ), 49 | ) 50 | // ), 51 | // ), 52 | ), 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /lib/widgets/footer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class FooterText extends StatelessWidget { 4 | const FooterText({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container(); 9 | // Column( 10 | // crossAxisAlignment: CrossAxisAlignment.start, 11 | // children: [ 12 | // Padding( 13 | // padding: const EdgeInsets.only(top: 290, bottom: 10, left: 20), 14 | // child: Row(children: [ 15 | // const Padding( 16 | // padding: EdgeInsets.only(right: 10), child: Icon(Icons.school)), 17 | // RichText( 18 | // text: const TextSpan( 19 | // style: TextStyle( 20 | // color: Colors.black, 21 | // fontSize: 20, 22 | // fontWeight: FontWeight.bold, 23 | // fontFamily: 'Raleway', 24 | // fontStyle: FontStyle.italic), 25 | // children: [ 26 | // TextSpan(text: 'Montossorian School'), 27 | // ], 28 | // ), 29 | // ), 30 | // ]), 31 | // ), 32 | // Padding( 33 | // padding: const EdgeInsets.only(left: 20), 34 | // child: RichText( 35 | 36 | // //textAlign: TextAlign.center, 37 | // text: const TextSpan( 38 | // style: TextStyle( 39 | // color: Colors.black, 40 | // fontSize: 15, 41 | // //fontWeight: FontWeight.bold, 42 | // fontFamily: 'Raleway', 43 | // fontStyle: FontStyle.italic), 44 | // children: [ 45 | // TextSpan( 46 | // text: 'School Management System', 47 | // ), 48 | // TextSpan(text: ' ( V.1 )', 49 | // style: TextStyle( 50 | // fontWeight: FontWeight.bold, 51 | // ) 52 | // ), 53 | // ], 54 | // )), 55 | // ), 56 | // ], 57 | // ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/widgets/teach_main_drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:my_school/screens/teach_activities.dart'; 3 | import 'package:my_school/screens/teach_main_screen.dart'; 4 | import '../screens/settings_screen.dart'; 5 | import 'exit_changepin_confirmation.dart'; 6 | import 'footer.dart'; 7 | 8 | class Teachmaindrawer extends StatelessWidget { 9 | const Teachmaindrawer({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Drawer( 14 | child: ListView( 15 | children: [ 16 | const SizedBox(), 17 | const UserAccountsDrawerHeader( 18 | currentAccountPicture: CircleAvatar( 19 | backgroundColor: Colors.green, 20 | ), 21 | accountName: Text('accountName'), 22 | accountEmail: Text('jegisew21@gmail.com'), 23 | ), 24 | ListTile( 25 | title: const Text('Home'), 26 | trailing: const Icon(Icons.home), 27 | onTap: () => Navigator.pushReplacement( 28 | context, 29 | MaterialPageRoute( 30 | builder: ((context) => const TeachMainScreen())), 31 | ), 32 | ), 33 | ListTile( 34 | title: const Text('Activities'), 35 | trailing: const Icon(Icons.task), 36 | onTap: () { 37 | Navigator.pushReplacement( 38 | context, 39 | MaterialPageRoute( 40 | builder: (context) => const Teachactivities())); 41 | }, 42 | ), 43 | const Divider(), 44 | ListTile( 45 | trailing: const Icon(Icons.settings), 46 | title: const Text('Settings'), 47 | onTap: () { 48 | Navigator.pushReplacement( 49 | context, 50 | MaterialPageRoute( 51 | builder: (context) => const SettingsScreen())); 52 | }, 53 | ), 54 | const Divider(), 55 | const ExitConfirmation(), 56 | const FooterText(), 57 | ], 58 | ), 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/services/users.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:http/http.dart' as http; 5 | import '../screens/director_main_screen.dart'; 6 | import '../screens/student_main_screen.dart'; 7 | import '../screens/add_user.dart'; 8 | import '../screens/admin_main_screen.dart'; 9 | import '../screens/teach_main_screen.dart'; 10 | import '../screens/parent_main_screen.dart'; 11 | 12 | Future login(context, username, password) async { 13 | var url = 'http://10.162.75.141/php/users.php'; 14 | var _response = await http.post(Uri.parse(url), body: { 15 | 'username': username, 16 | 'password': password, 17 | }); 18 | var data = json.decode(_response.body); 19 | print(data); 20 | print(data.runtimeType); 21 | //valiating each user 22 | if (data != null) { 23 | if (data['statuss'] == '1' && data['role'] == 'teacher') { 24 | Navigator.push( 25 | context, MaterialPageRoute(builder: (_) => const TeachMainScreen())); 26 | } else if (data['statuss'] == '1' && data['role'] == 'director') { 27 | Navigator.pushReplacement(context, 28 | MaterialPageRoute(builder: (context) => const DirectorMainScreen())); 29 | } else if (data['statuss'] == '1' && data['role'] == 'admin') { 30 | Navigator.pushReplacement(context, 31 | MaterialPageRoute(builder: (context) => const AdminMainScreen())); 32 | } else if (data['statuss'] == '1' && data['role'] == 'student') { 33 | Navigator.pushReplacement(context, 34 | MaterialPageRoute(builder: (context) => const StudMainScreen())); 35 | } else if (data['statuss'] == '1' && data['role'] == 'parent') { 36 | Navigator.pushReplacement(context, 37 | MaterialPageRoute(builder: (context) => const ParentMainScreen())); 38 | } else { 39 | showDialog( 40 | context: context, 41 | builder: (context) => const AlertDialog( 42 | title: Text('Sorry! your account is Deactivated.'), 43 | )); 44 | } 45 | } else { 46 | showDialog( 47 | context: context, 48 | builder: (context) => const AlertDialog( 49 | title: Text('Invalid Credentials!'), 50 | )); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.my_school" 47 | minSdkVersion flutter.minSdkVersion 48 | targetSdkVersion flutter.targetSdkVersion 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /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/widgets/stud_main_drawer.dart: -------------------------------------------------------------------------------- 1 | //import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:my_school/screens/stud_view.dart'; 5 | import '../screens/settings_screen.dart'; 6 | import 'exit_changepin_confirmation.dart'; 7 | import 'footer.dart'; 8 | 9 | //import '../screens/LoginScreen.dart'; 10 | 11 | // enum randomcolor{ 12 | // //Colors.blue; 13 | 14 | // } 15 | class Studmaindrawer extends StatelessWidget { 16 | const Studmaindrawer({Key? key}) : super(key: key); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Drawer( 21 | child: ListView( 22 | children: [ 23 | const SizedBox(), 24 | const UserAccountsDrawerHeader( 25 | currentAccountPicture: CircleAvatar( 26 | backgroundColor: Colors.green, 27 | // child: Image( 28 | // image: NetworkImage( 29 | // 'https://www.google.com/search?q=Sample+image+url&sa=X&biw=1366&bih=649&tbm=isch&source=iu&ictx=1&vet=1&fir=Mdlp-4_rDOTaLM%252C8UmY9BIZlcHvZM%252C_%253Bq9CkBYSVHv6UvM%252C31qpFmzyUINLPM%252C_%253BfK6SFKLhI7Vu7M%252CBR5IrvO_GnylcM%252C_%253BxpeKjqK5OvLVUM%252CBzMXIkeIgYnXEM%252C_%253Bu6m0bqVF_iBVoM%252CINvIfN6HZc1S7M%252C_%253BnqCzAZFVfmrDnM%252CCFueadwjE5FYgM%252C_%253B91qytDE8xcKwEM%252C_c0dVYSNpqbDsM%252C_%253BOfyJgROAhggk9M%252CapLMkmQFiRdKEM%252C_%253BBjJWd619jJVwrM%252CAIa9k_HoAFpNpM%252C_%253BvcDlIJEnD2HHpM%252CKe1g04_Q-Hc_mM%252C_&usg=AI4_-kSo5uWupekDPIDJzXenTJst0-yRxA&ved=2ahUKEwjanqaB9JX2AhWixoUKHR7YCS0Q9QF6BAgBEAE#imgrc=Mdlp-4_rDOTaLM'), 30 | // ), 31 | ), 32 | accountName: Text('accountName'), 33 | accountEmail: Text('jegisew21@gmail.com'), 34 | ), 35 | const ListTile( 36 | title: Text('Home'), 37 | trailing: Icon(Icons.home), 38 | ), 39 | ListTile( 40 | title: const Text('view'), 41 | trailing: const Icon(Icons.remove_red_eye), 42 | onTap: () { 43 | Navigator.pushReplacement(context, 44 | MaterialPageRoute(builder: (context) => const StudView())); 45 | }, 46 | ), 47 | const Divider(), 48 | ListTile( 49 | trailing: const Icon(Icons.settings), 50 | title: const Text('Settings'), 51 | onTap: () { 52 | Navigator.pushReplacement( 53 | context, 54 | MaterialPageRoute( 55 | builder: (context) => const SettingsScreen())); 56 | }, 57 | ), 58 | const Divider(), 59 | const ExitConfirmation(), 60 | const FooterText(), 61 | ], 62 | ), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "my_school" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "my_school" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "my_school.exe" "\0" 98 | VALUE "ProductName", "my_school" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(my_school LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "my_school") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /lib/screens/payment_record.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widgets/admin_main_drawer.dart'; 3 | 4 | class PaymentRecord extends StatefulWidget { 5 | const PaymentRecord({Key? key}) : super(key: key); 6 | 7 | @override 8 | State createState() => _PaymentRecordState(); 9 | } 10 | 11 | class _PaymentRecordState extends State { 12 | List gradedropdowncategory = [ 13 | 'KG', 14 | 'Elementary', 15 | 'High_School', 16 | 'Preparatory' 17 | ]; 18 | final idcontroller = TextEditingController(); 19 | final namecontroller = TextEditingController(); 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | // backgroundColor: Colors.transparent, //this ".transparent" is used to set scaffold backg. 24 | appBar: AppBar( 25 | actions: [ 26 | IconButton( 27 | onPressed: () { 28 | showDialog( 29 | context: context, 30 | builder: (context) => AlertDialog( 31 | scrollable: true, 32 | content: Form( 33 | child: Column( 34 | children: [ 35 | DropdownButtonHideUnderline( 36 | child: DropdownButtonFormField( 37 | items: gradedropdowncategory.map((item) { 38 | return DropdownMenuItem( 39 | //alignment: AlignmentDirectional.topStart, 40 | child: Text(item), 41 | value: item, 42 | ); 43 | }).toList(), 44 | onChanged: (val) {}, 45 | ), 46 | ), 47 | TextFormField( 48 | controller: idcontroller, 49 | ), 50 | TextFormField( 51 | controller: namecontroller, 52 | ), 53 | TextFormField(), 54 | TextButton.icon( 55 | onPressed: () { 56 | showDatePicker( 57 | context: context, 58 | initialDate: DateTime.now(), 59 | firstDate: DateTime(2022), 60 | lastDate: DateTime(2024), 61 | ); 62 | }, 63 | icon: const Icon(Icons.calendar_month), 64 | label: const Text('Select Month')), 65 | ElevatedButton( 66 | onPressed: () { 67 | //here validae the form first. 68 | idcontroller.clear(); 69 | namecontroller.clear(); 70 | }, 71 | child: const Text('Record'), 72 | ), 73 | ], 74 | ), 75 | ), 76 | ), 77 | ); 78 | }, 79 | icon: const Icon(Icons.add)), 80 | TextButton.icon( 81 | onPressed: () {}, 82 | icon: const Icon(Icons.calendar_month), 83 | label: const Text('Select Month')), 84 | ], 85 | // backgroundColor: Colors.transparent, 86 | ), 87 | drawer: const AdminMainDrawer(), 88 | body: ListView(), 89 | floatingActionButton: FloatingActionButton(onPressed: (() {})), 90 | floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, 91 | ); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/screens/teach_main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widgets/teach_main_drawer.dart'; 3 | 4 | class TeachMainScreen extends StatelessWidget { 5 | const TeachMainScreen({Key? key}) : super(key: key); 6 | final bool wilpop = false; 7 | // final List homescreengrid = [ 8 | // StudGridView(title: 'Home', icon: const Icon(Icons.home_filled)), 9 | // StudGridView( 10 | // title: 'Class Schedule', icon: const Icon(Icons.calendar_month)), 11 | // StudGridView( 12 | // title: 'Attendance', 13 | // icon: const Icon(Icons.assignment_turned_in_sharp)), 14 | // StudGridView(title: 'My Grade', icon: const Icon(Icons.grade)), 15 | // StudGridView(title: 'Payment', icon: const Icon(Icons.payment_sharp)), 16 | // StudGridView( 17 | // title: 'Notifications', icon: const Icon(Icons.notification_add)), 18 | // StudGridView( 19 | // title: 'Add Complain', icon: const Icon(Icons.add_comment_rounded)), 20 | // StudGridView(title: 'Links', icon: const Icon(Icons.link)), 21 | // StudGridView(title: 'About Us', icon: const Icon(Icons.person)), 22 | // StudGridView(title: 'Gallery', icon: const Icon(Icons.photo)), 23 | // // StudGridView(title: 'Class Schedule'), 24 | // // StudGridView(title: 'Class Schedule'), 25 | // ]; 26 | @override 27 | Widget build(BuildContext context) { 28 | return WillPopScope( 29 | onWillPop: () async => wilpop, 30 | child: Scaffold( 31 | appBar: AppBar( 32 | //automaticallyImplyLeading: false, 33 | title: Center( 34 | child: Text( 35 | 'welcome Teacher', 36 | style: Theme.of(context).appBarTheme.titleTextStyle, 37 | ), 38 | ), 39 | ), 40 | endDrawer: const Teachmaindrawer(), 41 | body: Container(), 42 | // GridView.builder( 43 | // padding: const EdgeInsets.all(10), 44 | // // primary: true, 45 | // scrollDirection: Axis.vertical, 46 | // itemCount: homescreengrid.length, 47 | // gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 48 | // crossAxisCount: 2, 49 | // //mainAxisExtent: 20, 50 | // childAspectRatio: 3 / 2, 51 | // crossAxisSpacing: 30, 52 | // mainAxisSpacing: 30, 53 | // ), 54 | // itemBuilder: (ctx, i) { 55 | // return GestureDetector( 56 | // onTap: () => Navigator.push( 57 | // context, 58 | // MaterialPageRoute( 59 | // builder: (context) => const ComplainScreen(), 60 | // )), 61 | // child: Container( 62 | // decoration: BoxDecoration( 63 | // borderRadius: BorderRadius.circular(30), 64 | // gradient: const LinearGradient( 65 | // colors: [ 66 | // Colors.green, 67 | // Colors.green, 68 | // ], 69 | // ), 70 | // ), 71 | // child: Column( 72 | // mainAxisAlignment: MainAxisAlignment.center, 73 | // children: [ 74 | // homescreengrid[i].icon, 75 | // Text( 76 | // homescreengrid[i].title, 77 | // style: const TextStyle( 78 | // fontFamily: 'Lobster', 79 | // fontSize: 30, 80 | // fontWeight: FontWeight.bold, 81 | // // color: Colors.white 82 | // ), 83 | // ), 84 | // ], 85 | // ), 86 | // ), 87 | // ); 88 | // }), 89 | ), 90 | ); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 11 | 12 | # === Flutter Library === 13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 14 | 15 | # Published to parent scope for install step. 16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 20 | 21 | list(APPEND FLUTTER_LIBRARY_HEADERS 22 | "flutter_export.h" 23 | "flutter_windows.h" 24 | "flutter_messenger.h" 25 | "flutter_plugin_registrar.h" 26 | "flutter_texture_registrar.h" 27 | ) 28 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 29 | add_library(flutter INTERFACE) 30 | target_include_directories(flutter INTERFACE 31 | "${EPHEMERAL_DIR}" 32 | ) 33 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 34 | add_dependencies(flutter flutter_assemble) 35 | 36 | # === Wrapper === 37 | list(APPEND CPP_WRAPPER_SOURCES_CORE 38 | "core_implementations.cc" 39 | "standard_codec.cc" 40 | ) 41 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 42 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 43 | "plugin_registrar.cc" 44 | ) 45 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 46 | list(APPEND CPP_WRAPPER_SOURCES_APP 47 | "flutter_engine.cc" 48 | "flutter_view_controller.cc" 49 | ) 50 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 51 | 52 | # Wrapper sources needed for a plugin. 53 | add_library(flutter_wrapper_plugin STATIC 54 | ${CPP_WRAPPER_SOURCES_CORE} 55 | ${CPP_WRAPPER_SOURCES_PLUGIN} 56 | ) 57 | apply_standard_settings(flutter_wrapper_plugin) 58 | set_target_properties(flutter_wrapper_plugin PROPERTIES 59 | POSITION_INDEPENDENT_CODE ON) 60 | set_target_properties(flutter_wrapper_plugin PROPERTIES 61 | CXX_VISIBILITY_PRESET hidden) 62 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 63 | target_include_directories(flutter_wrapper_plugin PUBLIC 64 | "${WRAPPER_ROOT}/include" 65 | ) 66 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 67 | 68 | # Wrapper sources needed for the runner. 69 | add_library(flutter_wrapper_app STATIC 70 | ${CPP_WRAPPER_SOURCES_CORE} 71 | ${CPP_WRAPPER_SOURCES_APP} 72 | ) 73 | apply_standard_settings(flutter_wrapper_app) 74 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 75 | target_include_directories(flutter_wrapper_app PUBLIC 76 | "${WRAPPER_ROOT}/include" 77 | ) 78 | add_dependencies(flutter_wrapper_app flutter_assemble) 79 | 80 | # === Flutter tool backend === 81 | # _phony_ is a non-existent file to force this command to run every time, 82 | # since currently there's no way to get a full input/output list from the 83 | # flutter tool. 84 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 85 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 86 | add_custom_command( 87 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 88 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 89 | ${CPP_WRAPPER_SOURCES_APP} 90 | ${PHONY_OUTPUT} 91 | COMMAND ${CMAKE_COMMAND} -E env 92 | ${FLUTTER_TOOL_ENVIRONMENT} 93 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 94 | windows-x64 $ 95 | VERBATIM 96 | ) 97 | add_custom_target(flutter_assemble DEPENDS 98 | "${FLUTTER_LIBRARY}" 99 | ${FLUTTER_LIBRARY_HEADERS} 100 | ${CPP_WRAPPER_SOURCES_CORE} 101 | ${CPP_WRAPPER_SOURCES_PLUGIN} 102 | ${CPP_WRAPPER_SOURCES_APP} 103 | ) 104 | -------------------------------------------------------------------------------- /lib/widgets/director_main_drawer.dart: -------------------------------------------------------------------------------- 1 | //import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:my_school/screens/director_tasks.dart'; 5 | import 'package:my_school/widgets/footer.dart'; 6 | import '../screens/settings_screen.dart'; 7 | import '../screens/director_main_screen.dart'; 8 | import 'exit_changepin_confirmation.dart'; 9 | 10 | //import '../screens/LoginScreen.dart'; 11 | 12 | // enum randomcolor{ 13 | // //Colors.blue; 14 | 15 | // } 16 | class Directormaindrawer extends StatelessWidget { 17 | const Directormaindrawer({Key? key}) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Drawer( 22 | child: ListView( 23 | children: [ 24 | const SizedBox(), 25 | const UserAccountsDrawerHeader( 26 | currentAccountPicture: CircleAvatar( 27 | backgroundColor: Colors.green, 28 | // child: Image( 29 | // image: NetworkImage( 30 | // 'https://www.google.com/search?q=Sample+image+url&sa=X&biw=1366&bih=649&tbm=isch&source=iu&ictx=1&vet=1&fir=Mdlp-4_rDOTaLM%252C8UmY9BIZlcHvZM%252C_%253Bq9CkBYSVHv6UvM%252C31qpFmzyUINLPM%252C_%253BfK6SFKLhI7Vu7M%252CBR5IrvO_GnylcM%252C_%253BxpeKjqK5OvLVUM%252CBzMXIkeIgYnXEM%252C_%253Bu6m0bqVF_iBVoM%252CINvIfN6HZc1S7M%252C_%253BnqCzAZFVfmrDnM%252CCFueadwjE5FYgM%252C_%253B91qytDE8xcKwEM%252C_c0dVYSNpqbDsM%252C_%253BOfyJgROAhggk9M%252CapLMkmQFiRdKEM%252C_%253BBjJWd619jJVwrM%252CAIa9k_HoAFpNpM%252C_%253BvcDlIJEnD2HHpM%252CKe1g04_Q-Hc_mM%252C_&usg=AI4_-kSo5uWupekDPIDJzXenTJst0-yRxA&ved=2ahUKEwjanqaB9JX2AhWixoUKHR7YCS0Q9QF6BAgBEAE#imgrc=Mdlp-4_rDOTaLM'), 31 | // ), 32 | ), 33 | accountName: Text('accountName'), 34 | accountEmail: Text('jegisew21@gmail.com'), 35 | ), 36 | ListTile( 37 | title: const Text('Home'), 38 | trailing: const Icon(Icons.home), 39 | onTap: () => Navigator.pushReplacement( 40 | context, 41 | MaterialPageRoute( 42 | builder: ((context) => const DirectorMainScreen())), 43 | ), 44 | ), 45 | ListTile( 46 | title: const Text('Tasks'), 47 | trailing: const Icon(Icons.task), 48 | onTap: () { 49 | Navigator.pushReplacement( 50 | context, 51 | MaterialPageRoute( 52 | builder: (context) => const Directortasks())); 53 | }, 54 | ), 55 | const Divider(), 56 | ListTile( 57 | trailing: const Icon(Icons.settings), 58 | title: const Text('Settings'), 59 | onTap: () { 60 | Navigator.pushReplacement( 61 | context, 62 | MaterialPageRoute( 63 | builder: (context) => const SettingsScreen())); 64 | }, 65 | ), 66 | const Divider(), 67 | const ExitConfirmation(), 68 | const FooterText(), 69 | // Padding( 70 | // padding: const EdgeInsets.only(top: 140), 71 | // child: Row( 72 | // mainAxisAlignment: MainAxisAlignment.center, 73 | // children: const [ 74 | // Padding( 75 | // padding: EdgeInsets.only( 76 | // right: 10, 77 | // ), 78 | // child: Icon(Icons.school)), 79 | // Text('Montosorian high school'), 80 | // ], 81 | // ), 82 | // ), 83 | // const Center( 84 | // child: Text( 85 | // 'School management system web app(v.1)', 86 | // style: TextStyle( 87 | // fontFamily: 'Raleway', 88 | // fontStyle: FontStyle.italic, 89 | // fontSize: 15, 90 | // ), 91 | // ), 92 | // ), 93 | ], 94 | ), 95 | ); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /lib/screens/director_tasks.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:my_school/widgets/add_post.dart'; 3 | import 'package:my_school/widgets/director_main_drawer.dart'; 4 | 5 | class Directortasks extends StatefulWidget { 6 | const Directortasks({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _DirectortasksState(); 10 | } 11 | 12 | class _DirectortasksState extends State { 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return DefaultTabController( 17 | length: 2, 18 | child: Scaffold( 19 | appBar: AppBar(), 20 | drawer: const Directormaindrawer(), 21 | body: Column( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | Row( 25 | children: const [ 26 | Padding( 27 | padding: EdgeInsets.only(left: 20, top: 50), 28 | child: Icon( 29 | Icons.task, 30 | size: 40, 31 | color: Color.fromARGB(255, 68, 138, 255), 32 | ), 33 | ), 34 | Padding( 35 | padding: EdgeInsets.only(left: 20, top: 50), 36 | child: Text( 37 | 'Tasks', 38 | style: TextStyle( 39 | fontFamily: 'RobotoMono', 40 | fontWeight: FontWeight.bold, 41 | fontSize: 30, 42 | ), 43 | ), 44 | ), 45 | ], 46 | ), 47 | Row( 48 | mainAxisAlignment: MainAxisAlignment.start, 49 | children: [ 50 | RotatedBox( 51 | quarterTurns: 1, 52 | child: Container( 53 | padding: const EdgeInsets.only(left: 20), 54 | width: 300, 55 | height: 250, 56 | child: const TabBar( 57 | indicatorPadding: EdgeInsets.all(10), 58 | indicatorWeight: 13, 59 | indicatorSize: TabBarIndicatorSize.tab, 60 | indicatorColor: Colors.black, 61 | unselectedLabelColor: Colors.black, 62 | unselectedLabelStyle: TextStyle( 63 | backgroundColor: Colors.white, 64 | ), 65 | padding: EdgeInsets.only(top: 0), 66 | isScrollable: true, 67 | labelColor: Colors.white, 68 | labelStyle: TextStyle( 69 | backgroundColor: Colors.green, 70 | fontFamily: 'RobotoMono', 71 | fontWeight: FontWeight.bold, 72 | fontSize: 20), 73 | tabs: [ 74 | RotatedBox( 75 | quarterTurns: 3, child: Text('View Report')), 76 | RotatedBox( 77 | quarterTurns: 3, 78 | child: Text('Add Post'), 79 | ), 80 | ]), 81 | ), 82 | ), 83 | const Flexible( 84 | child: Card( 85 | elevation: 30, 86 | margin: EdgeInsets.only(left: 150, right: 200), 87 | child: SizedBox( 88 | height: 500, 89 | child: TabBarView(children: [ 90 | Center( 91 | child: Text('view report...'), 92 | ), 93 | AddPost('Director'), 94 | ]), 95 | ), 96 | )) 97 | ], 98 | ), 99 | ], 100 | ), 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /lib/services/sample_http.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:http/http.dart' as http; 3 | import '../models/json_convert_to_list.dart'; 4 | 5 | // List responses(String josndata) { 6 | // final converted = json.decode(josndata).cast>(); 7 | // return converted.map((json) => response.fromJson(json)).toList(); 8 | // } 9 | 10 | Future addStudent( 11 | fname, mname, lname, age, gender, grade, phone, address) async { 12 | const url = 'http://10.162.75.141/php/addstudent.php'; 13 | var _response = await http.post(Uri.parse(url), body: { 14 | 'fn': fname, 15 | 'mn': mname, 16 | 'ln': lname, 17 | 'age': age, 18 | 'add': address, 19 | 'sex': gender, 20 | 'level': grade, 21 | 'phonen': '+251' + phone, 22 | }); 23 | print(json.decode(_response.body)); 24 | } 25 | 26 | Future addDirector( 27 | fname, mname, lname, age, gender, qlfn, phone, address, salary, exp) async { 28 | const url = 'http://10.162.75.141/php/adddirector.php'; 29 | var _response = await http.post(Uri.parse(url), body: { 30 | 'fname': fname, 31 | 'mname': mname, 32 | 'lname': lname, 33 | 'age': age, 34 | 'add': address, 35 | 'sex': gender, 36 | 'qlfn': qlfn, 37 | 'phonen': '+251' + phone, 38 | 'salary': salary + ' ' + 'ETB', 39 | 'exp': exp + ' ' + 'Years', 40 | }); 41 | print(json.decode(json.encode(_response.body))); 42 | } 43 | 44 | Future addTeacher( 45 | fname, mname, lname, age, gender, qlfn, phone, address, salary, exp) async { 46 | const url = 'http://10.162.75.141/php/addteacher.php'; 47 | var _response = await http.post(Uri.parse(url), body: { 48 | 'fname': fname, 49 | 'mname': mname, 50 | 'lname': lname, 51 | 'age': age, 52 | 'add': address, 53 | 'sex': gender, 54 | 'qlfn': qlfn, 55 | 'phonen': '+251' + ' ' + phone, 56 | 'salary': salary + ' ' + 'ETB', 57 | 'exp': exp + ' ' + 'Years', 58 | }); 59 | print(json.decode(json.encode(_response.body))); 60 | } 61 | 62 | Future addParent( 63 | fname, mname, lname, age, gender, grade, phone, address) async { 64 | const url = 'http://10.162.75.141/php/addparent.php'; 65 | var response = await http.post(Uri.parse(url), body: { 66 | 'fn': fname, 67 | 'mn': mname, 68 | 'ln': lname, 69 | 'age': age, 70 | 'add': address, 71 | 'sex': gender, 72 | 'level': grade, 73 | 'phonen': phone, 74 | }); 75 | print(json.decode(json.encode(response.body))); 76 | } 77 | 78 | Future addSubject(sname, scode, grade, credit) async { 79 | const url = 'http://10.162.74.62/php/addsubject.php'; 80 | var response = await http.post(Uri.parse(url), 81 | body: {'sname': sname, 'scode': scode, 'grade': grade, 'credit': credit}); 82 | print(json.decode(json.encode(response.body))); 83 | } 84 | 85 | //manage student 86 | Future manageStudent() async { 87 | const url = 'http://10.162.75.141/php/fetchstudent.php'; 88 | var response = await http.post(Uri.parse(url)); 89 | //print(response.body); 90 | if (response.statusCode == 200) { 91 | 92 | // If the server did return a 200 OK response, 93 | // then parse the JSON. 94 | return Student.fromJson(jsonDecode(response.body)); 95 | } else { 96 | // If the server did not return a 200 OK response, 97 | // then throw an exception. 98 | throw Exception('Failed to load Student'); 99 | } 100 | } 101 | //active deactive user 102 | 103 | Future active(String id, int status, String role) async { 104 | const url = 'http://10.162.75.141/php/activateuser.php'; 105 | var _activateuser = await http.post(Uri.parse(url), 106 | body: {'id': id, 'status': status.toString(), 'role': role}); 107 | print(_activateuser.body); 108 | 109 | // var _returned = json.decode(_activateuser.body); 110 | //print(_returned); 111 | } 112 | 113 | // Future deactive(fname) async { 114 | // const url = 'http://10.162.74.62/php/deactivateuser.php'; 115 | // var _deactivateuser = await http.post(Uri.parse(url), 116 | // body: { 117 | // 'id':fname 118 | // }); 119 | 120 | // print(_deactivateuser.body); 121 | // } 122 | -------------------------------------------------------------------------------- /lib/screens/stud_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widgets/stud_main_drawer.dart'; 3 | 4 | class StudView extends StatefulWidget { 5 | const StudView({Key? key}) : super(key: key); 6 | 7 | @override 8 | State createState() => _StudViewState(); 9 | } 10 | 11 | class _StudViewState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return DefaultTabController( 15 | length: 3, 16 | child: Scaffold( 17 | appBar: AppBar(), 18 | drawer: const Studmaindrawer(), 19 | body: Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | Row( 23 | children: const [ 24 | Padding( 25 | padding: EdgeInsets.only(left: 20, top: 50), 26 | child: Icon( 27 | Icons.remove_red_eye, 28 | size: 40, 29 | color: Color.fromARGB(255, 68, 138, 255), 30 | ), 31 | ), 32 | Padding( 33 | padding: EdgeInsets.only(left: 20, top: 50), 34 | child: Text( 35 | 'View', 36 | style: TextStyle( 37 | fontFamily: 'RobotoMono', 38 | fontWeight: FontWeight.bold, 39 | fontSize: 30, 40 | ), 41 | ), 42 | ), 43 | ], 44 | ), 45 | Row( 46 | //contains all tabs horiontally 47 | mainAxisAlignment: MainAxisAlignment.start, 48 | children: [ 49 | RotatedBox( 50 | //here to rotate the tabs 51 | quarterTurns: 1, //describes degree of rotation 1=90 degree 52 | child: Container( 53 | padding: const EdgeInsets.only(left: 20), 54 | width: 300, 55 | height: 250, 56 | child: const TabBar( 57 | indicatorPadding: EdgeInsets.all(10), 58 | indicatorWeight: 13, 59 | indicatorSize: TabBarIndicatorSize.label, 60 | indicatorColor: Colors.black, 61 | unselectedLabelColor: Colors.black, 62 | unselectedLabelStyle: TextStyle( 63 | backgroundColor: Colors.white, 64 | ), 65 | padding: EdgeInsets.only(top: 0), 66 | isScrollable: true, 67 | labelColor: Colors.white, 68 | labelStyle: TextStyle( 69 | backgroundColor: Colors.green, 70 | //color: Colors.black, 71 | fontFamily: 'RobotoMono', 72 | fontWeight: FontWeight.bold, 73 | fontSize: 20), 74 | tabs: [ 75 | RotatedBox( 76 | quarterTurns: 3, 77 | child: Text('Marks'), 78 | ), 79 | RotatedBox( 80 | quarterTurns: 3, 81 | child: Text('Time Table'), 82 | ), 83 | RotatedBox( 84 | quarterTurns: 3, child: Text('Notifications')), 85 | ]), 86 | ), 87 | ), 88 | const Flexible( 89 | child: Card( 90 | elevation: 30, 91 | margin: EdgeInsets.only(left: 150, right: 200), 92 | child: SizedBox( 93 | //padding: const EdgeInsets.only(left: 150, right: 200), 94 | //width: double.maxFinite, 95 | height: 550, 96 | child: TabBarView( 97 | children: [ 98 | Text('tab1'), 99 | Text('tab2'), 100 | Text('tab3'), 101 | ], 102 | ), 103 | ), 104 | ), 105 | ), 106 | ]), 107 | ], 108 | ), 109 | ), 110 | ); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/widgets/admin_main_drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:my_school/screens/manage_user.dart'; 3 | import 'package:my_school/screens/settings_screen.dart'; 4 | import 'package:my_school/screens/add_user.dart'; 5 | import 'package:my_school/screens/payment_record.dart'; 6 | import 'package:my_school/widgets/footer.dart'; 7 | import 'exit_changepin_confirmation.dart'; 8 | 9 | class AdminMainDrawer extends StatelessWidget { 10 | const AdminMainDrawer({Key? key}) : super(key: key); 11 | 12 | // final List admnindrawer = [ 13 | // AdminDrawer(title: 'Home', icon: const Icon(Icons.home)), 14 | // AdminDrawer(title: 'Add student', icon: const Icon(Icons.add)), 15 | // AdminDrawer( 16 | // title: 'Manage Student', icon: const Icon(Icons.manage_accounts)), 17 | // AdminDrawer(title: 'Add Teacher', icon: const Icon(Icons.add)), 18 | // AdminDrawer( 19 | // title: 'Manage Teacher', icon: const Icon(Icons.manage_accounts)), 20 | // AdminDrawer(title: 'Add Subject', icon: const Icon(Icons.add)), 21 | // AdminDrawer( 22 | // title: 'Manage Subject', icon: const Icon(Icons.manage_accounts)), 23 | // AdminDrawer(title: 'View Feedback', icon: const Icon(Icons.comment)), 24 | // AdminDrawer(title: 'Change Pin', icon: const Icon(Icons.change_circle)), 25 | // AdminDrawer(title: 'Logout', icon: const Icon(Icons.exit_to_app)), 26 | // ]; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Drawer( 31 | child: ListView( 32 | children: [ 33 | const UserAccountsDrawerHeader( 34 | currentAccountPicture: CircleAvatar(), 35 | accountName: Text('Dagi'), 36 | accountEmail: Text('jegisew21@gmail.com'), 37 | ), 38 | Card( 39 | child: ListTile( 40 | title: const Text('Home'), 41 | trailing: const Icon(Icons.home), 42 | onTap: () { 43 | Navigator.pop(context); 44 | }, 45 | ), 46 | ), 47 | Card( 48 | child: ListTile( 49 | title: const Text('Add User'), 50 | trailing: const Icon(Icons.person_add), 51 | onTap: () { 52 | Navigator.push( 53 | context, 54 | MaterialPageRoute( 55 | builder: (context) => const Adduser())); 56 | }, 57 | ), 58 | ), 59 | Card( 60 | child: ListTile( 61 | title: const Text('Manage User'), 62 | trailing: const Icon(Icons.manage_accounts), 63 | onTap: () { 64 | Navigator.pushReplacement(context, 65 | MaterialPageRoute(builder: (context) => const ManageUser())); 66 | }, 67 | ), 68 | ), 69 | Card( 70 | child: ListTile( 71 | title: const Text('Payment'), 72 | trailing: const Icon(Icons.account_balance_wallet), 73 | onTap: () { 74 | Navigator.pushReplacement( 75 | context, 76 | MaterialPageRoute( 77 | builder: (context) => const PaymentRecord())); 78 | }, 79 | ), 80 | ), 81 | Card( 82 | child: ListTile( 83 | title: const Text('Inbox'), 84 | trailing: const Icon(Icons.inbox), 85 | onTap: () {}, 86 | ), 87 | ), 88 | Card( 89 | child: ListTile( 90 | title: const Text('Settings'), 91 | trailing: const Icon(Icons.settings), 92 | onTap: () { 93 | Navigator.pushReplacement( 94 | context, 95 | MaterialPageRoute( 96 | builder: (context) => const SettingsScreen(), 97 | )); 98 | }, 99 | ), 100 | ), 101 | 102 | const Card( 103 | child: ExitConfirmation(), 104 | ), 105 | const FooterText(), 106 | ], 107 | ), 108 | 109 | // ListView.builder( 110 | // itemBuilder: (context, i) { 111 | // return Card( 112 | // child: ListTile( 113 | // trailing: admnindrawer[i].icon, 114 | // title: Text(admnindrawer[i].title), 115 | // ), 116 | // ); 117 | // }, 118 | // itemCount: admnindrawer.length, 119 | // ), 120 | ); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: my_school 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.15.1 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | provider: ^6.0.2 38 | http: ^0.13.4 39 | dropdown_button2: ^1.4.0 40 | shared_preferences_web: ^2.0.4 41 | 42 | dev_dependencies: 43 | flutter_test: 44 | sdk: flutter 45 | 46 | # The "flutter_lints" package below contains a set of recommended lints to 47 | # encourage good coding practices. The lint set provided by the package is 48 | # activated in the `analysis_options.yaml` file located at the root of your 49 | # package. See that file for information about deactivating specific lint 50 | # rules and activating additional ones. 51 | flutter_lints: ^1.0.0 52 | 53 | # For information on the generic Dart part of this file, see the 54 | # following page: https://dart.dev/tools/pub/pubspec 55 | 56 | # The following section is specific to Flutter. 57 | flutter: 58 | 59 | # The following line ensures that the Material Icons font is 60 | # included with your application, so that you can use the icons in 61 | # the material Icons class. 62 | generate: true 63 | uses-material-design: true 64 | 65 | # To add assets to your application, add an assets section, like this: 66 | assets: 67 | - images/background.png 68 | - images/lock.jpg 69 | - images/lockwithkey.jpg 70 | - images/userwithlock.jpg 71 | - images/userwithlockblack.jpg 72 | - images/stemclipart.jpg 73 | - images/knowledge.jfif 74 | - images/grad cape.jfif 75 | - images/learnedustudy.jfif 76 | - images/coffeenotpad.jpg 77 | - images/edu.jfif 78 | 79 | 80 | # An image asset can refer to one or more resolution-specific "variants", see 81 | # https://flutter.dev/assets-and-images/#resolution-aware. 82 | 83 | # For details regarding adding assets from package dependencies, see 84 | # https://flutter.dev/assets-and-images/#from-packages 85 | 86 | # To add custom fonts to your application, add a fonts section here, 87 | # in this "flutter" section. Each entry in this list should have a 88 | # "family" key with the font family name, and a "fonts" key with a 89 | # list giving the asset and other descriptors for the font. For 90 | # example: 91 | fonts: 92 | - family: Raleway 93 | fonts: 94 | - asset: fonts/Raleway-Regular.ttf 95 | - asset: fonts/Raleway-BoldItalic.ttf 96 | - asset: fonts/Raleway-Regular.ttf 97 | - asset: fonts/Raleway-Light.ttf 98 | - asset: fonts/Raleway-Bold.ttf 99 | weight: 900 100 | 101 | - family: RobotoMono 102 | fonts: 103 | - asset: fonts/RobotoMono-Regular.ttf 104 | - asset: fonts/RobotoMono-Bold.ttf 105 | - asset: fonts/RobotoMono-BoldItalic.ttf 106 | - asset: fonts/RobotoMono-Bold.ttf 107 | weight: 700 108 | - family: Lobster 109 | fonts: 110 | - asset: fonts/Lobster-Regular.ttf 111 | 112 | 113 | # 114 | # For details regarding fonts from package dependencies, 115 | # see https://flutter.dev/custom-fonts/#from-packages 116 | -------------------------------------------------------------------------------- /lib/screens/teach_activities.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:my_school/widgets/add_post.dart'; 3 | import '../widgets/teach_main_drawer.dart'; 4 | 5 | class Teachactivities extends StatefulWidget { 6 | const Teachactivities({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _TeachactivitiesState(); 10 | } 11 | 12 | class _TeachactivitiesState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return DefaultTabController( 16 | length: 4, 17 | child: Scaffold( 18 | appBar: AppBar(), 19 | drawer: const Teachmaindrawer(), 20 | body: Column( 21 | crossAxisAlignment: CrossAxisAlignment.start, 22 | children: [ 23 | Row( 24 | children: const [ 25 | Padding( 26 | padding: EdgeInsets.only(left: 20, top: 50), 27 | child: Icon( 28 | Icons.local_activity, 29 | size: 40, 30 | color: Color.fromARGB(255, 68, 138, 255), 31 | ), 32 | ), 33 | Padding( 34 | padding: EdgeInsets.only(left: 20, top: 50), 35 | child: Text( 36 | 'Activities', 37 | style: TextStyle( 38 | fontFamily: 'RobotoMono', 39 | fontWeight: FontWeight.bold, 40 | fontSize: 30, 41 | ), 42 | ), 43 | ), 44 | ], 45 | ), 46 | Row( 47 | mainAxisAlignment: MainAxisAlignment.start, 48 | children: [ 49 | RotatedBox( 50 | quarterTurns: 1, 51 | child: Container( 52 | padding: const EdgeInsets.only(left: 20), 53 | // decoration: const BoxDecoration( 54 | // gradient: LinearGradient(colors: [ 55 | // Colors.amber, 56 | // Colors.amber, 57 | // ])), 58 | width: 300, 59 | height: 250, 60 | child: const TabBar( 61 | indicatorPadding: EdgeInsets.all(10), 62 | indicatorWeight: 13, 63 | indicatorSize: TabBarIndicatorSize.tab, 64 | indicatorColor: Colors.black, 65 | unselectedLabelColor: Colors.black, 66 | unselectedLabelStyle: TextStyle( 67 | backgroundColor: Colors.white, 68 | ), 69 | padding: EdgeInsets.only(top: 0), 70 | isScrollable: true, 71 | labelColor: Colors.white, 72 | labelStyle: TextStyle( 73 | backgroundColor: Colors.green, 74 | //color: Colors.black, 75 | fontFamily: 'RobotoMono', 76 | fontWeight: FontWeight.bold, 77 | fontSize: 20), 78 | tabs: [ 79 | RotatedBox( 80 | quarterTurns: 3, child: Text('Add Attendance')), 81 | RotatedBox( 82 | quarterTurns: 3, 83 | child: Text('View Notification'), 84 | ), 85 | RotatedBox( 86 | quarterTurns: 3, child: Text('Submit Grade')), 87 | RotatedBox( 88 | quarterTurns: 3, 89 | child: Text('Post Notification')), 90 | ]), 91 | ), 92 | ), 93 | const Flexible( 94 | child: Card( 95 | elevation: 30, 96 | margin: EdgeInsets.only(left: 150, right: 200), 97 | child: SizedBox( 98 | //padding: const EdgeInsets.only(left: 150, right: 200), 99 | //width: double.maxFinite, 100 | height: 500, 101 | child: TabBarView(children: [ 102 | Center( 103 | child: Text('Add At...'), 104 | ), 105 | Center( 106 | child: Text('View N...'), 107 | ), 108 | Center( 109 | child: Text('Submit G...'), 110 | ), 111 | Center( 112 | child: AddPost('Teacher'), 113 | ), 114 | ]), 115 | ), 116 | )) 117 | ], 118 | ), 119 | ], 120 | ), 121 | ), 122 | ); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/widgets/exit_changepin_confirmation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../screens/home_screen.dart'; 3 | 4 | class ExitConfirmation extends StatelessWidget { 5 | const ExitConfirmation({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return ListTile( 10 | // title: 11 | title: const Text('Logout'), 12 | trailing: const Icon( 13 | Icons.logout, 14 | ), 15 | onTap: () { 16 | showDialog( 17 | context: context, 18 | builder: (ctx) { 19 | return AlertDialog( 20 | title: Row( 21 | children: const [ 22 | Padding( 23 | padding: EdgeInsets.only(right: 10), 24 | child: Icon( 25 | Icons.warning, 26 | size: 40, 27 | color: Color.fromARGB(255, 183, 140, 13), 28 | )), 29 | Text( 30 | 'Exit?', 31 | style: TextStyle( 32 | fontFamily: 'Raleway', 33 | fontWeight: FontWeight.bold, 34 | fontSize: 30, 35 | ), 36 | ) 37 | ], 38 | ), 39 | content: const Text('are you sure you want to exit?'), 40 | actions: [ 41 | Row( 42 | children: [ 43 | ElevatedButton( 44 | style: ElevatedButton.styleFrom( 45 | primary: Colors.white, elevation: 0.0), 46 | onPressed: () { 47 | Navigator.pushReplacement( 48 | context, 49 | MaterialPageRoute( 50 | builder: (context) => const Homescreen()), 51 | ); 52 | }, 53 | child: const Text( 54 | 'Yes', 55 | style: TextStyle( 56 | color: Color.fromARGB(255, 241, 66, 66)), 57 | ), 58 | ), 59 | const Spacer(), 60 | ElevatedButton( 61 | style: ElevatedButton.styleFrom( 62 | primary: Colors.white, elevation: 0.0), 63 | onPressed: () { 64 | Navigator.of(context).pop(); 65 | Navigator.of(context).pop(); 66 | }, 67 | child: const Text( 68 | 'Cancel', 69 | style: TextStyle( 70 | color: Color.fromARGB(255, 241, 66, 66)), 71 | ), 72 | ), 73 | ], 74 | ), 75 | ], 76 | ); 77 | }); 78 | }); 79 | } 80 | } 81 | 82 | class ChangePin extends StatelessWidget { 83 | const ChangePin({Key? key}) : super(key: key); 84 | 85 | @override 86 | Widget build(BuildContext context) { 87 | return ListTile( 88 | trailing: const Icon(Icons.change_circle), 89 | title: const Text('Change Pin'), 90 | onTap: () { 91 | Navigator.pop(context); 92 | showModalBottomSheet( 93 | constraints: const BoxConstraints( 94 | maxHeight: 400, 95 | ), 96 | context: context, 97 | builder: (ctx) { 98 | return Column(children: [ 99 | const Padding( 100 | padding: EdgeInsets.only( 101 | left: 10, right: 10, top: 30, bottom: 20), 102 | child: TextField( 103 | decoration: InputDecoration( 104 | hintText: 'Enter old pin', 105 | ), 106 | style: TextStyle(), 107 | ), 108 | ), 109 | const Padding( 110 | padding: EdgeInsets.only( 111 | left: 10, right: 10, top: 30, bottom: 20), 112 | child: TextField( 113 | decoration: InputDecoration( 114 | hintText: 'Enter new pin', 115 | )), 116 | ), 117 | const Padding( 118 | padding: EdgeInsets.only( 119 | left: 10, right: 10, top: 30, bottom: 20), 120 | child: TextField( 121 | decoration: InputDecoration( 122 | hintText: 'Confirm new pin', 123 | )), 124 | ), 125 | OutlinedButton( 126 | onPressed: () {}, 127 | child: const Text('Update'), 128 | ), 129 | ]); 130 | }); 131 | 132 | // pin update page will pop up. 133 | }); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /lib/screens/settings_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:my_school/widgets/teach_main_drawer.dart'; 3 | 4 | class SettingsScreen extends StatefulWidget { 5 | const SettingsScreen({Key? key}) : super(key: key); 6 | 7 | @override 8 | State createState() => _SettingsScreenState(); 9 | } 10 | 11 | class _SettingsScreenState extends State { 12 | // Widget userlogindetector(){ 13 | // if(logeduser==student{ 14 | // return Studmaindrawer(); 15 | // }else if(logeduser==parent){ 16 | // return ParentMainDrawer(); 17 | // }else if(logeduser==admin){ 18 | // return AdminMainDrawer(); 19 | // }else if(logeduser==teacher){ 20 | // return teacherMainDrawer(); 21 | // }else{ 22 | // return DirectorMainDrawer(); 23 | // } 24 | // } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return DefaultTabController( 29 | length: 2, 30 | child: Scaffold( 31 | appBar: AppBar(), 32 | // endDrawer: userlogindetector, 33 | drawer: const Teachmaindrawer(), 34 | body: Column( 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | children: [ 37 | Row( 38 | children: const [ 39 | Padding( 40 | padding: EdgeInsets.only(left: 15, top: 50), 41 | child: Icon( 42 | Icons.settings, 43 | size: 40, 44 | color: Color.fromARGB(255, 68, 138, 255), 45 | ), 46 | ), 47 | Padding( 48 | padding: EdgeInsets.only(left: 15, top: 50), 49 | child: Text( 50 | 'Settings', 51 | style: TextStyle( 52 | fontFamily: 'RobotoMono', 53 | fontWeight: FontWeight.bold, 54 | fontSize: 30, 55 | ), 56 | ), 57 | ), 58 | ], 59 | ), 60 | Row( 61 | children: [ 62 | Padding( 63 | padding: const EdgeInsets.only(left: 20), 64 | child: RotatedBox( 65 | quarterTurns: 1, 66 | child: SizedBox( 67 | // decoration: const BoxDecoration( 68 | // gradient: LinearGradient(colors: [ 69 | // Colors.amber, 70 | // Colors.amber, 71 | // ])), 72 | width: 130, 73 | height: 150, 74 | child: Column( 75 | children: const [ 76 | TabBar( 77 | indicatorPadding: EdgeInsets.all(10), 78 | indicatorWeight: 13, 79 | indicatorSize: TabBarIndicatorSize.label, 80 | indicatorColor: Colors.black, 81 | unselectedLabelColor: Colors.black, 82 | unselectedLabelStyle: TextStyle( 83 | backgroundColor: Colors.white, 84 | ), 85 | padding: EdgeInsets.only(top: 0), 86 | isScrollable: true, 87 | labelColor: Colors.white, 88 | labelStyle: TextStyle( 89 | backgroundColor: Colors.green, 90 | //color: Colors.black, 91 | fontFamily: 'RobotoMono', 92 | fontWeight: FontWeight.bold, 93 | fontSize: 20), 94 | tabs: [ 95 | RotatedBox( 96 | quarterTurns: 3, 97 | child: Text( 98 | 'Profile', 99 | ), 100 | ), 101 | RotatedBox( 102 | quarterTurns: 3, 103 | child: Text( 104 | 'Change pin', 105 | ), 106 | ), 107 | ]), 108 | ], 109 | ), 110 | ), 111 | ), 112 | ), 113 | const Flexible( 114 | child: Card( 115 | elevation: 20, 116 | margin: EdgeInsets.only(left: 150, right: 200), 117 | child: SizedBox( 118 | // padding: const EdgeInsets.only(left: 160, right: 150), 119 | //alignment: Alignment.center, 120 | height: 500, 121 | // width: 780, 122 | // width: double.maxFinite, 123 | child: TabBarView( 124 | children: [ 125 | Center( 126 | child: Text('Profile'), 127 | ), 128 | Center( 129 | child: Text('change pin'), 130 | ), 131 | ], 132 | ), 133 | ), 134 | ), 135 | ) 136 | ], 137 | ) 138 | ], 139 | ), 140 | ), 141 | ); 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /lib/screens/add_user.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../screens/director_registration.dart'; 3 | import '../screens/parent_registration.dart'; 4 | import '../screens/stud_registratin.dart'; 5 | import '../screens/subject_registration.dart'; 6 | import '../screens/teach_registration.dart'; 7 | import '../widgets/admin_main_drawer.dart'; 8 | 9 | class Adduser extends StatefulWidget { 10 | const Adduser({Key? key}) : super(key: key); 11 | 12 | @override 13 | State createState() => _AdduserState(); 14 | } 15 | 16 | class _AdduserState extends State { 17 | // List genderdropdownitems = [ 18 | // 'Male', 19 | // 'Female', 20 | // ]; 21 | // List gradedropdownitems = [ 22 | // 'KG 1', 23 | // 'KG 2', 24 | // 'KG 3', 25 | // 'G-1', 26 | // 'G-2', 27 | // 'G-3', 28 | // 'G-4', 29 | // 'G-5', 30 | // 'G-6', 31 | // 'G-7', 32 | // 'G-8', 33 | // 'G-9', 34 | // 'G-10', 35 | // 'G-11', 36 | // 'G-12' 37 | // ]; 38 | // final phonecontroller = TextEditingController(); 39 | // final fnamecontroller = TextEditingController(); 40 | // final mnamecontroller = TextEditingController(); 41 | // final addresscontroller = TextEditingController(); 42 | // final lnamecontroller = TextEditingController(); 43 | // final agecontroller = TextEditingController(); 44 | // final addressContoller = TextEditingController(); 45 | // final formkey = GlobalKey(); 46 | 47 | // TextStyle errorstyle() { 48 | // return const TextStyle( 49 | // fontWeight: FontWeight.bold, backgroundColor: Colors.white); 50 | // } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | // var gradedropdownvalue = 'KG 1'; 55 | // var genderdropdownvalue = 'Male'; 56 | // var platform = (defaultTargetPlatform == TargetPlatform.android || 57 | // defaultTargetPlatform == TargetPlatform.iOS); 58 | 59 | return DefaultTabController( 60 | length: 5, 61 | child: Scaffold( 62 | appBar: AppBar(), 63 | drawer:const AdminMainDrawer(), 64 | body: Column( 65 | crossAxisAlignment: CrossAxisAlignment.start, 66 | children: [ 67 | Row( 68 | children: const [ 69 | Padding( 70 | padding: EdgeInsets.only(left: 20, top: 50), 71 | child: Icon( 72 | Icons.person_add, 73 | size: 40, 74 | color: Color.fromARGB(255, 68, 138, 255), 75 | ), 76 | ), 77 | Padding( 78 | padding: EdgeInsets.only(left: 20, top: 50), 79 | child: Text( 80 | 'Add User', 81 | style: TextStyle( 82 | fontFamily: 'RobotoMono', 83 | fontWeight: FontWeight.bold, 84 | fontSize: 30, 85 | ), 86 | ), 87 | ), 88 | ], 89 | ), 90 | Row( 91 | mainAxisAlignment: MainAxisAlignment.start, 92 | children: [ 93 | RotatedBox( 94 | quarterTurns: 1, 95 | child: Container( 96 | padding: const EdgeInsets.only(left: 20), 97 | // decoration: const BoxDecoration( 98 | // gradient: LinearGradient(colors: [ 99 | // Colors.amber, 100 | // Colors.amber, 101 | // ])), 102 | width: 300, 103 | height: 250, 104 | child: const TabBar( 105 | indicatorPadding: EdgeInsets.all(10), 106 | indicatorWeight: 13, 107 | indicatorSize: TabBarIndicatorSize.label, 108 | indicatorColor: Colors.black, 109 | unselectedLabelColor: Colors.black, 110 | unselectedLabelStyle: TextStyle( 111 | backgroundColor: Colors.white, 112 | ), 113 | padding: EdgeInsets.only(top: 0), 114 | isScrollable: true, 115 | labelColor: Colors.white, 116 | labelStyle: TextStyle( 117 | backgroundColor: Colors.green, 118 | //color: Colors.black, 119 | fontFamily: 'RobotoMono', 120 | fontWeight: FontWeight.bold, 121 | fontSize: 20), 122 | tabs: [ 123 | RotatedBox(quarterTurns: 3, child: Text('Add Student')), 124 | RotatedBox( 125 | quarterTurns: 3, 126 | child: Text('Add Teacher'), 127 | ), 128 | RotatedBox( 129 | quarterTurns: 3, child: Text('Add Director')), 130 | RotatedBox(quarterTurns: 3, child: Text('Add Parent')), 131 | RotatedBox(quarterTurns: 3, child: Text('Add Subject')), 132 | ]), 133 | ), 134 | ), 135 | const Flexible( 136 | child: Card( 137 | elevation: 30, 138 | margin: EdgeInsets.only(left: 150, right: 200), 139 | child: SizedBox( 140 | //padding: const EdgeInsets.only(left: 150, right: 200), 141 | //width: double.maxFinite, 142 | height: 550, 143 | child: TabBarView( 144 | children: [ 145 | StudRegistration(), 146 | TeachRegistration(), 147 | DirectorRegistration(), 148 | ParentRegistration(), 149 | SubjectRegistration(), 150 | ], 151 | ), 152 | ), 153 | ), 154 | ), 155 | ]), 156 | ], 157 | ), 158 | ), 159 | ); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.8.2" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.2.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.3.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.16.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.4" 53 | dropdown_button2: 54 | dependency: "direct main" 55 | description: 56 | name: dropdown_button2 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.4.0" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.3.0" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_lints: 73 | dependency: "direct dev" 74 | description: 75 | name: flutter_lints 76 | url: "https://pub.dartlang.org" 77 | source: hosted 78 | version: "1.0.4" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | flutter_web_plugins: 85 | dependency: transitive 86 | description: flutter 87 | source: sdk 88 | version: "0.0.0" 89 | http: 90 | dependency: "direct main" 91 | description: 92 | name: http 93 | url: "https://pub.dartlang.org" 94 | source: hosted 95 | version: "0.13.4" 96 | http_parser: 97 | dependency: transitive 98 | description: 99 | name: http_parser 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "4.0.1" 103 | js: 104 | dependency: transitive 105 | description: 106 | name: js 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "0.6.4" 110 | lints: 111 | dependency: transitive 112 | description: 113 | name: lints 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.0.1" 117 | matcher: 118 | dependency: transitive 119 | description: 120 | name: matcher 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "0.12.11" 124 | material_color_utilities: 125 | dependency: transitive 126 | description: 127 | name: material_color_utilities 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "0.1.4" 131 | meta: 132 | dependency: transitive 133 | description: 134 | name: meta 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.7.0" 138 | nested: 139 | dependency: transitive 140 | description: 141 | name: nested 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.0.0" 145 | path: 146 | dependency: transitive 147 | description: 148 | name: path 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.8.1" 152 | provider: 153 | dependency: "direct main" 154 | description: 155 | name: provider 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "6.0.2" 159 | shared_preferences_platform_interface: 160 | dependency: transitive 161 | description: 162 | name: shared_preferences_platform_interface 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.0.0" 166 | shared_preferences_web: 167 | dependency: "direct main" 168 | description: 169 | name: shared_preferences_web 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "2.0.4" 173 | sky_engine: 174 | dependency: transitive 175 | description: flutter 176 | source: sdk 177 | version: "0.0.99" 178 | source_span: 179 | dependency: transitive 180 | description: 181 | name: source_span 182 | url: "https://pub.dartlang.org" 183 | source: hosted 184 | version: "1.8.2" 185 | stack_trace: 186 | dependency: transitive 187 | description: 188 | name: stack_trace 189 | url: "https://pub.dartlang.org" 190 | source: hosted 191 | version: "1.10.0" 192 | stream_channel: 193 | dependency: transitive 194 | description: 195 | name: stream_channel 196 | url: "https://pub.dartlang.org" 197 | source: hosted 198 | version: "2.1.0" 199 | string_scanner: 200 | dependency: transitive 201 | description: 202 | name: string_scanner 203 | url: "https://pub.dartlang.org" 204 | source: hosted 205 | version: "1.1.0" 206 | term_glyph: 207 | dependency: transitive 208 | description: 209 | name: term_glyph 210 | url: "https://pub.dartlang.org" 211 | source: hosted 212 | version: "1.2.0" 213 | test_api: 214 | dependency: transitive 215 | description: 216 | name: test_api 217 | url: "https://pub.dartlang.org" 218 | source: hosted 219 | version: "0.4.9" 220 | typed_data: 221 | dependency: transitive 222 | description: 223 | name: typed_data 224 | url: "https://pub.dartlang.org" 225 | source: hosted 226 | version: "1.3.1" 227 | vector_math: 228 | dependency: transitive 229 | description: 230 | name: vector_math 231 | url: "https://pub.dartlang.org" 232 | source: hosted 233 | version: "2.1.2" 234 | sdks: 235 | dart: ">=2.17.0-0 <3.0.0" 236 | flutter: ">=2.0.0" 237 | -------------------------------------------------------------------------------- /lib/widgets/add_post.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AddPost extends StatefulWidget { 4 | final String senderId; 5 | const AddPost(this.senderId, {Key? key}) : super(key: key); 6 | //I used this constructor for code Re-use. i.e, I used this all code for both 7 | //teacher add post and director add post. for that i detect the users by passing 8 | // this sender id data. 9 | @override 10 | State createState() => _AddPostState(); 11 | } 12 | 13 | class _AddPostState extends State { 14 | List notfnReceiver = ['Parent', 'Student', 'Teacher']; 15 | var _dropValue = 'Parent'; 16 | final _formvaluekey = GlobalKey(); 17 | final _thiscontroller = TextEditingController(); 18 | @override 19 | Widget build(BuildContext context) { 20 | final _senderId = widget.senderId; 21 | return Form( 22 | key: _formvaluekey, 23 | child: Column( 24 | children: [ 25 | const SizedBox( 26 | height: 35, 27 | ), 28 | (_senderId=='Director')?Row( 29 | mainAxisAlignment: MainAxisAlignment.center, 30 | children: [ 31 | const Padding( 32 | padding: EdgeInsets.only(left: 30, right: 15), 33 | child: Text( 34 | 'To Whom: ', 35 | style: TextStyle( 36 | fontWeight: FontWeight.bold, 37 | fontSize: 15, 38 | color: Colors.black), 39 | ), 40 | ), 41 | Container( 42 | padding: const EdgeInsets.only(left: 6), 43 | width: 105, 44 | height: 45, 45 | decoration: BoxDecoration( 46 | color: Colors.white, 47 | border: Border.all( 48 | color: Colors.black, 49 | ), 50 | ), 51 | child: DropdownButtonHideUnderline( 52 | child: DropdownButton( 53 | items: notfnReceiver.map((receiver) { 54 | return DropdownMenuItem( 55 | value: receiver, child: Text(receiver)); 56 | }).toList(), 57 | onChanged: (value) { 58 | setState(() { 59 | _dropValue = value as String; 60 | }); 61 | }, 62 | value: _dropValue, 63 | ), 64 | ), 65 | ), 66 | ], 67 | ): 68 | const SizedBox( 69 | height: 30, 70 | ), 71 | Row( 72 | mainAxisAlignment: MainAxisAlignment.center, 73 | children: [ 74 | SizedBox( 75 | width: 570, 76 | child: TextFormField( 77 | controller: _thiscontroller, 78 | validator: (value) { 79 | if (value!.isEmpty) { 80 | return 'Please write something before send.'; 81 | } 82 | return null; 83 | }, 84 | autofocus: true, 85 | decoration: InputDecoration( 86 | hintText: 'write Message here...', 87 | border: OutlineInputBorder( 88 | borderRadius: BorderRadius.circular(15))), 89 | minLines: 6, 90 | maxLines: 13, 91 | ), 92 | ), 93 | Padding( 94 | padding: const EdgeInsets.only(top: 200, left: 30), 95 | child: IconButton( 96 | tooltip: 'Send', 97 | visualDensity: VisualDensity.comfortable, 98 | color: const Color.fromARGB(255, 89, 45, 192), 99 | onPressed: () { 100 | final _validate = 101 | _formvaluekey.currentState!.validate(); 102 | if (_validate) { 103 | showDialog( 104 | context: context, 105 | builder: (ctx) { 106 | return AlertDialog( 107 | content: const Text('Send this message?'), 108 | actions: [ 109 | Row( 110 | children: [ 111 | ElevatedButton( 112 | style: ElevatedButton.styleFrom( 113 | primary: Colors.white, 114 | elevation: 0.0), 115 | onPressed: () { 116 | Navigator.pop(context); 117 | _thiscontroller.clear(); 118 | }, 119 | child: const Text( 120 | 'Yes', 121 | style: TextStyle( 122 | color: Color.fromARGB( 123 | 255, 241, 66, 66)), 124 | ), 125 | ), 126 | const Spacer(), 127 | ElevatedButton( 128 | style: ElevatedButton.styleFrom( 129 | primary: Colors.white, 130 | elevation: 0.0), 131 | onPressed: () { 132 | Navigator.of(context).pop(); 133 | }, 134 | child: const Text( 135 | 'Cancel', 136 | style: TextStyle( 137 | color: Color.fromARGB( 138 | 255, 241, 66, 66)), 139 | ), 140 | ), 141 | ], 142 | ), 143 | ], 144 | ); 145 | }); 146 | } 147 | }, 148 | icon: const Icon( 149 | Icons.send_rounded, 150 | size: 50, 151 | ), 152 | ), 153 | ), 154 | ], 155 | ), 156 | ], 157 | ), 158 | ); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /lib/screens/add_attendance.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../screens/settings_screen.dart'; 3 | import '../widgets/teach_main_drawer.dart'; 4 | 5 | class Addattendance extends StatefulWidget { 6 | const Addattendance({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _AddattendanceState(); 10 | } 11 | 12 | class _AddattendanceState extends State { 13 | List dropdownvalues = ['7th A', '8th B']; 14 | var datepickercontroller = TextEditingController(); 15 | @override 16 | Widget build(BuildContext context) { 17 | String dropdownitemvalues = '${dropdownvalues[0]}'; 18 | return Scaffold( 19 | appBar: AppBar(), 20 | endDrawer: const Teachmaindrawer(), 21 | body: Row( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | Padding( 25 | padding: const EdgeInsets.only(left: 10, top: 20), 26 | child: Column( 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | children: [ 29 | Row( 30 | children: const [ 31 | Icon( 32 | Icons.settings, 33 | size: 40, 34 | ), 35 | Padding( 36 | padding: EdgeInsets.only(left: 15), 37 | child: Text( 38 | 'Activities', 39 | style: TextStyle( 40 | fontFamily: 'RobotoMono', 41 | fontWeight: FontWeight.bold, 42 | fontSize: 30, 43 | ), 44 | ), 45 | ), 46 | ], 47 | ), 48 | const Divider(), 49 | InkWell( 50 | focusColor: const Color.fromARGB(255, 99, 152, 243), 51 | child: Row( 52 | children: const [ 53 | Icon(Icons.person), 54 | Padding( 55 | padding: EdgeInsets.only(left: 15), 56 | child: Text( 57 | 'Add Attendance', 58 | style: TextStyle(), 59 | )), 60 | ], 61 | ), 62 | onTap: () { 63 | //navigate to profile detail screen 64 | }, 65 | ), 66 | const Divider(), 67 | InkWell( 68 | focusColor: const Color.fromARGB(255, 99, 152, 243), 69 | autofocus: true, 70 | child: Row( 71 | children: const [ 72 | Icon(Icons.change_circle), 73 | Padding( 74 | padding: EdgeInsets.only(left: 15), 75 | child: Text('Post Grade')), 76 | ], 77 | ), 78 | onTap: () { 79 | //navigate to profile detail screen 80 | }, 81 | ), 82 | InkWell( 83 | focusColor: const Color.fromARGB(255, 99, 152, 243), 84 | child: Row( 85 | children: const [ 86 | Icon(Icons.person), 87 | Padding( 88 | padding: EdgeInsets.only(left: 15), 89 | child: Text( 90 | 'Post Notification', 91 | style: TextStyle(), 92 | )), 93 | ], 94 | ), 95 | onTap: () { 96 | //navigate to profile detail screen 97 | }, 98 | ), 99 | const Divider(), 100 | // InkWell( 101 | // child: Row( 102 | // children: const [ 103 | // Icon(Icons.logout), 104 | // Padding( 105 | // padding: EdgeInsets.only(left: 15), 106 | // child: Text('Logout')), 107 | // ], 108 | // ), 109 | // onTap: () { 110 | // //navigate to profile detail screen 111 | // }, 112 | // ), 113 | ], 114 | ), 115 | ), 116 | Padding( 117 | padding: const EdgeInsets.only(left: 100, top: 80), 118 | // child: Container( 119 | // width: 950, 120 | // height: 550, 121 | // decoration: const BoxDecoration( 122 | // gradient: LinearGradient(colors: [ 123 | // Color.fromARGB(255, 214, 204, 204), 124 | // Color.fromARGB(255, 246, 241, 241), 125 | // ])), 126 | child: Column( 127 | children: [ 128 | Row( 129 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 130 | children: [ 131 | SizedBox( 132 | width: 250, 133 | height: 30, 134 | child: DropdownButtonFormField( 135 | onTap: () => Navigator.push( 136 | context, 137 | MaterialPageRoute( 138 | builder: (context) => const SettingsScreen())), 139 | items: dropdownvalues.map((item) { 140 | return DropdownMenuItem( 141 | onTap: () => Navigator.push( 142 | context, 143 | MaterialPageRoute( 144 | builder: (context) => 145 | const SettingsScreen())), 146 | child: Text(item), 147 | value: item, 148 | ); 149 | }).toList(), 150 | onChanged: (val) { 151 | dropdownitemvalues = val as String; 152 | }, 153 | value: dropdownitemvalues, 154 | ), 155 | ), 156 | Container( 157 | margin: const EdgeInsets.only(left: 50), 158 | height: 30, 159 | width: 90, 160 | child: TextFormField( 161 | decoration: InputDecoration( 162 | suffixIcon: IconButton( 163 | icon: const Icon(Icons.calendar_today), 164 | onPressed: () { 165 | showDatePicker( 166 | context: context, 167 | initialDate: DateTime(2008), 168 | firstDate: DateTime(2004), 169 | lastDate: DateTime.now()); 170 | }, 171 | ), 172 | ), 173 | onTap: () {}, 174 | ), 175 | ) 176 | ], 177 | ) 178 | ], 179 | ), 180 | ), 181 | ], 182 | ), 183 | ); 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /lib/screens/login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import '../screens/add_user.dart'; 4 | import '../services/users.dart'; 5 | //import 'package:my_school/screens/director_main_screen.dart'; 6 | //import 'package:my_school/screens/teach_main_screen.dart'; 7 | //import '../screens/director_main_screen.dart'; 8 | //import 'director_main_screen.dart'; 9 | 10 | class LoginSceen extends StatefulWidget { 11 | const LoginSceen({Key? key}) : super(key: key); 12 | 13 | @override 14 | State createState() => _LoginSceenState(); 15 | } 16 | 17 | class _LoginSceenState extends State { 18 | final _uncontroller = TextEditingController(); 19 | final _pwdcontroller = TextEditingController(); 20 | bool _obscureText = true; 21 | 22 | void toogleVisibility() { 23 | setState(() { 24 | _obscureText = !_obscureText; 25 | }); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | final os = (defaultTargetPlatform == TargetPlatform.android || 31 | defaultTargetPlatform == TargetPlatform.iOS); 32 | var height = MediaQuery.of(context).size.height; 33 | var width = MediaQuery.of(context).size.width; 34 | //var keyboard = MediaQuery.of(context).viewInsets.bottom; 35 | var _formkey = GlobalKey(); 36 | //var un = TextEditingController(); 37 | //var pswd = TextEditingController(); 38 | 39 | return Scaffold( 40 | body: ListView( 41 | children: [ 42 | Center( 43 | child: Padding( 44 | padding: const EdgeInsets.only(top: 60), 45 | child: Container( 46 | width: os ? width * 0.9 : 550, 47 | height: os ? height * 0.8 : 600, 48 | decoration: BoxDecoration( 49 | borderRadius: BorderRadius.circular(30), 50 | gradient: const LinearGradient(colors: [ 51 | Color.fromARGB(255, 244, 240, 238), 52 | Color.fromARGB(255, 127, 206, 243), 53 | ], begin: Alignment.bottomCenter, end: Alignment.topLeft), 54 | ), 55 | child: Form( 56 | key: _formkey, 57 | child: ListView( 58 | // crossAxisAlignment: CrossAxisAlignment.start, 59 | children: [ 60 | Padding( 61 | padding: const EdgeInsets.only(top: 30, bottom: 30), 62 | child: CircleAvatar( 63 | minRadius: 25, 64 | child: Image.asset('images/userwithlock.jpg'), 65 | ), 66 | ), 67 | // const SizedBox( 68 | // height: 130, 69 | // ), 70 | Padding( 71 | padding: const EdgeInsets.only( 72 | left: 50, right: 50, bottom: 30), 73 | child: TextFormField( 74 | controller: _uncontroller, 75 | decoration: InputDecoration( 76 | prefixIcon: const Icon(Icons.person), 77 | labelText: 'username', 78 | border: OutlineInputBorder( 79 | borderRadius: BorderRadius.circular(25), 80 | )), 81 | validator: (value) { 82 | if (value!.isEmpty) { 83 | return 'please enter your username'; 84 | } 85 | return null; 86 | }), 87 | ), 88 | Padding( 89 | padding: const EdgeInsets.only( 90 | left: 50, right: 50, bottom: 25), 91 | child: TextFormField( 92 | controller: _pwdcontroller, 93 | obscureText: _obscureText, 94 | decoration: InputDecoration( 95 | prefixIcon: const Icon(Icons.lock), 96 | border: OutlineInputBorder( 97 | borderRadius: BorderRadius.circular(25), 98 | ), 99 | labelText: 'password', 100 | suffixIcon: IconButton( 101 | icon: const Icon(Icons.visibility_off), 102 | //: const Icon(Icons.visibility), 103 | onPressed: (){}, 104 | //onPressed: toogleVisibility, 105 | ), 106 | ), 107 | validator: (value) { 108 | if (value!.isEmpty) { 109 | return 'this field is required. please fill'; 110 | } 111 | return null; 112 | }, 113 | )), 114 | const Padding( 115 | padding: EdgeInsets.only(left: 50), 116 | child: InkWell( 117 | child: Text( 118 | 'forgot pasword?', 119 | style: TextStyle( 120 | color: Color.fromARGB(255, 29, 14, 240), 121 | fontFamily: 'Raleway', 122 | fontSize: 20, 123 | fontWeight: FontWeight.bold), 124 | ), 125 | ), 126 | ), 127 | Padding( 128 | padding: const EdgeInsets.only( 129 | left: 140, right: 140, top: 40), 130 | child: ClipRRect( 131 | borderRadius: BorderRadius.circular(35), 132 | child: SizedBox( 133 | height: 40, 134 | child: ElevatedButton( 135 | onPressed: () { 136 | var validate = 137 | _formkey.currentState!.validate(); 138 | if (validate) { 139 | login(context, 140 | _uncontroller.text, 141 | _pwdcontroller.text); 142 | // Navigator.push( 143 | // context, 144 | // MaterialPageRoute( 145 | // builder: (_) => const Adduser())); 146 | } 147 | }, 148 | child: const Text( 149 | 'Login', 150 | style: TextStyle( 151 | color: Colors.white, 152 | fontFamily: 'Lobster', 153 | fontSize: 30, 154 | ), 155 | ), 156 | style: ElevatedButton.styleFrom( 157 | primary: Colors.black, 158 | ), 159 | ), 160 | ), 161 | ), 162 | ), 163 | ], 164 | ), 165 | ), 166 | ), 167 | ), 168 | ), 169 | ], 170 | ), 171 | ); 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /lib/screens/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:my_school/screens/login_screen.dart'; 4 | 5 | class Homescreen extends StatelessWidget { 6 | const Homescreen({Key? key}) : super(key: key); 7 | 8 | final TargetPlatform aos = TargetPlatform.android; 9 | final TargetPlatform ios = TargetPlatform.iOS; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return WillPopScope( 14 | onWillPop: () async => false, 15 | child: Container( 16 | decoration: const BoxDecoration( 17 | color: Color.fromARGB(255, 244, 143, 176) 18 | ), 19 | child: Scaffold( 20 | backgroundColor: Colors.transparent, 21 | appBar: (defaultTargetPlatform == ios || defaultTargetPlatform == aos) 22 | ? AppBar() 23 | : AppBar( 24 | backgroundColor:const Color.fromARGB(255, 192, 96, 163), 25 | elevation: 1, 26 | // toolbarHeight: 100, 27 | actions: [ 28 | Row( 29 | mainAxisAlignment: MainAxisAlignment.start, 30 | children: [ 31 | Padding( 32 | padding: const EdgeInsets.only(right: 10), 33 | child: ElevatedButton( 34 | style: ElevatedButton.styleFrom( 35 | primary: Colors.white, elevation: 0.0), 36 | onPressed: () { 37 | //return null 38 | }, 39 | child: const Text( 40 | 'Home', 41 | style: TextStyle( 42 | color: Colors.black, 43 | ), 44 | // style: Theme.of(context).textTheme.bodySmall, 45 | ), 46 | ), 47 | ), 48 | Padding( 49 | padding: const EdgeInsets.only(right: 10), 50 | child: ElevatedButton( 51 | style: ElevatedButton.styleFrom( 52 | primary: Colors.white, 53 | elevation: 0.0, 54 | ), 55 | onPressed: () { 56 | Navigator.push( 57 | context, 58 | MaterialPageRoute( 59 | builder: (context) => 60 | const LoginSceen())); 61 | }, 62 | child: const Text( 63 | 'Login', 64 | style: TextStyle( 65 | color: Colors.black, 66 | ), 67 | //style: Theme.of(context).textTheme.bodySmall, 68 | ), 69 | ), 70 | ), 71 | Padding( 72 | padding: const EdgeInsets.only(right: 10), 73 | child: ElevatedButton( 74 | style: ElevatedButton.styleFrom( 75 | primary: Colors.white, 76 | elevation: 0.0, 77 | ), 78 | onPressed: () { 79 | //return null 80 | }, 81 | child: const Text( 82 | 'AboutUs', 83 | style: TextStyle( 84 | color: Colors.black, 85 | ), 86 | // style: Theme.of(context).textTheme.bodySmall, 87 | ), 88 | ), 89 | ), 90 | ], 91 | ), 92 | ], 93 | ), 94 | body: Column( 95 | children: [ 96 | const Padding( 97 | padding: EdgeInsets.only(top: 140), 98 | child: Text( 99 | 'Welcome', 100 | style: TextStyle( 101 | fontFamily: 'Lobster', 102 | fontSize: 200, 103 | color: Colors.white, 104 | ) 105 | ), 106 | ), 107 | Center( 108 | //heightFactor: 800, 109 | child: Container( 110 | padding: const EdgeInsets.only(top: 80), 111 | child: ClipRRect( 112 | borderRadius: BorderRadius.circular(15), 113 | child: ElevatedButton( 114 | style: ElevatedButton.styleFrom( 115 | primary: const Color.fromARGB(255, 46, 164, 117), 116 | minimumSize: const Size(250, 50), 117 | ), 118 | onPressed: () { 119 | Navigator.push( 120 | context, 121 | MaterialPageRoute( 122 | builder: (context) => const LoginSceen())); 123 | }, 124 | child: const Text( 125 | 'Login', 126 | style: TextStyle( 127 | color: Colors.black, 128 | ), 129 | //style: Theme.of(context).textTheme.bodySmall, 130 | ), 131 | ), 132 | ), 133 | ), 134 | ), 135 | 136 | ], 137 | ) 138 | // Row( 139 | // // mainAxisAlignment: MainAxisAlignment.spaceBetween, 140 | // children: [ 141 | // Container( 142 | // margin: const EdgeInsets.only(left: 20), 143 | // width: 420, 144 | // child: Column( 145 | // mainAxisAlignment: MainAxisAlignment.center, 146 | // crossAxisAlignment: CrossAxisAlignment.start, 147 | // children: const [ 148 | // Text( 149 | // 'Education', 150 | // textAlign: TextAlign.left, 151 | // style: TextStyle( 152 | // fontWeight: FontWeight.bold, 153 | // fontSize: 40, 154 | // fontFamily: 'RobotoMono', 155 | // fontStyle: FontStyle.italic), 156 | // ), 157 | // Padding( 158 | // padding: EdgeInsets.only(bottom: 20), 159 | // child: Text( 160 | // 'Education is th most powerful weapon, we can use to change the world', 161 | // style: TextStyle( 162 | // fontFamily: 'raleway', 163 | // fontSize: 20, 164 | // fontStyle: FontStyle.italic), 165 | // ), 166 | // ), 167 | // Text( 168 | // 'Nelson Mandela', 169 | // style: TextStyle(fontFamily: 'Lobster'), 170 | // ), 171 | //], 172 | 173 | 174 | //], 175 | ) 176 | ), 177 | ); 178 | 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | 7 | namespace { 8 | 9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 10 | 11 | // The number of Win32Window objects that currently exist. 12 | static int g_active_window_count = 0; 13 | 14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 15 | 16 | // Scale helper to convert logical scaler values to physical using passed in 17 | // scale factor 18 | int Scale(int source, double scale_factor) { 19 | return static_cast(source * scale_factor); 20 | } 21 | 22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 23 | // This API is only needed for PerMonitor V1 awareness mode. 24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 25 | HMODULE user32_module = LoadLibraryA("User32.dll"); 26 | if (!user32_module) { 27 | return; 28 | } 29 | auto enable_non_client_dpi_scaling = 30 | reinterpret_cast( 31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 32 | if (enable_non_client_dpi_scaling != nullptr) { 33 | enable_non_client_dpi_scaling(hwnd); 34 | FreeLibrary(user32_module); 35 | } 36 | } 37 | 38 | } // namespace 39 | 40 | // Manages the Win32Window's window class registration. 41 | class WindowClassRegistrar { 42 | public: 43 | ~WindowClassRegistrar() = default; 44 | 45 | // Returns the singleton registar instance. 46 | static WindowClassRegistrar* GetInstance() { 47 | if (!instance_) { 48 | instance_ = new WindowClassRegistrar(); 49 | } 50 | return instance_; 51 | } 52 | 53 | // Returns the name of the window class, registering the class if it hasn't 54 | // previously been registered. 55 | const wchar_t* GetWindowClass(); 56 | 57 | // Unregisters the window class. Should only be called if there are no 58 | // instances of the window. 59 | void UnregisterWindowClass(); 60 | 61 | private: 62 | WindowClassRegistrar() = default; 63 | 64 | static WindowClassRegistrar* instance_; 65 | 66 | bool class_registered_ = false; 67 | }; 68 | 69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 70 | 71 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 72 | if (!class_registered_) { 73 | WNDCLASS window_class{}; 74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 75 | window_class.lpszClassName = kWindowClassName; 76 | window_class.style = CS_HREDRAW | CS_VREDRAW; 77 | window_class.cbClsExtra = 0; 78 | window_class.cbWndExtra = 0; 79 | window_class.hInstance = GetModuleHandle(nullptr); 80 | window_class.hIcon = 81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 82 | window_class.hbrBackground = 0; 83 | window_class.lpszMenuName = nullptr; 84 | window_class.lpfnWndProc = Win32Window::WndProc; 85 | RegisterClass(&window_class); 86 | class_registered_ = true; 87 | } 88 | return kWindowClassName; 89 | } 90 | 91 | void WindowClassRegistrar::UnregisterWindowClass() { 92 | UnregisterClass(kWindowClassName, nullptr); 93 | class_registered_ = false; 94 | } 95 | 96 | Win32Window::Win32Window() { 97 | ++g_active_window_count; 98 | } 99 | 100 | Win32Window::~Win32Window() { 101 | --g_active_window_count; 102 | Destroy(); 103 | } 104 | 105 | bool Win32Window::CreateAndShow(const std::wstring& title, 106 | const Point& origin, 107 | const Size& size) { 108 | Destroy(); 109 | 110 | const wchar_t* window_class = 111 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 112 | 113 | const POINT target_point = {static_cast(origin.x), 114 | static_cast(origin.y)}; 115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 117 | double scale_factor = dpi / 96.0; 118 | 119 | HWND window = CreateWindow( 120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 123 | nullptr, nullptr, GetModuleHandle(nullptr), this); 124 | 125 | if (!window) { 126 | return false; 127 | } 128 | 129 | return OnCreate(); 130 | } 131 | 132 | // static 133 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 134 | UINT const message, 135 | WPARAM const wparam, 136 | LPARAM const lparam) noexcept { 137 | if (message == WM_NCCREATE) { 138 | auto window_struct = reinterpret_cast(lparam); 139 | SetWindowLongPtr(window, GWLP_USERDATA, 140 | reinterpret_cast(window_struct->lpCreateParams)); 141 | 142 | auto that = static_cast(window_struct->lpCreateParams); 143 | EnableFullDpiSupportIfAvailable(window); 144 | that->window_handle_ = window; 145 | } else if (Win32Window* that = GetThisFromHandle(window)) { 146 | return that->MessageHandler(window, message, wparam, lparam); 147 | } 148 | 149 | return DefWindowProc(window, message, wparam, lparam); 150 | } 151 | 152 | LRESULT 153 | Win32Window::MessageHandler(HWND hwnd, 154 | UINT const message, 155 | WPARAM const wparam, 156 | LPARAM const lparam) noexcept { 157 | switch (message) { 158 | case WM_DESTROY: 159 | window_handle_ = nullptr; 160 | Destroy(); 161 | if (quit_on_close_) { 162 | PostQuitMessage(0); 163 | } 164 | return 0; 165 | 166 | case WM_DPICHANGED: { 167 | auto newRectSize = reinterpret_cast(lparam); 168 | LONG newWidth = newRectSize->right - newRectSize->left; 169 | LONG newHeight = newRectSize->bottom - newRectSize->top; 170 | 171 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 172 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 173 | 174 | return 0; 175 | } 176 | case WM_SIZE: { 177 | RECT rect = GetClientArea(); 178 | if (child_content_ != nullptr) { 179 | // Size and position the child window. 180 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 181 | rect.bottom - rect.top, TRUE); 182 | } 183 | return 0; 184 | } 185 | 186 | case WM_ACTIVATE: 187 | if (child_content_ != nullptr) { 188 | SetFocus(child_content_); 189 | } 190 | return 0; 191 | } 192 | 193 | return DefWindowProc(window_handle_, message, wparam, lparam); 194 | } 195 | 196 | void Win32Window::Destroy() { 197 | OnDestroy(); 198 | 199 | if (window_handle_) { 200 | DestroyWindow(window_handle_); 201 | window_handle_ = nullptr; 202 | } 203 | if (g_active_window_count == 0) { 204 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 205 | } 206 | } 207 | 208 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 209 | return reinterpret_cast( 210 | GetWindowLongPtr(window, GWLP_USERDATA)); 211 | } 212 | 213 | void Win32Window::SetChildContent(HWND content) { 214 | child_content_ = content; 215 | SetParent(content, window_handle_); 216 | RECT frame = GetClientArea(); 217 | 218 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 219 | frame.bottom - frame.top, true); 220 | 221 | SetFocus(child_content_); 222 | } 223 | 224 | RECT Win32Window::GetClientArea() { 225 | RECT frame; 226 | GetClientRect(window_handle_, &frame); 227 | return frame; 228 | } 229 | 230 | HWND Win32Window::GetHandle() { 231 | return window_handle_; 232 | } 233 | 234 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 235 | quit_on_close_ = quit_on_close; 236 | } 237 | 238 | bool Win32Window::OnCreate() { 239 | // No-op; provided for subclasses. 240 | return true; 241 | } 242 | 243 | void Win32Window::OnDestroy() { 244 | // No-op; provided for subclasses. 245 | } 246 | -------------------------------------------------------------------------------- /lib/screens/parent_registration.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import '../widgets/mytextformfiled.dart'; 4 | 5 | class ParentRegistration extends StatefulWidget { 6 | const ParentRegistration({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _ParentRegistrationState(); 10 | } 11 | 12 | class _ParentRegistrationState extends State { 13 | 14 | TextStyle errorstyle() { 15 | return const TextStyle( 16 | fontWeight: FontWeight.bold, backgroundColor: Colors.white); 17 | } 18 | 19 | final phonecontroller = TextEditingController(); 20 | final fnamecontroller = TextEditingController(); 21 | final mnamecontroller = TextEditingController(); 22 | final addresscontroller = TextEditingController(); 23 | final lnamecontroller = TextEditingController(); 24 | final addressContoller = TextEditingController(); 25 | final formkey = GlobalKey(); 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | var platform = (defaultTargetPlatform == TargetPlatform.android || 30 | defaultTargetPlatform == TargetPlatform.iOS); 31 | return Form( 32 | key: formkey, 33 | child: SingleChildScrollView( 34 | child: Padding( 35 | padding: const EdgeInsets.all(15), 36 | child: Column( 37 | // crossAxisAlignment: CrossAxisAlignment.start, 38 | children: [ 39 | SizedBox( 40 | height: 20, 41 | child: Text( 42 | 'Director Registration Form', 43 | style: Theme.of(context).textTheme.titleSmall, 44 | ), 45 | ), 46 | Row( 47 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 48 | children: [ 49 | Container( 50 | margin: const EdgeInsets.only(top: 20), 51 | width: 275, 52 | child: TextFormfield( 53 | ///hinttext: 'FirstName', 54 | controller: fnamecontroller, 55 | label: 'FirstName', 56 | errorstyle: errorstyle, 57 | keyboardtype: TextInputType.text, 58 | ), 59 | ), 60 | Container( 61 | margin: const EdgeInsets.only(top: 20), 62 | width: 275, 63 | child: TextFormfield( 64 | ///hinttext: 'FirstName', 65 | controller: mnamecontroller, 66 | label: 'MiddleName', 67 | errorstyle: errorstyle, 68 | keyboardtype: TextInputType.text, 69 | ), 70 | ), 71 | ], 72 | ), 73 | Row( 74 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 75 | children: [ 76 | Container( 77 | margin: const EdgeInsets.only(top: 20,right: 390), 78 | width: 275, 79 | child: TextFormfield( 80 | // hinttext: 'Grand Father\'s Name', 81 | controller: lnamecontroller, 82 | label: 'LastName', 83 | errorstyle: errorstyle, 84 | keyboardtype: TextInputType.text, 85 | ), 86 | ), 87 | 88 | ], 89 | ), 90 | Row( 91 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 92 | children: [ 93 | Container( 94 | margin: const EdgeInsets.only(top: 20, bottom: 20), 95 | width: 275, 96 | child: TextFormfield( 97 | // hinttext: 'Address', 98 | controller: addressContoller, 99 | label: 'Address', 100 | errorstyle: errorstyle, 101 | keyboardtype: TextInputType.text, 102 | ), 103 | ), 104 | Container( 105 | margin: const EdgeInsets.only(top: 20, bottom: 20), 106 | width: 275, 107 | child: TextFormField( 108 | controller: phonecontroller, 109 | keyboardType: TextInputType.number, 110 | maxLength: 9, 111 | validator: (value) { 112 | if (value!.isEmpty) { 113 | return 'this field is required'; 114 | } else if (!value.startsWith('9')) { 115 | return 'must start with 9'; 116 | } else if (value.length < 9) { 117 | return 'It must be 10 digit'; 118 | } 119 | 120 | return null; 121 | }, 122 | decoration: InputDecoration( 123 | counterText: '', //eliminates maxLength counter at the bottom 124 | errorStyle: errorstyle(), 125 | prefixText: '+251 ', 126 | border: OutlineInputBorder( 127 | borderRadius: BorderRadius.circular(15), 128 | ), 129 | label: const Text('Phone Number'), 130 | ), 131 | )), 132 | ], 133 | ), 134 | 135 | Container( 136 | width: 250, 137 | margin: const EdgeInsets.only(top: 65), 138 | child: ElevatedButton( 139 | style: ElevatedButton.styleFrom( 140 | primary: Colors.green, 141 | ), 142 | onPressed: () { 143 | var formvalidate = formkey.currentState!.validate(); 144 | if (formvalidate) { 145 | platform 146 | ? ScaffoldMessenger.of(context) 147 | .showSnackBar(const SnackBar( 148 | backgroundColor: Colors.green, 149 | content: Text( 150 | 'Successfully registered!', 151 | textAlign: TextAlign.center, 152 | style: TextStyle( 153 | color: Colors.white, 154 | 155 | fontFamily: 'Raleway', 156 | fontSize: 25, 157 | fontWeight: FontWeight.bold, 158 | // color: Colors.red, 159 | ), 160 | ), 161 | )) 162 | : showDialog( 163 | context: context, 164 | builder: (context) { 165 | return AlertDialog( 166 | title: Row( 167 | children: const [ 168 | Icon(Icons.warning_amber), 169 | Text( 170 | 'Success!', 171 | style: TextStyle( 172 | fontFamily: 'Raleway', 173 | fontWeight: FontWeight.bold, 174 | fontSize: 30, 175 | ), 176 | ), 177 | ], 178 | ), 179 | content: Text( 180 | 'Your registration is Successful.', 181 | style: Theme.of(context) 182 | .textTheme 183 | .titleSmall, 184 | ), 185 | actions: [ 186 | ElevatedButton( 187 | style: ElevatedButton.styleFrom( 188 | primary: Colors.green, 189 | ), 190 | onPressed: () { 191 | Navigator.pop(context); 192 | addressContoller.clear(); 193 | phonecontroller.clear(); 194 | fnamecontroller.clear(); 195 | lnamecontroller.clear(); 196 | mnamecontroller.clear(); 197 | }, 198 | child: const Text('Ok')) 199 | ], 200 | ); 201 | }); 202 | } 203 | }, 204 | child: const Text( 205 | 'Register', 206 | style: TextStyle( 207 | fontWeight: FontWeight.bold, 208 | color: Colors.black, 209 | ), 210 | )), 211 | ), 212 | ]), 213 | ))); 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /lib/screens/director_main_screen.dart: -------------------------------------------------------------------------------- 1 | //import 'package:fluent_ui/fluent_ui.dart'; 2 | //import 'package:dropdown_button2/custom_dropdown_button2.dart'; 3 | import 'package:flutter/material.dart'; 4 | //import 'package:my_school/models/student_grid_view.dart'; 5 | //import 'package:my_school/screens/compalin_screen.dart'; 6 | //import 'package:my_school/screens/stud_registratin.dart'; 7 | import 'package:my_school/widgets/director_main_drawer.dart'; 8 | //import 'package:my_school/widgets/teach_main_drawer.dart'; 9 | //import '../widgets/stud_main_drawer.dart'; 10 | //import 'package:dropdown_button2/dropdown_button2.dart'; 11 | 12 | class DirectorMainScreen extends StatefulWidget { 13 | const DirectorMainScreen({Key? key}) : super(key: key); 14 | 15 | @override 16 | State createState() => _DirectorMainScreenState(); 17 | } 18 | 19 | class _DirectorMainScreenState extends State { 20 | 21 | final bool wilpop = false; 22 | List dropdownitems=['a','b','c','d']; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | 27 | return WillPopScope( 28 | onWillPop: () async => wilpop, 29 | // child: DefaultTabController( 30 | // length: 4, 31 | // child: 32 | child: Scaffold( 33 | 34 | // const TabBar( 35 | // isScrollable: true, 36 | // labelPadding: EdgeInsets.symmetric(horizontal: 10), 37 | // //controller: _controller, 38 | // // indicatorSize: TabBarIndicatorSize., 39 | // tabs: [ 40 | // Tab( 41 | // child: Text( 42 | // 'tasks', 43 | // style: TextStyle( 44 | // color: Colors.black, 45 | // ), 46 | // ), 47 | // ), 48 | 49 | // Tab( 50 | // child: Text( 51 | // 'settings', 52 | // style: TextStyle( 53 | // color: Colors.black, 54 | // ), 55 | // ), 56 | // ), 57 | // Tab( 58 | // child: Text( 59 | // 'view', 60 | // style: TextStyle( 61 | // color: Colors.black, 62 | // ), 63 | // ), 64 | // ), 65 | // Tab( 66 | // child: Text( 67 | // 'help', 68 | // style: TextStyle( 69 | // color: Colors.black, 70 | // ), 71 | // ), 72 | // ) 73 | // ], 74 | // ), 75 | appBar: AppBar( 76 | // toolbarHeight: 50, 77 | //leadingWidth: 260, 78 | centerTitle: true, 79 | title:const Text('Welocome Director'), 80 | // actions:[ 81 | 82 | // //const Icon(Icons.school), 83 | // ElevatedButton( 84 | // onPressed: ((){ 85 | // showDialog( 86 | // context: context, 87 | // builder:(context)=>const AlertDialog( 88 | 89 | // ) 90 | 91 | // ); 92 | // }), 93 | // child: const Text('Tasks'), 94 | // child: PopupMenuButton( 95 | // //elevation: 150, 96 | // // offset: Offset.fromDirection(5,1), 97 | // icon: const Text('Tasks'), 98 | // iconSize: 40, 99 | // itemBuilder: (_) => [ 100 | // const PopupMenuItem( 101 | // // height: 640, 102 | // //padding: EdgeInsets.only(top: 50), 103 | // child: Text('Add student'), 104 | 105 | // ), 106 | // const PopupMenuItem(child: Text('Manage student')), 107 | // const PopupMenuItem(child: Text('Add Teacher')), 108 | // const PopupMenuItem(child: Text('Manage Teacher')), 109 | // const PopupMenuItem(child: Text('Add Subject')), 110 | // const PopupMenuItem(child: Text('Manage Subject')), 111 | // const PopupMenuItem(child: Text('Manage Teacher')), 112 | // const PopupMenuItem(child: Text('Add Payment')), 113 | // ]), 114 | ), 115 | // CustomDropdownButton2(hint: 'hint', value: dropdownitems[0], 116 | // dropdownItems: dropdownitems, onChanged: (val){ 117 | 118 | // }), 119 | // PopupMenuButton( 120 | // icon: const Text('view'), 121 | // iconSize: 40, 122 | // itemBuilder: (_) => [ 123 | // const PopupMenuItem(child: Text('View feedback')), 124 | // // const PopupMenuItem(child: Text('Manage student')), 125 | // // const PopupMenuItem(child: Text('Add Teacher')), 126 | // // const PopupMenuItem(child: Text('Manage Teacher')), 127 | // ]), 128 | 129 | // PopupMenuButton( 130 | // icon: const Text('Settings'), 131 | // iconSize: 50, 132 | // itemBuilder: (_) => [ 133 | // const PopupMenuItem(child: Text('Profile Me')), 134 | // const PopupMenuItem(child: Text('Change Pin')), 135 | // // const PopupMenuItem(child: Text('Add Teacher')), 136 | // // const PopupMenuItem(child: Text('Manage Teacher')), 137 | // ]), 138 | // PopupMenuButton( 139 | // icon: const Text('Help'), 140 | // iconSize: 40, 141 | // itemBuilder: (_) => [ 142 | // const PopupMenuItem(child: Text('Add student')), 143 | // const PopupMenuItem(child: Text('Manage student')), 144 | // const PopupMenuItem(child: Text('Add Teacher')), 145 | // const PopupMenuItem(child: Text('Manage Teacher')), 146 | // ]) 147 | // ],Container( 148 | // child: Row( 149 | // //mainAxisAlignment: MainAxisAlignment.spaceAround, 150 | 151 | //children: 152 | // ], 153 | 154 | // ), 155 | //automaticallyImplyLeading: false, 156 | // title: Center( 157 | // child: Text( 158 | // 'welcome Director', 159 | // style: Theme.of(context).appBarTheme.titleTextStyle, 160 | // ), 161 | // ), 162 | 163 | drawer: const Directormaindrawer(), 164 | body: Container(), 165 | // TabBarView( 166 | // children: [ 167 | // ListView( 168 | // children: const [ 169 | // Text('data'), 170 | // Text('x'), 171 | // Text('y'), 172 | // Text('z'), 173 | // ], 174 | // ), 175 | // ListView( 176 | // children: const [ 177 | // Text('data'), 178 | // Text('x'), 179 | // Text('y'), 180 | // Text('z'), 181 | // ], 182 | // ), 183 | // ListView( 184 | // children: const [ 185 | // Text('data'), 186 | // Text('x'), 187 | // Text('y'), 188 | // Text('z'), 189 | // ], 190 | // ), 191 | // ListView( 192 | // children: const [ 193 | // Text('data'), 194 | // Text('x'), 195 | // Text('y'), 196 | // Text('z'), 197 | // ], 198 | // ), 199 | // ], 200 | // ), 201 | 202 | // GridView.builder( 203 | // padding: const EdgeInsets.all(10), 204 | // // primary: true, 205 | // scrollDirection: Axis.vertical, 206 | // itemCount: homescreengrid.length, 207 | // gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 208 | // crossAxisCount: 2, 209 | // //mainAxisExtent: 20, 210 | // childAspectRatio: 3 / 2, 211 | // crossAxisSpacing: 30, 212 | // mainAxisSpacing: 30, 213 | // ), 214 | // itemBuilder: (ctx, i) { 215 | // return GestureDetector( 216 | // onTap: () => Navigator.push( 217 | // context, 218 | // MaterialPageRoute( 219 | // builder: (context) => const ComplainScreen(), 220 | // )), 221 | // child: Container( 222 | // decoration: BoxDecoration( 223 | // borderRadius: BorderRadius.circular(30), 224 | // gradient: const LinearGradient( 225 | // colors: [ 226 | // Colors.green, 227 | // Colors.green, 228 | // ], 229 | // ), 230 | // ), 231 | // child: Column( 232 | // mainAxisAlignment: MainAxisAlignment.center, 233 | // children: [ 234 | // homescreengrid[i].icon, 235 | // Text( 236 | // homescreengrid[i].title, 237 | // style: const TextStyle( 238 | // fontFamily: 'Lobster', 239 | // fontSize: 30, 240 | // fontWeight: FontWeight.bold, 241 | // // color: Colors.white 242 | // ), 243 | // ), 244 | // ], 245 | // ), 246 | // ), 247 | // ); 248 | //), 249 | // ), 250 | ), 251 | ); 252 | } 253 | } 254 | --------------------------------------------------------------------------------