Commit 968babca authored by Ali's avatar Ali

Initial commit

parents
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
version:
revision: 796c8ef79279f9c774545b3771238c3098dbefab
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: android
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: ios
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: linux
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: macos
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: web
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: windows
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
# job_portal_app
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "com.example.job_portal_app"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.job_portal_app"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:label="job_portal_app">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
package com.example.job_portal_app
import io.flutter.embedding.android.FlutterActivity
class MainActivity : FlutterActivity()
<?xml version="1.0" encoding="utf-8"?><!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?><!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
</dict>
</plist>
#include "Generated.xcconfig"
#include "Generated.xcconfig"
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C8080294A63A400263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
{
"images": [
{
"size": "20x20",
"idiom": "iphone",
"filename": "Icon-App-20x20@2x.png",
"scale": "2x"
},
{
"size": "20x20",
"idiom": "iphone",
"filename": "Icon-App-20x20@3x.png",
"scale": "3x"
},
{
"size": "29x29",
"idiom": "iphone",
"filename": "Icon-App-29x29@1x.png",
"scale": "1x"
},
{
"size": "29x29",
"idiom": "iphone",
"filename": "Icon-App-29x29@2x.png",
"scale": "2x"
},
{
"size": "29x29",
"idiom": "iphone",
"filename": "Icon-App-29x29@3x.png",
"scale": "3x"
},
{
"size": "40x40",
"idiom": "iphone",
"filename": "Icon-App-40x40@2x.png",
"scale": "2x"
},
{
"size": "40x40",
"idiom": "iphone",
"filename": "Icon-App-40x40@3x.png",
"scale": "3x"
},
{
"size": "60x60",
"idiom": "iphone",
"filename": "Icon-App-60x60@2x.png",
"scale": "2x"
},
{
"size": "60x60",
"idiom": "iphone",
"filename": "Icon-App-60x60@3x.png",
"scale": "3x"
},
{
"size": "20x20",
"idiom": "ipad",
"filename": "Icon-App-20x20@1x.png",
"scale": "1x"
},
{
"size": "20x20",
"idiom": "ipad",
"filename": "Icon-App-20x20@2x.png",
"scale": "2x"
},
{
"size": "29x29",
"idiom": "ipad",
"filename": "Icon-App-29x29@1x.png",
"scale": "1x"
},
{
"size": "29x29",
"idiom": "ipad",
"filename": "Icon-App-29x29@2x.png",
"scale": "2x"
},
{
"size": "40x40",
"idiom": "ipad",
"filename": "Icon-App-40x40@1x.png",
"scale": "1x"
},
{
"size": "40x40",
"idiom": "ipad",
"filename": "Icon-App-40x40@2x.png",
"scale": "2x"
},
{
"size": "76x76",
"idiom": "ipad",
"filename": "Icon-App-76x76@1x.png",
"scale": "1x"
},
{
"size": "76x76",
"idiom": "ipad",
"filename": "Icon-App-76x76@2x.png",
"scale": "2x"
},
{
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon-App-83.5x83.5@2x.png",
"scale": "2x"
},
{
"size": "1024x1024",
"idiom": "ios-marketing",
"filename": "Icon-App-1024x1024@1x.png",
"scale": "1x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
{
"images": [
{
"idiom": "universal",
"filename": "LaunchImage.png",
"scale": "1x"
},
{
"idiom": "universal",
"filename": "LaunchImage@2x.png",
"scale": "2x"
},
{
"idiom": "universal",
"filename": "LaunchImage@3x.png",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in
this directory.
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.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Job Portal App</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>job_portal_app</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
#import "GeneratedPluginRegistrant.h"
import Flutter
import UIKit
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}
import 'package:flutter/material.dart';
class NewNotificationManager with ChangeNotifier {
bool _hasNewNotification = false;
bool _hasJobseekerNewNotification = false;
int _notificationCount = 0;
int _jobseekerNotificationCount = 0;
bool get hasNewNotification => _hasNewNotification;
int get notificationCount => _notificationCount;
bool get hasJobseekerNewNotification => _hasJobseekerNewNotification;
int get jobseekerNotificationCount => _jobseekerNotificationCount;
void updateNotificationCount(int count) {
_notificationCount = count;
_hasNewNotification = count > 0;
notifyListeners();
}
void updateJobseekerNotificationCount(int count) {
_jobseekerNotificationCount = count;
_hasJobseekerNewNotification = count > 0;
notifyListeners();
}
void dismiss() {
_hasNewNotification = false;
notifyListeners();
}
void jobseekerDismiss() {
_hasJobseekerNewNotification = false;
notifyListeners();
}
}
// ignore_for_file: file_names
import 'dart:async';
import 'package:job_portal_app/Services/global_variables.dart';
import 'package:signalr_netcore/hub_connection_builder.dart';
// ignore: camel_case_types
class signalR {
final hubConnection =
HubConnectionBuilder().withUrl('$myUrl/NotificationHub').build();
signalR();
Future<void> startSignalRConnection() async {
try {
await hubConnection.start();
} catch (error) {
// ignore: avoid_print
print("Error starting SignalR connection: $error");
}
}
Future<bool> asyncInitState() async {
await startSignalRConnection();
return _receive();
}
Future<bool> asyncInitStateFromJobsseker() async {
await startSignalRConnection();
return _receiveFromJobseeker();
}
Future<bool> _receive() async {
Completer<bool> completer = Completer<bool>();
hubConnection.invoke("JoinGroup", args: ["companyId_${identifier.id}"]);
onReceiveNotification(arguments) {
hubConnection.off("ReceiveNotification");
completer.complete(true);
}
hubConnection.on("ReceiveNotification", onReceiveNotification);
return completer.future;
}
Future<bool> _receiveFromJobseeker() async {
Completer<bool> completer = Completer<bool>();
hubConnection.invoke("JoinGroup", args: ["jobseekerId_${identifier.id}"]);
onReceiveNotification(arguments) {
hubConnection.off("ReceiveNotification");
completer.complete(true);
}
hubConnection.on("ReceiveNotification", onReceiveNotification);
return completer.future;
}
}
This diff is collapsed.
import '../data/Common/identifier.dart';
String myUrl = "http://9628-89-39-107-191.ngrok.io";
Identifier identifier = Identifier(53, "", false);
import 'package:curved_navigation_bar/curved_navigation_bar.dart';
import 'package:flutter/material.dart';
import 'package:job_portal_app/UI/jobseeker/manage_account_screen.dart';
import '../../Services/global_methods.dart';
import '../jobseeker/favorites_screen.dart';
import '../jobseeker/jobseeker_home_screen.dart';
import '../jobseeker/profile_screen.dart';
import '../jobseeker/search_jobs_screen.dart';
// ignore: must_be_immutable
class MyBottomNavigationBar extends StatelessWidget {
int indexNum = 0;
MyBottomNavigationBar({super.key, required this.indexNum});
@override
Widget build(BuildContext context) {
return CurvedNavigationBar(
index: indexNum,
height: 50,
animationDuration: const Duration(milliseconds: 300),
animationCurve: Curves.bounceInOut,
onTap: (index) {
if (index == 0) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const JobSeekerHomeScreen()));
} else if (index == 1) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const SearchJobsScreen()));
} else if (index == 2) {
Navigator.pushReplacement(context,
MaterialPageRoute(builder: (context) => const ProfileScreen()));
} else if (index == 3) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const ManageAccountScreen()));
} else if (index == 4) {
Navigator.pushReplacement(context,
MaterialPageRoute(builder: (context) => const FavoritesScreen()));
} else if (index == 5) {
GlobalMethods.logout(context);
}
},
items: const [
Icon(
Icons.home,
size: 19,
color: Colors.black87,
),
Icon(
Icons.search,
size: 19,
color: Colors.black87,
),
Icon(
Icons.person_pin,
size: 19,
color: Colors.black87,
),
Icon(
Icons.settings,
size: 19,
color: Colors.black87,
),
Icon(
Icons.star,
size: 19,
color: Colors.black87,
),
Icon(
Icons.logout,
size: 19,
color: Colors.black87,
),
],
backgroundColor: Colors.green,
buttonBackgroundColor: Colors.cyan.shade100,
color: Colors.cyan.shade200,
);
}
}
// ignore_for_file: file_names
import 'package:curved_navigation_bar/curved_navigation_bar.dart';
import 'package:flutter/material.dart';
import 'package:job_portal_app/Services/global_methods.dart';
import '../Company/company_home_screen.dart';
import '../Company/company_profile_screen.dart';
import '../Company/company_setting_screen.dart';
import '../Company/show_all_jobs_screen.dart';
import '../Company/upload_job_screen.dart';
// ignore: must_be_immutable
class CompanyNavigationBar extends StatelessWidget {
int indexNum = 0;
CompanyNavigationBar({super.key, required this.indexNum});
@override
Widget build(BuildContext context) {
return CurvedNavigationBar(
index: indexNum,
height: 55,
animationDuration: const Duration(milliseconds: 300),
animationCurve: Curves.bounceInOut,
onTap: (index) {
if (index == 0) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const CompanyHomeScreen()));
} else if (index == 1) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const ShowAllJobsScreen()));
} else if (index == 2) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const CompanyProfileScreen()));
} else if (index == 3) {
Navigator.pushReplacement(context,
MaterialPageRoute(builder: (context) => const CompanySetting()));
} else if (index == 4) {
Navigator.pushReplacement(context,
MaterialPageRoute(builder: (context) => const UploadJobScreen()));
} else if (index == 5) {
GlobalMethods.logout(context);
}
},
items: const [
Icon(
Icons.home,
size: 19,
color: Colors.black87,
),
Icon(
Icons.search,
size: 19,
color: Colors.black87,
),
Icon(
Icons.person_pin,
size: 19,
color: Colors.black87,
),
Icon(
Icons.settings,
size: 19,
color: Colors.black87,
),
Icon(
Icons.add,
size: 19,
color: Colors.black87,
),
Icon(
Icons.logout,
size: 19,
color: Colors.black87,
)
],
backgroundColor: Colors.green,
buttonBackgroundColor: Colors.cyan.shade100,
color: Colors.cyan.shade200,
);
}
}
import 'package:flutter/material.dart';
class AboutScreen extends StatefulWidget {
const AboutScreen({super.key});
@override
State<AboutScreen> createState() => _AboutScreenState();
}
class _AboutScreenState extends State<AboutScreen> {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.1, 1])),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
leading: IconButton(
icon: const Icon(
Icons.close,
size: 20,
color: Colors.black,
),
onPressed: () {
Navigator.pop(context);
},
),
flexibleSpace: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
color: Colors.black45,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15)),
child: Column(
children: [
ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(15),
topRight: Radius.circular(15),
),
child: Image.asset("Images/searchjob.jpg"),
),
const Center(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
"Job Portal App",
style: TextStyle(
color: Colors.amberAccent,
fontSize: 30,
fontStyle: FontStyle.italic),
),
),
),
const Divider(
thickness: 1,
color: Colors.amber,
),
const Padding(
padding: EdgeInsets.all(8.0),
child: Text(
"The job portal application helps companies find the most suitable job seekers for the jobs they offer, as it allows the possibility of adding a new job, receiving employment applications submitted by job seekers, in addition to booking appointments for interviews for applicants.\nalso helps job seekers find the most suitable job for them, as it allows a review of all the jobs offered in the application, in addition to the ability to search for a specific job, apply for it, and request an appointment for an interview.",
textAlign: TextAlign.justify,
style: TextStyle(
color: Colors.white54,
fontSize: 18,
fontStyle: FontStyle.italic),
),
),
const SizedBox(
height: 30,
),
Container(
alignment: Alignment.bottomRight,
child: GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: const Padding(
padding: EdgeInsets.all(15.0),
child: Text(
"close",
style: TextStyle(color: Colors.amber, fontSize: 17),
),
),
),
)
],
),
),
)),
),
),
);
}
}
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:job_portal_app/Services/global_methods.dart';
import 'package:job_portal_app/Services/global_variables.dart';
class AddSpecification extends StatefulWidget {
const AddSpecification({super.key});
@override
State<AddSpecification> createState() => _AddSpecificationState();
}
class _AddSpecificationState extends State<AddSpecification> {
final _globalKey = GlobalKey<FormState>();
final TextEditingController _name = TextEditingController();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
flexibleSpace: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
),
),
body: Center(
child: Padding(
padding: const EdgeInsets.all(7.0),
child: Card(
color: Colors.white10,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(
height: 10,
),
const Align(
alignment: Alignment.center,
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
"Add new specification",
style: TextStyle(
color: Colors.black,
fontSize: 30,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.italic),
),
),
),
const SizedBox(
height: 10,
),
const Divider(
thickness: 1,
color: Colors.grey,
),
Padding(
padding: const EdgeInsets.all(0),
child: Form(
key: _globalKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// imageProfile(),
const SizedBox(height: 20),
GlobalMethods.textTitle(
label: 'Specification name :'),
GlobalMethods.textFormFields(
valuekey: "SpecificationName",
controller: _name,
enabled: true,
fct: () {},
maxlength: 50,
),
InkWell(
onTap: () async {
if (_globalKey.currentState!.validate()) {
await _submitForm();
}
},
child: Center(
child: Container(
width: 200,
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.black),
child: const Center(
child: Text(
"Add",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 18),
),
),
)),
),
const SizedBox(height: 20),
],
),
),
)
],
),
),
),
)),
)),
);
}
Future<void> _submitForm() async {
final url =
Uri.parse('$myUrl/api/Specifications?specificationName=${_name.text}');
final request = http.MultipartRequest('post', url)
..fields['name'] = _name.text;
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsets.all(5.0),
child: Text("Adding..."),
),
CircularProgressIndicator()
],
),
duration: Duration(minutes: 1),
));
var response = await request.send();
if (response.statusCode == 200) {
_showAndPop();
} else {
_justShow();
}
}
void _showAndPop() {
Navigator.pop(context);
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Specificaation was added successfully'),
duration: Duration(seconds: 3),
));
}
void _justShow() {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('This specification already exist'),
duration: Duration(seconds: 3),
));
}
}
This diff is collapsed.
import 'package:flutter/material.dart';
import 'package:job_portal_app/Widgets/company_widget.dart';
import 'package:job_portal_app/logic/fetch.dart';
import '../../data/Company/company.dart';
// ignore: must_be_immutable
class ShowAllCompaniesScreen extends StatefulWidget {
const ShowAllCompaniesScreen({
super.key,
});
@override
State<ShowAllCompaniesScreen> createState() => _ShowAllCompaniesScreenState();
}
class _ShowAllCompaniesScreenState extends State<ShowAllCompaniesScreen> {
int x = 0;
Future<List<Company>>? _futureCompanies;
@override
void initState() {
_futureCompanies = fetch.getAllCompanies();
getCompanyCount();
super.initState();
}
void getCompanyCount() {
_futureCompanies?.then((List<Company>? companyList) {
if (companyList != null) {
setState(() {
x = companyList.length;
});
}
});
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
leading: IconButton(
icon: const Icon(
Icons.close,
size: 25,
color: Colors.black,
),
onPressed: () {
Navigator.pop(context);
},
),
flexibleSpace: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
),
title: Text("$x company"),
centerTitle: true,
),
body: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.1, 1])),
child: FutureBuilder(
future: _futureCompanies,
builder: (context, snapshot) {
if (snapshot.hasData) {
List<Company>? companies = snapshot.data;
return ListView.builder(
itemCount: companies!.length,
itemBuilder: (context, index) {
Company company = companies[index];
return CompanyWidget(
company: company,
);
},
);
} else {
return const Center(child: CircularProgressIndicator());
}
},
),
)));
}
}
import 'package:flutter/material.dart';
import 'package:job_portal_app/logic/fetch.dart';
import '../../Widgets/job_seeker_widget.dart';
import '../../data/jobseeker/cv.dart';
// ignore: must_be_immutable
class ShowAllJobseekersScreen extends StatefulWidget {
const ShowAllJobseekersScreen({
super.key,
});
@override
State<ShowAllJobseekersScreen> createState() =>
_ShowAllJobseekersScreenState();
}
class _ShowAllJobseekersScreenState extends State<ShowAllJobseekersScreen> {
int x = 0;
Future<List<CV>>? _futureCVs;
@override
void initState() {
_futureCVs = fetch.getAllJobseekers();
getCvCount();
super.initState();
}
void getCvCount() {
_futureCVs?.then((List<CV>? cvList) {
if (cvList != null) {
setState(() {
x = cvList.length;
});
}
});
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
leading: IconButton(
icon: const Icon(
Icons.close,
size: 25,
color: Colors.black,
),
onPressed: () {
Navigator.pop(context);
},
),
flexibleSpace: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
),
title: Text("$x jobseeker"),
centerTitle: true,
),
body: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.1, 1])),
child: FutureBuilder(
future: _futureCVs,
builder: (context, snapshot) {
if (snapshot.hasData) {
List<CV>? cvs = snapshot.data;
return ListView.builder(
itemCount: cvs!.length,
itemBuilder: (context, index) {
CV cv = cvs[index];
return JobseekerWidget(
cv: cv,
);
},
);
} else {
return const Center(child: CircularProgressIndicator());
}
},
),
)));
}
}
import 'package:flutter/material.dart';
import 'package:job_portal_app/UI/Common/show_all_companies_screen.dart';
import 'package:job_portal_app/UI/Common/show_all_jobseekers_screen.dart';
import '../../Services/global_methods.dart';
class UsersScreen extends StatefulWidget {
const UsersScreen({super.key});
@override
State<UsersScreen> createState() => _UsersScreenState();
}
class _UsersScreenState extends State<UsersScreen> {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
flexibleSpace: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
),
title: const Text("Users"),
centerTitle: true,
),
body: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ShowAllCompaniesScreen()));
},
child: GlobalMethods.userInfo(
myIcon: Icons.home_repair_service, content: "Companies")),
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ShowAllJobseekersScreen()));
},
child: GlobalMethods.userInfo(
myIcon: Icons.person_2, content: "Jobseekers")),
],
),
),
),
);
}
}
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:job_portal_app/Services/global_variables.dart';
import '../../Services/global_methods.dart';
// ignore: must_be_immutable
class AddJobSkillScreen extends StatelessWidget {
int id;
AddJobSkillScreen({super.key, required this.id});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: MyCustomForm(id: id),
),
);
}
}
// ignore: must_be_immutable
class MyCustomForm extends StatefulWidget {
int id;
MyCustomForm({super.key, required this.id});
@override
// ignore: library_private_types_in_public_api
_MyCustomFormState createState() => _MyCustomFormState();
}
class _MyCustomFormState extends State<MyCustomForm> {
final _formKey = GlobalKey<FormState>();
final _nameController = TextEditingController();
final _periodController = TextEditingController();
@override
void dispose() {
_nameController.dispose();
_periodController.dispose();
super.dispose();
}
Future<void> _submitForm() async {
try {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsets.all(5.0),
child: Text("Adding..."),
),
CircularProgressIndicator()
],
),
duration: Duration(minutes: 1),
));
final url = Uri.parse('$myUrl/api/Jobs/AddSkills/${widget.id}');
final response = await http.post(
url,
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
HttpHeaders.authorizationHeader: "Bearer ${identifier.token}"
},
body: jsonEncode(<String, String>{
'name': _nameController.text,
'practicePeriod': _periodController.text,
}),
);
if (response.statusCode == 200) {
_showAndPop();
} else {
_justShow();
}
} catch (error) {
GlobalMethods.showErrorDialog(error: error.toString(), ctx: context);
}
}
void _showAndPop() {
Navigator.pop(context);
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Skill added successfully'),
duration: Duration(seconds: 3),
));
}
void _justShow() {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('There is an error occured !!!'),
duration: Duration(seconds: 3),
));
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
flexibleSpace: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
),
),
body: Center(
child: Padding(
padding: const EdgeInsets.all(7.0),
child: Card(
color: Colors.white10,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(
height: 10,
),
const Align(
alignment: Alignment.center,
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
"Add New Skill",
style: TextStyle(
color: Colors.black,
fontSize: 30,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.italic),
),
),
),
const SizedBox(
height: 10,
),
const Divider(
thickness: 1,
color: Colors.grey,
),
Padding(
padding: const EdgeInsets.all(0),
child: Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 20),
GlobalMethods.textTitle(label: 'Skill name :'),
GlobalMethods.textFormFields(
valuekey: "Skill Name",
controller: _nameController,
enabled: true,
fct: () {},
maxlength: 50,
),
GlobalMethods.textTitle(
label: 'Practice period :'),
GlobalMethods.textFormFields(
valuekey: "Practice Period",
controller: _periodController,
enabled: true,
fct: () {},
maxlength: 50,
),
InkWell(
onTap: () async {
if (_formKey.currentState!.validate()) {
await _submitForm();
}
},
child: Center(
child: Container(
width: 200,
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.black),
child: const Center(
child: Text(
"Add Skill",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 18),
),
),
)),
),
const SizedBox(height: 20),
],
),
),
)
],
),
),
),
)),
)),
);
}
}
This diff is collapsed.
import 'package:flutter/material.dart';
import 'package:job_portal_app/Services/global_methods.dart';
import 'package:job_portal_app/Services/global_variables.dart';
import 'package:job_portal_app/data/Common/person.dart';
import 'package:provider/provider.dart';
import '../../Services/Common/new_notification_manager.dart';
import '../../Widgets/app_drawer_widget.dart';
import '../../logic/fetch.dart';
import '../Bottom_Navigation_Bar/company_navigation_bar.dart';
import '../Notification/show_my_notification_screen.dart';
class CompanyHomeScreen extends StatefulWidget {
const CompanyHomeScreen({super.key});
@override
State<CompanyHomeScreen> createState() => _CompanyHomeScreenState();
}
class _CompanyHomeScreenState extends State<CompanyHomeScreen> {
int y = 0;
int x = 0;
Person person = Person("", "", "");
@override
void initState() {
fetchPerson();
fetchData();
super.initState();
}
Future<void> fetchPerson() async {
try {
y = identifier.id;
person = await fetch.getPersonById(y);
setState(() {});
} catch (error) {
GlobalMethods.showErrorDialog(error: error.toString(), ctx: context);
}
setState(() {});
}
Future<void> fetchData() async {
try {
y = identifier.id;
x = await fetch.getNumberOfCompanyNotifications(y);
} catch (error) {
GlobalMethods.showErrorDialog(error: error.toString(), ctx: context);
}
setState(() {});
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.1, 1])),
child: Scaffold(
bottomNavigationBar: CompanyNavigationBar(
indexNum: 0,
),
backgroundColor: Colors.transparent,
drawer: AppDrawerWidget(
person: person,
),
appBar: AppBar(
iconTheme: const IconThemeData(
color: Colors.black, // Set the desired icon color
),
actions: [
Consumer<NewNotificationManager>(
builder: (context, notificationManager, _) {
return InkWell(
onTap: () async {
notificationManager.dismiss();
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ShowMyNotificationScreen(),
),
);
setState(() {
fetchData();
});
},
child: Stack(children: [
const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.notifications,
size: 40,
color: Colors.black87,
),
),
notificationManager.hasNewNotification == true || x > 0
? Positioned(
right: 8,
bottom: 12,
child: Container(
width: 17,
height: 17,
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
child: Padding(
padding: const EdgeInsets.all(1.0),
child: Text(
notificationManager.notificationCount != 0
? notificationManager.notificationCount
.toString()
: x.toString(),
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.white, fontSize: 9),
),
),
))
: const SizedBox.shrink()
]));
})
],
flexibleSpace: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.greenAccent],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
stops: [0.2, 0.9])),
),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
color: Colors.black45,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15)),
child: Column(
children: [
ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(15),
topRight: Radius.circular(15),
),
child: Image.asset("Images/comphome.jpg"),
),
Center(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Hello ${person.name.toString()}",
style: const TextStyle(
color: Colors.amberAccent,
fontSize: 30,
fontStyle: FontStyle.italic),
),
),
),
const Divider(
thickness: 1,
color: Colors.amber,
),
const Padding(
padding: EdgeInsets.all(8.0),
child: Text(
"The job portal application helps companies find the most suitable job seekers for the jobs they offer, as it allows the possibility of adding a new job, receiving employment applications submitted by job seekers, in addition to booking appointments for interviews for applicants.",
textAlign: TextAlign.justify,
style: TextStyle(
color: Colors.white54,
fontSize: 18,
fontStyle: FontStyle.italic),
),
),
GlobalMethods.showDashBoard(context),
],
),
),
)),
),
),
);
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment