Merge branch 'sikander-development' into 'main'

Sikander development

See merge request haroon6138/cloudsolutions-atoms!1
merge-requests/2/merge
Sikander Saleem 3 years ago
commit 008232e69f

Binary file not shown.

@ -26,6 +26,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 33
ndkVersion flutter.ndkVersion
@ -37,23 +44,32 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.test_sa"
applicationId "com.hmg.atoms"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 21
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
versionCode 1
versionName '1.0.0'
}
buildTypes {
signingConfigs {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled true
shrinkResources true
signingConfig signingConfigs.release
}
}
}

@ -0,0 +1,4 @@
storePassword=Cloud@AtomsSA
keyPassword=Cloud@AtomsSA
keyAlias=playstore
storeFile=/Users/sikandersaleem/StudioProjects/cloudsolutions-atoms/android/AtomsSA-playStore.jks

@ -64,7 +64,7 @@
"code": "Code",
"serialNumber": "Serial Number",
"add": "Add",
"brand": "Brand",
"brand": "manufacture",
"clearSearch": "Clear Search",
"closed": "Closed",
"create": "Create",
@ -84,8 +84,8 @@
"facebook": "facebook",
"faultDescription": "Fault Description",
"general": "General",
"hospital": "Client",
"hospitalRequired": "Client Required",
"hospital": "Site",
"hospitalRequired": "Site Required",
"hotLine": "Hot Line",
"jobSheetNumber": "Job Sheet Number",
"linkedIn": "linkedIn",
@ -96,9 +96,9 @@
"nameExist": "Name Exist",
"newServiceRequest": "New Service Request",
"newWord": "New",
"noDateFound": "No Data Found",
"noDeviceFound": "No Device Found",
"noHospitalFound": "No Client Found",
"noDateFound": "No Date Found",
"noDeviceFound": "No Asset Found",
"noHospitalFound": "No Site Found",
"noModelFound": "No Model Found",
"noServiceRequestFound": "No Service Request Found",
"noSnFound": "No SN Found",
@ -106,8 +106,8 @@
"notificationsNotFound": "Notifications Not Found",
"noUniteFound": "No Unit Found",
"ourWebsite": "Our Website",
"pickDevice": "Pick Device",
"pickHospital": "Pick Client",
"pickDevice": "Pick Asset",
"pickHospital": "Pick Site",
"pickUnite": "Pick Unit",
"policy": "Policy",
"reason1": "The engineer didn't confirm visit date with 2 hours from the request time",
@ -169,10 +169,10 @@
"attachImage": "Attach Image",
"callLastSituation": "Call's Last Situation",
"customer": "Customer",
"editServiceReport": "Edit Service Report",
"editServiceReport": "Edit Work Order",
"invoiceCode": "Invoice Code",
"invoiceNumber": "Invoice Number",
"newServiceReport": "New Service Report",
"newServiceReport": "New Work Order",
"number": "Number",
"operatingHours": "Operating Hours",
"partNumber": "Part Number",

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

@ -0,0 +1,34 @@
<?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>CLIENT_ID</key>
<string>973582662416-3jlv0ckuiupmo20lsjv56pcqgho6ga63.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.973582662416-3jlv0ckuiupmo20lsjv56pcqgho6ga63</string>
<key>API_KEY</key>
<string>AIzaSyACQkSleNwU1jzEKR5ho1uSfZERokwwAbc</string>
<key>GCM_SENDER_ID</key>
<string>973582662416</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.hmg.atoms</string>
<key>PROJECT_ID</key>
<string>atoms-fb912</string>
<key>STORAGE_BUCKET</key>
<string>atoms-fb912.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:973582662416:ios:bc4a8061444c6a08fbc395</string>
</dict>
</plist>

@ -0,0 +1,41 @@
# Uncomment this line to define a global platform for your project
platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end

@ -0,0 +1,216 @@
PODS:
- audioplayers_darwin (0.0.1):
- Flutter
- Firebase/CoreOnly (10.3.0):
- FirebaseCore (= 10.3.0)
- Firebase/Messaging (10.3.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 10.3.0)
- firebase_core (2.4.1):
- Firebase/CoreOnly (= 10.3.0)
- Flutter
- firebase_messaging (14.2.1):
- Firebase/Messaging (= 10.3.0)
- firebase_core
- Flutter
- FirebaseCore (10.3.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreInternal (10.3.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseInstallations (10.3.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseMessaging (10.3.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Reachability (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- Flutter (1.0.0)
- flutter_keyboard_visibility (0.0.1):
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_sound (9.2.13):
- Flutter
- flutter_sound_core (= 9.2.13)
- flutter_sound_core (9.2.13)
- fluttertoast (0.0.2):
- Flutter
- Toast
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- GoogleDataTransport (9.2.0):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.10.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.10.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.10.0):
- GoogleUtilities/Environment
- GoogleUtilities/Network (7.10.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.10.0)"
- GoogleUtilities/Reachability (7.10.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.10.0):
- GoogleUtilities/Logger
- image_picker_ios (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11)
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- package_info (0.0.1):
- Flutter
- path_provider_ios (0.0.1):
- Flutter
- permission_handler_apple (9.0.4):
- Flutter
- PromisesObjC (2.1.1)
- qr_code_scanner (0.2.0):
- Flutter
- MTBBarcodeScanner
- share (0.0.1):
- Flutter
- shared_preferences_ios (0.0.1):
- Flutter
- speech_to_text (0.0.1):
- Flutter
- Try
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- Toast (4.0.0)
- Try (2.1.1)
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- share (from `.symlinks/plugins/share/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- speech_to_text (from `.symlinks/plugins/speech_to_text/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
SPEC REPOS:
trunk:
- Firebase
- FirebaseCore
- FirebaseCoreInternal
- FirebaseInstallations
- FirebaseMessaging
- flutter_sound_core
- FMDB
- GoogleDataTransport
- GoogleUtilities
- MTBBarcodeScanner
- nanopb
- PromisesObjC
- Toast
- Try
EXTERNAL SOURCES:
audioplayers_darwin:
:path: ".symlinks/plugins/audioplayers_darwin/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
Flutter:
:path: Flutter
flutter_keyboard_visibility:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_sound:
:path: ".symlinks/plugins/flutter_sound/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
qr_code_scanner:
:path: ".symlinks/plugins/qr_code_scanner/ios"
share:
:path: ".symlinks/plugins/share/ios"
shared_preferences_ios:
:path: ".symlinks/plugins/shared_preferences_ios/ios"
speech_to_text:
:path: ".symlinks/plugins/speech_to_text/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
Firebase: f92fc551ead69c94168d36c2b26188263860acd9
firebase_core: bf59c32d2e53814f558efa20840c1902fa2fe461
firebase_messaging: ee597229fc260f8fa491fa8f2d4a32dfbfa406fa
FirebaseCore: 988754646ab3bd4bdcb740f1bfe26b9f6c0d5f2a
FirebaseCoreInternal: 29b76f784d607df8b2a1259d73c3f04f1210137b
FirebaseInstallations: e2f26126089dcf41e215f7b8925af8d953c7d602
FirebaseMessaging: e345b219fd15d325f0cf2fef28cb8ce00d851b3f
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_sound: c60effa2a350fb977885f0db2fbc4c1ad5160900
flutter_sound_core: 26c10e5832e76aaacfae252d8925232281c486ae
fluttertoast: eb263d302cc92e04176c053d2385237e9f43fad0
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
GoogleUtilities: bad72cb363809015b1f7f19beb1f1cd23c589f95
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
share: 0b2c3e82132f5888bccca3351c504d0003b3b410
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048
COCOAPODS: 1.11.3

@ -0,0 +1,13 @@
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)
}
}

@ -0,0 +1,122 @@
{
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -0,0 +1,23 @@
{
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

@ -0,0 +1,5 @@
# 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.

@ -0,0 +1,37 @@
<?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>

@ -0,0 +1,26 @@
<?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>

@ -0,0 +1,19 @@
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
@end
NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */

@ -0,0 +1,133 @@
//
// Generated file. Do not edit.
//
// clang-format off
#import "GeneratedPluginRegistrant.h"
#if __has_include(<audioplayers_darwin/AudioplayersDarwinPlugin.h>)
#import <audioplayers_darwin/AudioplayersDarwinPlugin.h>
#else
@import audioplayers_darwin;
#endif
#if __has_include(<firebase_core/FLTFirebaseCorePlugin.h>)
#import <firebase_core/FLTFirebaseCorePlugin.h>
#else
@import firebase_core;
#endif
#if __has_include(<firebase_messaging/FLTFirebaseMessagingPlugin.h>)
#import <firebase_messaging/FLTFirebaseMessagingPlugin.h>
#else
@import firebase_messaging;
#endif
#if __has_include(<flutter_keyboard_visibility/FlutterKeyboardVisibilityPlugin.h>)
#import <flutter_keyboard_visibility/FlutterKeyboardVisibilityPlugin.h>
#else
@import flutter_keyboard_visibility;
#endif
#if __has_include(<flutter_local_notifications/FlutterLocalNotificationsPlugin.h>)
#import <flutter_local_notifications/FlutterLocalNotificationsPlugin.h>
#else
@import flutter_local_notifications;
#endif
#if __has_include(<flutter_sound/FlutterSound.h>)
#import <flutter_sound/FlutterSound.h>
#else
@import flutter_sound;
#endif
#if __has_include(<fluttertoast/FluttertoastPlugin.h>)
#import <fluttertoast/FluttertoastPlugin.h>
#else
@import fluttertoast;
#endif
#if __has_include(<image_picker_ios/FLTImagePickerPlugin.h>)
#import <image_picker_ios/FLTImagePickerPlugin.h>
#else
@import image_picker_ios;
#endif
#if __has_include(<package_info/FLTPackageInfoPlugin.h>)
#import <package_info/FLTPackageInfoPlugin.h>
#else
@import package_info;
#endif
#if __has_include(<path_provider_ios/FLTPathProviderPlugin.h>)
#import <path_provider_ios/FLTPathProviderPlugin.h>
#else
@import path_provider_ios;
#endif
#if __has_include(<permission_handler_apple/PermissionHandlerPlugin.h>)
#import <permission_handler_apple/PermissionHandlerPlugin.h>
#else
@import permission_handler_apple;
#endif
#if __has_include(<qr_code_scanner/FlutterQrPlugin.h>)
#import <qr_code_scanner/FlutterQrPlugin.h>
#else
@import qr_code_scanner;
#endif
#if __has_include(<share/FLTSharePlugin.h>)
#import <share/FLTSharePlugin.h>
#else
@import share;
#endif
#if __has_include(<shared_preferences_ios/FLTSharedPreferencesPlugin.h>)
#import <shared_preferences_ios/FLTSharedPreferencesPlugin.h>
#else
@import shared_preferences_ios;
#endif
#if __has_include(<speech_to_text/SpeechToTextPlugin.h>)
#import <speech_to_text/SpeechToTextPlugin.h>
#else
@import speech_to_text;
#endif
#if __has_include(<sqflite/SqflitePlugin.h>)
#import <sqflite/SqflitePlugin.h>
#else
@import sqflite;
#endif
#if __has_include(<url_launcher_ios/FLTURLLauncherPlugin.h>)
#import <url_launcher_ios/FLTURLLauncherPlugin.h>
#else
@import url_launcher_ios;
#endif
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[AudioplayersDarwinPlugin registerWithRegistrar:[registry registrarForPlugin:@"AudioplayersDarwinPlugin"]];
[FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]];
[FLTFirebaseMessagingPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseMessagingPlugin"]];
[FlutterKeyboardVisibilityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterKeyboardVisibilityPlugin"]];
[FlutterLocalNotificationsPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterLocalNotificationsPlugin"]];
[FlutterSound registerWithRegistrar:[registry registrarForPlugin:@"FlutterSound"]];
[FluttertoastPlugin registerWithRegistrar:[registry registrarForPlugin:@"FluttertoastPlugin"]];
[FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]];
[FLTPackageInfoPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPackageInfoPlugin"]];
[FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]];
[PermissionHandlerPlugin registerWithRegistrar:[registry registrarForPlugin:@"PermissionHandlerPlugin"]];
[FlutterQrPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterQrPlugin"]];
[FLTSharePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharePlugin"]];
[FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
[SpeechToTextPlugin registerWithRegistrar:[registry registrarForPlugin:@"SpeechToTextPlugin"]];
[SqflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"SqflitePlugin"]];
[FLTURLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTURLLauncherPlugin"]];
}
@end

@ -0,0 +1,53 @@
<?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>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Test Sa</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>ATOMS</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>NSSpeechRecognitionUsageDescription</key>
<string>Recognize Speech</string>
<key>NSMicrophoneUsageDescription</key>
<string>To Record Audio </string>
</dict>
</plist>

@ -0,0 +1 @@
#import "GeneratedPluginRegistrant.h"

@ -3,16 +3,18 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
00C3AFCE29769C38002E7B47 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 00C3AFCD29769C37002E7B47 /* GoogleService-Info.plist */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
F2A2A0FF9835A41EAE85C46C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EFA2032ACFCE75A326C4021 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@ -29,9 +31,13 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
00C3AFCC297590E6002E7B47 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
00C3AFCD29769C37002E7B47 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
21218448C05A6EE259A8A273 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
4EFA2032ACFCE75A326C4021 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@ -42,6 +48,8 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9CABA487766DBA12CD9795AB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
C495935E3B272204B901FA13 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -49,12 +57,23 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F2A2A0FF9835A41EAE85C46C /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
577ED37A491ADCF557B4F6D9 /* Pods */ = {
isa = PBXGroup;
children = (
21218448C05A6EE259A8A273 /* Pods-Runner.debug.xcconfig */,
C495935E3B272204B901FA13 /* Pods-Runner.release.xcconfig */,
9CABA487766DBA12CD9795AB /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@ -72,6 +91,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
577ED37A491ADCF557B4F6D9 /* Pods */,
CF00C18CA99370AC196B5B50 /* Frameworks */,
);
sourceTree = "<group>";
};
@ -86,6 +107,8 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
00C3AFCD29769C37002E7B47 /* GoogleService-Info.plist */,
00C3AFCC297590E6002E7B47 /* Runner.entitlements */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@ -98,6 +121,14 @@
path = Runner;
sourceTree = "<group>";
};
CF00C18CA99370AC196B5B50 /* Frameworks */ = {
isa = PBXGroup;
children = (
4EFA2032ACFCE75A326C4021 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -105,12 +136,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
1EBE8111D78021B782F0E9D3 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
82ACB2D948A573383205B7AC /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -161,6 +194,7 @@
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
00C3AFCE29769C38002E7B47 /* GoogleService-Info.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
@ -169,6 +203,28 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1EBE8111D78021B782F0E9D3 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -183,6 +239,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
82ACB2D948A573383205B7AC /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -254,6 +327,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -264,6 +338,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
EXCLUDED_ARCHS = arm64;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -272,7 +347,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -287,14 +362,103 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Atoms;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.testSa;
MARKETING_VERSION = 1.0.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-l\"sqlite3\"",
"-l\"z\"",
"-framework",
"\"AVFoundation\"",
"-framework",
"\"CoreTelephony\"",
"-framework",
"\"FBLPromises\"",
"-framework",
"\"FMDB\"",
"-framework",
"\"FirebaseCore\"",
"-framework",
"\"FirebaseCoreInternal\"",
"-framework",
"\"FirebaseInstallations\"",
"-framework",
"\"FirebaseMessaging\"",
"-framework",
"\"Foundation\"",
"-framework",
"\"GoogleDataTransport\"",
"-framework",
"\"GoogleUtilities\"",
"-framework",
"\"MTBBarcodeScanner\"",
"-framework",
"\"MediaPlayer\"",
"-framework",
"\"QuartzCore\"",
"-framework",
"\"Security\"",
"-framework",
"\"SystemConfiguration\"",
"-framework",
"\"Toast\"",
"-framework",
"\"Try\"",
"-framework",
"\"UIKit\"",
"-framework",
"\"audioplayers_darwin\"",
"-framework",
"\"firebase_core\"",
"-framework",
"\"firebase_messaging\"",
"-framework",
"\"flutter_keyboard_visibility\"",
"-framework",
"\"flutter_local_notifications\"",
"-framework",
"\"flutter_sound\"",
"-framework",
"\"flutter_sound_core\"",
"-framework",
"\"fluttertoast\"",
"-framework",
"\"image_picker_ios\"",
"-framework",
"\"nanopb\"",
"-framework",
"\"package_info\"",
"-framework",
"\"path_provider_ios\"",
"-framework",
"\"permission_handler_apple\"",
"-framework",
"\"qr_code_scanner\"",
"-framework",
"\"share\"",
"-framework",
"\"shared_preferences_ios\"",
"-framework",
"\"speech_to_text\"",
"-framework",
"\"sqflite\"",
"-framework",
"\"url_launcher_ios\"",
"-weak_framework",
"\"UserNotifications\"",
"\"-lc++\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.atoms;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@ -325,6 +489,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -335,6 +500,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
EXCLUDED_ARCHS = arm64;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@ -349,7 +515,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -380,6 +546,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -390,6 +557,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
EXCLUDED_ARCHS = arm64;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -398,7 +566,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -415,14 +583,103 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Atoms;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.testSa;
MARKETING_VERSION = 1.0.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-l\"sqlite3\"",
"-l\"z\"",
"-framework",
"\"AVFoundation\"",
"-framework",
"\"CoreTelephony\"",
"-framework",
"\"FBLPromises\"",
"-framework",
"\"FMDB\"",
"-framework",
"\"FirebaseCore\"",
"-framework",
"\"FirebaseCoreInternal\"",
"-framework",
"\"FirebaseInstallations\"",
"-framework",
"\"FirebaseMessaging\"",
"-framework",
"\"Foundation\"",
"-framework",
"\"GoogleDataTransport\"",
"-framework",
"\"GoogleUtilities\"",
"-framework",
"\"MTBBarcodeScanner\"",
"-framework",
"\"MediaPlayer\"",
"-framework",
"\"QuartzCore\"",
"-framework",
"\"Security\"",
"-framework",
"\"SystemConfiguration\"",
"-framework",
"\"Toast\"",
"-framework",
"\"Try\"",
"-framework",
"\"UIKit\"",
"-framework",
"\"audioplayers_darwin\"",
"-framework",
"\"firebase_core\"",
"-framework",
"\"firebase_messaging\"",
"-framework",
"\"flutter_keyboard_visibility\"",
"-framework",
"\"flutter_local_notifications\"",
"-framework",
"\"flutter_sound\"",
"-framework",
"\"flutter_sound_core\"",
"-framework",
"\"fluttertoast\"",
"-framework",
"\"image_picker_ios\"",
"-framework",
"\"nanopb\"",
"-framework",
"\"package_info\"",
"-framework",
"\"path_provider_ios\"",
"-framework",
"\"permission_handler_apple\"",
"-framework",
"\"qr_code_scanner\"",
"-framework",
"\"share\"",
"-framework",
"\"shared_preferences_ios\"",
"-framework",
"\"speech_to_text\"",
"-framework",
"\"sqflite\"",
"-framework",
"\"url_launcher_ios\"",
"-weak_framework",
"\"UserNotifications\"",
"\"-lc++\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.atoms;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -437,14 +694,103 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Atoms;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.testSa;
MARKETING_VERSION = 1.0.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-l\"sqlite3\"",
"-l\"z\"",
"-framework",
"\"AVFoundation\"",
"-framework",
"\"CoreTelephony\"",
"-framework",
"\"FBLPromises\"",
"-framework",
"\"FMDB\"",
"-framework",
"\"FirebaseCore\"",
"-framework",
"\"FirebaseCoreInternal\"",
"-framework",
"\"FirebaseInstallations\"",
"-framework",
"\"FirebaseMessaging\"",
"-framework",
"\"Foundation\"",
"-framework",
"\"GoogleDataTransport\"",
"-framework",
"\"GoogleUtilities\"",
"-framework",
"\"MTBBarcodeScanner\"",
"-framework",
"\"MediaPlayer\"",
"-framework",
"\"QuartzCore\"",
"-framework",
"\"Security\"",
"-framework",
"\"SystemConfiguration\"",
"-framework",
"\"Toast\"",
"-framework",
"\"Try\"",
"-framework",
"\"UIKit\"",
"-framework",
"\"audioplayers_darwin\"",
"-framework",
"\"firebase_core\"",
"-framework",
"\"firebase_messaging\"",
"-framework",
"\"flutter_keyboard_visibility\"",
"-framework",
"\"flutter_local_notifications\"",
"-framework",
"\"flutter_sound\"",
"-framework",
"\"flutter_sound_core\"",
"-framework",
"\"fluttertoast\"",
"-framework",
"\"image_picker_ios\"",
"-framework",
"\"nanopb\"",
"-framework",
"\"package_info\"",
"-framework",
"\"path_provider_ios\"",
"-framework",
"\"permission_handler_apple\"",
"-framework",
"\"qr_code_scanner\"",
"-framework",
"\"share\"",
"-framework",
"\"shared_preferences_ios\"",
"-framework",
"\"speech_to_text\"",
"-framework",
"\"sqflite\"",
"-framework",
"\"url_launcher_ios\"",
"-weak_framework",
"\"UserNotifications\"",
"\"-lc++\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.atoms;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@ -478,4 +824,4 @@
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
}

@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

@ -1,5 +1,6 @@
import UIKit
import Flutter
import Firebase
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@ -7,6 +8,7 @@ import Flutter
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

@ -0,0 +1,34 @@
<?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>CLIENT_ID</key>
<string>973582662416-3jlv0ckuiupmo20lsjv56pcqgho6ga63.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.973582662416-3jlv0ckuiupmo20lsjv56pcqgho6ga63</string>
<key>API_KEY</key>
<string>AIzaSyACQkSleNwU1jzEKR5ho1uSfZERokwwAbc</string>
<key>GCM_SENDER_ID</key>
<string>973582662416</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.hmg.atoms</string>
<key>PROJECT_ID</key>
<string>atoms-fb912</string>
<key>STORAGE_BUCKET</key>
<string>atoms-fb912.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:973582662416:ios:bc4a8061444c6a08fbc395</string>
</dict>
</plist>

@ -2,10 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Test Sa</string>
<string>Atoms SA</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -13,7 +15,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>ATOMS</string>
<string>Atoms SA</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
@ -22,8 +24,23 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>This app requires permission to access Camera to allow user to attach images</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires permission for Record Audio for to allow user to send voice notes</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires permission to access photo gallery to allow user to attach images</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>This app requires permission for Speech Recognition for speech to text functionality.</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
@ -43,7 +60,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>

@ -0,0 +1,8 @@
<?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>aps-environment</key>
<string>development</string>
</dict>
</plist>

@ -1,7 +1,7 @@
class URLs{
URLs._();
static const host2 = "http://194.163.164.213/atoms/api";
static const host1 = "http://194.163.164.213/atoms/api";
static const host1 = "https://atoms.hmg.com/api";
// API Routes
static const login = "/handle/user/login"; // post
@ -37,6 +37,8 @@ class URLs{
static const getServiceReportLastCalls = "/return/call/last/situation"; // get
static const getServiceTypes = "/return/service/type"; // get
static const getPartNumber = "/handle/return/all/parts"; // get
static const getServiceReportPriority = "/return/call/priority/list"; // get
static const getServiceReportDefectTypes = "/return/call/defect/type/list"; // get
//gas refill
static const getGasTypes = "/return/gas/refill/types"; // get
@ -53,5 +55,13 @@ class URLs{
// employee
static const getEmployees = "/return/assigned/employee"; // get
// pentry
static const getPentry = "/return/pentry/details"; // get
static const updatePentry = "/update/pentry/details"; // get
static const getPentryTaskStatus = "/return/pentry/task/status"; // get
static const getPentryVisitStatus = "/return/pentry/visit/status/list"; // get
static const getPentryStatus = "/return/pentry/status/list"; // get
// contacts
static const getPentryContacts = "/handle/return/all/contacts"; // get
}

@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:test_sa/models/subtitle.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:test_sa/models/subtitle.dart';
class AppLocalization {

@ -1,9 +1,9 @@
import 'dart:convert';
import 'package:test_sa/models/app_notification.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:test_sa/models/app_notification.dart';
import 'notification_manger.dart';

@ -1,6 +1,6 @@
import 'package:test_sa/views/app_style/colors.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:test_sa/views/app_style/colors.dart';
class NotificationManger{
// private constructor to avoid create object

@ -1,9 +1,9 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/department.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/department.dart';
class DepartmentsProvider extends ChangeNotifier{

@ -1,21 +1,11 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/controllers/http_status_manger/http_status_manger.dart';
import 'package:test_sa/models/department.dart';
import 'package:test_sa/models/device/device_transfer.dart';
import 'package:test_sa/models/device/device.dart';
import 'package:test_sa/models/device/device_transfer_info.dart';
import 'package:test_sa/models/gas_refill/gas_refill_model.dart';
import 'package:test_sa/models/hospital.dart';
import 'package:test_sa/models/issue.dart';
import 'package:test_sa/models/service_report.dart';
import 'package:test_sa/models/service_request/service_request.dart';
import 'package:test_sa/models/service_request/service_request_search.dart';
import 'package:test_sa/models/subtitle.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
class DeviceTransferProvider extends ChangeNotifier{
@ -74,10 +64,6 @@ class DeviceTransferProvider extends ChangeNotifier{
// return 200;
Response response;
try{
print( Uri.parse(
"$host${URLs.getDeviceTransfer}?uid=${user.id}"
"&token=${user.token}&page=${(items?.length ?? 0) ~/pageItemNumber}"
),);
response = await get(
Uri.parse(
"$host${URLs.getDeviceTransfer}?uid=${user.id}"
@ -106,7 +92,6 @@ class DeviceTransferProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
isLoading = false;
stateCode = -1;
notifyListeners();
@ -136,8 +121,6 @@ class DeviceTransferProvider extends ChangeNotifier{
host+URLs.requestDeviceTransfer),
body: body,
);
print(response.body);
stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
if(items != null) {
@ -153,7 +136,6 @@ class DeviceTransferProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
return -1;
}
@ -175,16 +157,12 @@ class DeviceTransferProvider extends ChangeNotifier{
};
body.addAll(newModel.toJson(isSender));
print(body);
Response response;
try{
print(Uri.parse("$host${URLs.updateDeviceTransfer}/$requestId"),);
response = await post(
Uri.parse("$host${URLs.updateDeviceTransfer}/$requestId"),
body: body,
);
print(response.body);
stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
reset();
@ -198,7 +176,6 @@ class DeviceTransferProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
return -1;
}

@ -1,10 +1,10 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/device/device.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
class DevicesProvider extends ChangeNotifier{
@ -81,25 +81,25 @@ class DevicesProvider extends ChangeNotifier{
@required String host,
@required User user,
@required String hospitalId,
@required String title}) async {
String serialNumber,
String number,
}) async {
Response response;
try{
response = await get(
Uri.parse(host + URLs.getEquipment+"?client=$hospitalId"
+ ( title == null || title.isEmpty ? "" : "&name=$title" )),
Uri.parse("$host${URLs.getEquipment}?client=$hospitalId"
"${serialNumber?.isEmpty == false ? "&name=$serialNumber" :""}"
"${number?.isEmpty == false ? "&number=$number" : ""}"
),
);
_stateCode = response.statusCode;
List<Device> _page = [];
List<Device> page = [];
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_page = categoriesListJson.map((device) => Device.fromJson(device)).toList();
page = categoriesListJson.map((device) => Device.fromJson(device)).toList();
}
return _page;
return page;
} catch(error) {
_loading = false;
_stateCode = -1;
notifyListeners();
return [];
}
@ -128,13 +128,10 @@ class DevicesProvider extends ChangeNotifier{
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
print(categoriesListJson.length);
_page = categoriesListJson.map((device) => Device.fromJson(device)).toList();
print(_page.length);
}
return _page;
} catch(error) {
print(error);
_loading = false;
_stateCode = -1;
notifyListeners();

@ -1,16 +1,10 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/controllers/http_status_manger/http_status_manger.dart';
import 'package:test_sa/models/gas_refill/gas_refill_model.dart';
import 'package:test_sa/models/issue.dart';
import 'package:test_sa/models/service_report.dart';
import 'package:test_sa/models/service_request/service_request.dart';
import 'package:test_sa/models/service_request/service_request_search.dart';
import 'package:test_sa/models/subtitle.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
class GasRefillProvider extends ChangeNotifier{
@ -54,10 +48,6 @@ class GasRefillProvider extends ChangeNotifier{
isLoading = true;
Response response;
try{
print( Uri.parse(
"$host${URLs.getGasRefill}?uid=${user.id}"
"&token=${user.token}&page=${(items?.length ?? 0) ~/pageItemNumber}"
));
response = await get(
Uri.parse(
"$host${URLs.getGasRefill}?uid=${user.id}"
@ -67,7 +57,6 @@ class GasRefillProvider extends ChangeNotifier{
"Content-Type":"application/json; charset=utf-8"
}
);
print(response.body);
stateCode = response.statusCode;
if(stateCode >= 200 && stateCode < 300) {
// client's request was successfully received
@ -87,7 +76,6 @@ class GasRefillProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
isLoading = false;
stateCode = -1;
notifyListeners();
@ -109,12 +97,11 @@ class GasRefillProvider extends ChangeNotifier{
};
body["details"] = jsonEncode(model.details.map((model) => {
"type": model.type.id.toString(),
"size": model.cylinderSize.id.toString(),
"type": model.type.id?.toString(),
"size": model.cylinderSize?.id.toString(),
"requsted_qty": model.requestedQuantity.toString(),
}).toList());
print(body);
Response response;
try{
response = await post(
@ -123,7 +110,6 @@ class GasRefillProvider extends ChangeNotifier{
body: body,
);
print(response.body);
stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
if(items != null) {
@ -139,7 +125,6 @@ class GasRefillProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
return -1;
}
@ -165,8 +150,6 @@ class GasRefillProvider extends ChangeNotifier{
"deliverd_qty": model.deliveredQuantity.toString(),
}).toList());
print(body);
print(Uri.parse("$host${URLs.updateGasRefill}/${newModel.id}"),);
Response response;
try{
response = await post(
@ -174,7 +157,6 @@ class GasRefillProvider extends ChangeNotifier{
body: body,
);
print(response.body);
stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
oldModel.fromGasRefillModel(newModel);
@ -183,7 +165,6 @@ class GasRefillProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
return -1;
}

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/hospital.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/hospital.dart';
import 'package:test_sa/models/user.dart';
class HospitalsProvider extends ChangeNotifier{
@ -55,11 +55,7 @@ class HospitalsProvider extends ChangeNotifier{
notifyListeners();
Response response;
try{
print( Uri.parse(
host + URLs.getHospitals
+ "?page=${(_hospitals?.length ?? 0) ~/pageItemNumber}"
+ ( title == null || title.isEmpty ? "" : "&name=$title" )));
response = await get(
response = await get(
Uri.parse(
host + URLs.getHospitals
+ "?page=${(_hospitals?.length ?? 0) ~/pageItemNumber}"
@ -96,11 +92,6 @@ class HospitalsProvider extends ChangeNotifier{
}
/// return -2 if request in progress
/// return -1 if error happen when sending request
/// return state code if request complete may be 200, 404 or 403
/// for more details check http state manager
/// lib\controllers\http_status_manger\http_status_manger.dart
Future<List<Hospital>> getHospitalsList ({String host,User user,String title}) async {
Response response;
try{

@ -1,10 +1,10 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/app_notification.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
class NotificationsProvider extends ChangeNotifier{

@ -110,7 +110,6 @@ class PartsProvider extends ChangeNotifier{
"Content-Type":"application/json; charset=utf-8"
}
);
_stateCode = response.statusCode;
List<Part> _page = [];
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
@ -119,9 +118,6 @@ class PartsProvider extends ChangeNotifier{
}
return _page;
} catch(error) {
_loading = false;
_stateCode = -1;
notifyListeners();
return [];
}

@ -1,6 +1,7 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/pantry/pentry.dart';
import 'package:test_sa/models/user.dart';
import 'package:test_sa/models/visits/visit.dart';
import 'package:test_sa/models/visits/visits_group.dart';
@ -76,7 +77,7 @@ class RegularVisitsProvider extends ChangeNotifier{
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
try{
List requestsListJson = json.decode(utf8.decode(response.bodyBytes));
List requestsListJson = json.decode(utf8.decode(response.bodyBytes).replaceAll("\\", ""));
List<Visit> _visits = requestsListJson.map(
(request) => Visit.fromJson(request)
).toList();
@ -137,5 +138,46 @@ class RegularVisitsProvider extends ChangeNotifier{
}
}
Future<Pentry> getPently({String host,User user,String id}) async {
Response response;
response = await get(
Uri.parse("$host${URLs.getPentry}/$id"),
headers: {
"Content-Type":"application/json; charset=utf-8"
}
);
Pentry pantry;
if(response.statusCode >= 200 && response.statusCode < 300) {
pantry = Pentry.fromMap(json.decode(utf8.decode(response.bodyBytes)));
}
return pantry;
}
Future<int> updatePentry ({
@required String host,
@required User user,
@required Pentry pentry,
@required Visit visit,
}) async {
try{
Response response;
Map<String,String> body = pentry.toMap();
body["uid"] = user.id;
body["token"] = user.token;
response = await post(
Uri.parse(host+URLs.updatePentry + "/${visit.id}"),
body: body,
);
if(response.statusCode >= 200 && response.statusCode < 300) {
visit.status = pentry.ppmVisitStatus;
notifyListeners();
}
return response.statusCode;
} catch(error) {
return -1;
}
}
}

@ -1,17 +1,17 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/controllers/http_status_manger/http_status_manger.dart';
import 'package:test_sa/models/issue.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/service_report.dart';
import 'package:test_sa/models/service_request/service_request.dart';
import 'package:test_sa/models/service_request/service_request_search.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/subtitle.dart';
import 'package:test_sa/models/timer_model.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
class ServiceRequestsProvider extends ChangeNotifier{
@ -58,14 +58,6 @@ class ServiceRequestsProvider extends ChangeNotifier{
isLoading = true;
Response response;
try{
print( Uri.parse(
host+URLs.getServiceRequests
+"?uid=${user.id}"
+(hospitalId == null? "" :"&client_nid=$hospitalId")
+"&token=${user.token}"
"&page=${(serviceRequests?.length ?? 0) ~/pageItemNumber}"
+search?.toSearchString() ?? ""
));
response = await get(
Uri.parse(
host+URLs.getServiceRequests
@ -79,7 +71,6 @@ class ServiceRequestsProvider extends ChangeNotifier{
"Content-Type":"application/json; charset=utf-8"
}
);
print(response.body);
stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
@ -100,7 +91,6 @@ class ServiceRequestsProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
isLoading = false;
stateCode = -1;
notifyListeners();
@ -161,11 +151,12 @@ class ServiceRequestsProvider extends ChangeNotifier{
"client": user.hospital.id ?? '',
"complaint": serviceRequest.maintenanceIssue,
"image": json.encode(serviceRequest.devicePhotos),
"priority": (serviceRequest.priority?.id).toString(),
"defect_types": (serviceRequest.defectType?.id).toString(),
};
if(serviceRequest.audio != null){
body["audio"] = serviceRequest.audio;
}
print(body);
Response response;
try{
response = await post(
@ -173,7 +164,6 @@ class ServiceRequestsProvider extends ChangeNotifier{
host+URLs.createRequest),
body: body,
);
stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
if(serviceRequests != null)
@ -188,7 +178,6 @@ class ServiceRequestsProvider extends ChangeNotifier{
return response.statusCode;
} catch(error) {
print(error);
return -1;
}
@ -225,7 +214,7 @@ class ServiceRequestsProvider extends ChangeNotifier{
@required String host,
@required User user,
@required String newDate,
@required Status employee,
@required Lookup employee,
@required ServiceRequest request,
}) async {
Response response;
@ -235,14 +224,12 @@ class ServiceRequestsProvider extends ChangeNotifier{
body["nid"] = request.id;
if(newDate != null) body["date"] = newDate;
if(employee != null) body["ass_emp"] = employee.id.toString();
print(body);
try{
response = await post(
Uri.parse(
host+URLs.updateRequestDate),
body: body,
);
print(response.body);
stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
request.engineerName = employee.label;
@ -377,7 +364,6 @@ class ServiceRequestsProvider extends ChangeNotifier{
host+URLs.updateServiceReport),
body: body,
);
print(response.body);
//stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class EmployeesProvider extends ChangeNotifier{
@ -23,8 +23,8 @@ class EmployeesProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _items;
List<Status> get items => _items;
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
@ -49,15 +49,14 @@ class EmployeesProvider extends ChangeNotifier{
Response response;
try{
response = await get(
Uri.parse(
host + URLs.getEmployees),
Uri.parse(
host + URLs.getEmployees),
);
print(response.body);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_items = categoriesListJson.map((type) => Status.fromJson(type)).toList();
_items = categoriesListJson.map((type) => Lookup.fromJson(type)).toList();
}
_loading = false;
notifyListeners();

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class GasCylinderSizesProvider extends ChangeNotifier{
@ -24,8 +24,8 @@ class GasCylinderSizesProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _items;
List<Status> get items => _items;
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
@ -50,13 +50,13 @@ class GasCylinderSizesProvider extends ChangeNotifier{
Response response;
try{
response = await get(
Uri.parse(host + URLs.getGasCylinderSize),
Uri.parse(host + URLs.getGasCylinderSize),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_items = categoriesListJson.map((item) => Status.fromJson(item)).toList();
_items = categoriesListJson.map((item) => Lookup.fromJson(item)).toList();
}
_loading = false;
notifyListeners();

@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -24,8 +24,8 @@ class GasStatusProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _items;
List<Status> get items => _items;
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
@ -49,13 +49,13 @@ class GasStatusProvider extends ChangeNotifier{
Response response;
try{
response = await get(
Uri.parse(host + URLs.getGasStatus),
Uri.parse(host + URLs.getGasStatus),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_items = categoriesListJson.map((item) => Status.fromJson(item)).toList();
_items = categoriesListJson.map((item) => Lookup.fromJson(item)).toList();
}
_loading = false;
notifyListeners();

@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -24,8 +24,8 @@ class GasTypesProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _items;
List<Status> get items => _items;
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
@ -49,19 +49,18 @@ class GasTypesProvider extends ChangeNotifier{
Response response;
try{
response = await get(
Uri.parse(host + URLs.getGasTypes),
Uri.parse(host + URLs.getGasTypes),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_items = categoriesListJson.map((item) => Status.fromJson(item)).toList();
_items = categoriesListJson.map((item) => Lookup.fromJson(item)).toList();
}
_loading = false;
notifyListeners();
return response.statusCode;
} catch(error) {
print(error);
_loading = false;
_stateCode = -1;
notifyListeners();

@ -0,0 +1,75 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class PentryStatusProvider extends ChangeNotifier{
//reset provider data
void reset(){
_items = null;
_stateCode = null;
}
// state code of current request to defied error message
// like 400 customer request failed
// 500 service not available
int _stateCode;
int get stateCode => _stateCode;
// contain user data
// when user not login or register _user = null
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
// failed _loading = false
bool _loading;
bool get isLoading => _loading;
set isLoading(bool isLoading){
_loading = isLoading;
notifyListeners();
}
/// return -2 if request in progress
/// return -1 if error happen when sending request
/// return state code if request complete may be 200, 404 or 403
/// for more details check http state manager
/// lib\controllers\http_status_manger\http_status_manger.dart
Future<int> getData ({String host,User user}) async {
if(_loading == true)
return -2;
_loading = true;
notifyListeners();
Response response;
try{
response = await get(
Uri.parse(
host + URLs.getPentryStatus),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List listJson = json.decode(utf8.decode(response.bodyBytes));
_items = listJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();
return response.statusCode;
} catch(error) {
_loading = false;
_stateCode = -1;
notifyListeners();
return -1;
}
}
}

@ -0,0 +1,75 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class PentryTaskStatusProvider extends ChangeNotifier{
//reset provider data
void reset(){
_items = null;
_stateCode = null;
}
// state code of current request to defied error message
// like 400 customer request failed
// 500 service not available
int _stateCode;
int get stateCode => _stateCode;
// contain user data
// when user not login or register _user = null
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
// failed _loading = false
bool _loading;
bool get isLoading => _loading;
set isLoading(bool isLoading){
_loading = isLoading;
notifyListeners();
}
/// return -2 if request in progress
/// return -1 if error happen when sending request
/// return state code if request complete may be 200, 404 or 403
/// for more details check http state manager
/// lib\controllers\http_status_manger\http_status_manger.dart
Future<int> getData ({String host,User user}) async {
if(_loading == true)
return -2;
_loading = true;
notifyListeners();
Response response;
try{
response = await get(
Uri.parse(
host + URLs.getPentryTaskStatus),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_items = categoriesListJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();
return response.statusCode;
} catch(error) {
_loading = false;
_stateCode = -1;
notifyListeners();
return -1;
}
}
}

@ -0,0 +1,74 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class PentryVisitStatusProvider extends ChangeNotifier{
//reset provider data
void reset(){
_items = null;
_stateCode = null;
}
// state code of current request to defied error message
// like 400 customer request failed
// 500 service not available
int _stateCode;
int get stateCode => _stateCode;
// contain user data
// when user not login or register _user = null
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
// failed _loading = false
bool _loading;
bool get isLoading => _loading;
set isLoading(bool isLoading){
_loading = isLoading;
notifyListeners();
}
/// return -2 if request in progress
/// return -1 if error happen when sending request
/// return state code if request complete may be 200, 404 or 403
/// for more details check http state manager
/// lib\controllers\http_status_manger\http_status_manger.dart
Future<int> getData ({String host,User user}) async {
if(_loading == true)
return -2;
_loading = true;
notifyListeners();
Response response;
try{
response = await get(
Uri.parse(
host + URLs.getPentryVisitStatus),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List listJson = json.decode(utf8.decode(response.bodyBytes));
_items = listJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();
return response.statusCode;
} catch(error) {
_loading = false;
_stateCode = -1;
notifyListeners();
return -1;
}
}
}

@ -0,0 +1,75 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class ServiceRequestDefectTypesProvider extends ChangeNotifier{
//reset provider data
void reset(){
_items = null;
_stateCode = null;
}
// state code of current request to defied error message
// like 400 customer request failed
// 500 service not available
int _stateCode;
int get stateCode => _stateCode;
// contain user data
// when user not login or register _user = null
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
// failed _loading = false
bool _loading;
bool get isLoading => _loading;
set isLoading(bool isLoading){
_loading = isLoading;
notifyListeners();
}
/// return -2 if request in progress
/// return -1 if error happen when sending request
/// return state code if request complete may be 200, 404 or 403
/// for more details check http state manager
/// lib\controllers\http_status_manger\http_status_manger.dart
Future<int> getData ({String host,User user}) async {
if(_loading == true)
return -2;
_loading = true;
notifyListeners();
Response response;
try{
response = await get(
Uri.parse(
host + URLs.getServiceReportDefectTypes),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List listJson = json.decode(utf8.decode(response.bodyBytes));
_items = listJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();
return response.statusCode;
} catch(error) {
_loading = false;
_stateCode = -1;
notifyListeners();
return -1;
}
}
}

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class ServiceReportLastCallsProvider extends ChangeNotifier{
@ -24,8 +24,8 @@ class ServiceReportLastCallsProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _calls;
List<Status> get calls => _calls;
List<Lookup> _calls;
List<Lookup> get calls => _calls;
// when categories in-process _loading = true
// done _loading = true
@ -59,7 +59,7 @@ class ServiceReportLastCallsProvider extends ChangeNotifier{
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_calls = categoriesListJson.map((type) => Status.fromServiceReportJson(type)).toList();
_calls = categoriesListJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();

@ -0,0 +1,74 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class ServiceRequestPriorityProvider extends ChangeNotifier{
//reset provider data
void reset(){
_items = null;
_stateCode = null;
}
// state code of current request to defied error message
// like 400 customer request failed
// 500 service not available
int _stateCode;
int get stateCode => _stateCode;
// contain user data
// when user not login or register _user = null
List<Lookup> _items;
List<Lookup> get items => _items;
// when categories in-process _loading = true
// done _loading = true
// failed _loading = false
bool _loading;
bool get isLoading => _loading;
set isLoading(bool isLoading){
_loading = isLoading;
notifyListeners();
}
/// return -2 if request in progress
/// return -1 if error happen when sending request
/// return state code if request complete may be 200, 404 or 403
/// for more details check http state manager
/// lib\controllers\http_status_manger\http_status_manger.dart
Future<int> getData ({String host,User user}) async {
if(_loading == true)
return -2;
_loading = true;
notifyListeners();
Response response;
try{
response = await get(
Uri.parse(
host + URLs.getServiceReportPriority),
);
_stateCode = response.statusCode;
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List listJson = json.decode(utf8.decode(response.bodyBytes));
_items = listJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();
return response.statusCode;
} catch(error) {
_loading = false;
_stateCode = -1;
notifyListeners();
return -1;
}
}
}

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class ServiceReportReasonsProvider extends ChangeNotifier{
@ -23,8 +23,8 @@ class ServiceReportReasonsProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _reasons;
List<Status> get reasons => _reasons;
List<Lookup> _reasons;
List<Lookup> get reasons => _reasons;
// when categories in-process _loading = true
// done _loading = true
@ -56,7 +56,7 @@ class ServiceReportReasonsProvider extends ChangeNotifier{
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_reasons = categoriesListJson.map((type) => Status.fromServiceReportJson(type)).toList();
_reasons = categoriesListJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class ServiceReportStatusProvider extends ChangeNotifier{
@ -23,8 +23,8 @@ class ServiceReportStatusProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _status;
List<Status> get statuses => _status;
List<Lookup> _status;
List<Lookup> get statuses => _status;
// when categories in-process _loading = true
// done _loading = true
@ -56,7 +56,7 @@ class ServiceReportStatusProvider extends ChangeNotifier{
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_status = categoriesListJson.map((type) => Status.fromServiceReportJson(type)).toList();
_status = categoriesListJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class ServiceReportTypesProvider extends ChangeNotifier{
@ -23,8 +23,8 @@ class ServiceReportTypesProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _types;
List<Status> get types => _types;
List<Lookup> _types;
List<Lookup> get types => _types;
// when categories in-process _loading = true
// done _loading = true
@ -57,7 +57,7 @@ class ServiceReportTypesProvider extends ChangeNotifier{
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_types = categoriesListJson.map((type) => Status.fromServiceReportJson(type)).toList();
_types = categoriesListJson.map((type) => Lookup.fromIntIdJson(type)).toList();
}
_loading = false;
notifyListeners();

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/user.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/user.dart';
class ServiceStatusProvider extends ChangeNotifier{
@ -23,8 +23,8 @@ class ServiceStatusProvider extends ChangeNotifier{
// contain user data
// when user not login or register _user = null
List<Status> _statuses;
List<Status> get statuses => _statuses;
List<Lookup> _statuses;
List<Lookup> get statuses => _statuses;
// when categories in-process _loading = true
// done _loading = true
@ -57,7 +57,7 @@ class ServiceStatusProvider extends ChangeNotifier{
if(response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received
List categoriesListJson = json.decode(utf8.decode(response.bodyBytes));
_statuses = categoriesListJson.map((e) => Status.fromServiceReportJson(e)).toList();
_statuses = categoriesListJson.map((e) => Lookup.fromIntIdJson(e)).toList();
}
_loading = false;

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:test_sa/views/app_style/colors.dart';
extension WidgetExtensions on Widget {
Widget onPress(VoidCallback onTap) => InkWell(onTap: onTap, child: this);

@ -1,3 +1,9 @@
import 'dart:io';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';
import 'package:test_sa/controllers/localization/localization.dart';
import 'package:test_sa/controllers/providers/api/departments_provider.dart';
import 'package:test_sa/controllers/providers/api/device_transfer_provider.dart';
@ -11,6 +17,10 @@ import 'package:test_sa/controllers/providers/api/status_drop_down/employee/empl
import 'package:test_sa/controllers/providers/api/status_drop_down/gas_refill/gas_cylinder_size_provider.dart';
import 'package:test_sa/controllers/providers/api/status_drop_down/gas_refill/gas_status_provider.dart';
import 'package:test_sa/controllers/providers/api/status_drop_down/gas_refill/gas_types_provider.dart';
import 'package:test_sa/controllers/providers/api/status_drop_down/pentry/pentry_task_status_provider.dart';
import 'package:test_sa/controllers/providers/api/status_drop_down/pentry/pentry_visit_status_provider.dart';
import 'package:test_sa/controllers/providers/api/status_drop_down/report/service_report_defect_types_provider.dart';
import 'package:test_sa/controllers/providers/api/status_drop_down/report/service_report_priority_provider.dart';
import 'package:test_sa/views/app_style/colors.dart';
import 'package:test_sa/views/pages/login.dart';
import 'package:test_sa/views/pages/register.dart';
@ -28,11 +38,10 @@ import 'package:test_sa/views/pages/user/visits/preventive_maintenance_visits_pa
import 'package:test_sa/views/pages/user/visits/regular_visits_page.dart';
import 'package:test_sa/views/widgets/departments/single_department_picker.dart';
import 'package:test_sa/views/widgets/equipment/single_device_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';
import 'controllers/providers/api/parts_provider.dart';
import 'controllers/providers/api/preventive_maintenance_visits_provider.dart';
import 'controllers/providers/api/status_drop_down/pentry/pentry_status_provider.dart';
import 'controllers/providers/api/status_drop_down/report/service_report_last_calls_provider.dart';
import 'controllers/providers/api/status_drop_down/report/service_report_reasons_provider.dart';
import 'controllers/providers/api/status_drop_down/report/service_report_status_provider.dart';
@ -44,7 +53,15 @@ import 'views/pages/device_transfer/request_device_transfer.dart';
import 'views/pages/device_transfer/track_device_transfer.dart';
import 'views/widgets/hospitals/single_hospital_picker.dart';
void main() {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
if (Platform.isIOS) {
await Firebase.initializeApp(
options: const FirebaseOptions(apiKey: "AIzaSyACQkSleNwU1jzEKR5ho1uSfZERokwwAbc", appId: "1:973582662416:ios:bc4a8061444c6a08fbc395", messagingSenderId: "973582662416", projectId: "atoms-fb912"),
);
} else {
await Firebase.initializeApp();
}
runApp(
ChangeNotifierProvider(
create: (_) => SettingProvider(),
@ -80,6 +97,11 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(create: (_) => GasRefillProvider()),
ChangeNotifierProvider(create: (_) => DeviceTransferProvider()),
ChangeNotifierProvider(create: (_) => EmployeesProvider()),
ChangeNotifierProvider(create: (_) => PentryTaskStatusProvider()),
ChangeNotifierProvider(create: (_) => PentryVisitStatusProvider()),
ChangeNotifierProvider(create: (_) => PentryStatusProvider()),
ChangeNotifierProvider(create: (_) => ServiceRequestPriorityProvider()),
ChangeNotifierProvider(create: (_) => ServiceRequestDefectTypesProvider()),
],
child: GestureDetector(
onTap: () {

@ -1,6 +1,7 @@
class Device{
String id;
String serialNumber;
String number;
String brand;
String model;
DateTime productionDate;
@ -13,6 +14,7 @@ class Device{
Device({
this.id,
this.serialNumber,
this.number,
this.brand,
this.model,
this.productionDate,
@ -27,6 +29,7 @@ class Device{
return Device(
id: parsedJson["nid"] ?? parsedJson["id"],
serialNumber: parsedJson["sn"] ?? parsedJson["value"],
number: parsedJson["asset_no"],
brand: parsedJson["brand"].toString(),
model: parsedJson["model"].toString(),
productionDate: getDateFromString(parsedJson["production_date"]),
@ -42,6 +45,7 @@ class Device{
return Device(
id: device.id,
serialNumber: device.serialNumber,
number: device.number,
brand: device.brand,
model: device.model,
productionDate: device.productionDate,

@ -1,9 +1,5 @@
import 'package:http/http.dart';
import 'package:test_sa/models/department.dart';
import 'package:test_sa/models/device/device.dart';
import 'package:test_sa/models/device/device_transfer_info.dart';
import 'package:test_sa/models/hospital.dart';
import 'package:test_sa/models/status.dart';
class DeviceTransfer{
String id;

@ -1,8 +1,6 @@
import 'package:http/http.dart';
import 'package:test_sa/models/department.dart';
import 'package:test_sa/models/device/device.dart';
import 'package:test_sa/models/hospital.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/lookup.dart';
class DeviceTransferInfo{
String userId;
@ -13,7 +11,7 @@ class DeviceTransferInfo{
String travelingHours;
String name;
String signature;
Status status;
Lookup status;
DeviceTransferInfo({
this.userId,
@ -67,7 +65,7 @@ class DeviceTransferInfo{
comment: parsedJson["${key}comment"],
client: Hospital.fromJson(parsedJson["${key}client"]),
department: Department.fromJson(parsedJson["${key}department"]),
status: Status.fromJson(parsedJson["${key}status"]),
status: Lookup.fromJson(parsedJson["${key}status"]),
);
}
}

@ -1,8 +1,8 @@
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/lookup.dart';
class GasRefillDetails{
Status type;
Status cylinderSize;
Lookup type;
Lookup cylinderSize;
int requestedQuantity;
int deliveredQuantity;
@ -21,9 +21,9 @@ class GasRefillDetails{
}
factory GasRefillDetails.fromJson(Map<String,dynamic> parsedJson){
return GasRefillDetails(
type: Status.fromJson(parsedJson["type"]),
type: Lookup.fromJson(parsedJson["type"]),
cylinderSize: Status.fromJson(parsedJson["size"]),
cylinderSize: Lookup.fromJson(parsedJson["size"]),
requestedQuantity: parsedJson["requsted_qty"] == null
? 0 : int.tryParse(parsedJson["requsted_qty"].toString()) ?? 0,
deliveredQuantity: parsedJson["deliverd_qty"] == null
@ -33,8 +33,8 @@ class GasRefillDetails{
factory GasRefillDetails.fromDetails(GasRefillDetails details){
return GasRefillDetails(
type: Status.fromStatus(details.type),
cylinderSize:Status.fromStatus(details.cylinderSize),
type: Lookup.fromStatus(details.type),
cylinderSize:Lookup.fromStatus(details.cylinderSize),
requestedQuantity: details.requestedQuantity,
deliveredQuantity: details.deliveredQuantity,
);

@ -1,12 +1,12 @@
import 'package:test_sa/models/gas_refill/gas_refill_details.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/lookup.dart';
class GasRefillModel{
String id;
String userId;
String clientName;
String title;
Status status;
Lookup status;
List<GasRefillDetails> details;
GasRefillModel({
@ -30,7 +30,7 @@ class GasRefillModel{
userId = model.userId;
clientName = model.clientName;
title = model.title;
status = Status.fromStatus(model.status);
status = Lookup.fromStatus(model.status);
details = model.details.map((e) => GasRefillDetails.fromDetails(e)).toList();
}
@ -45,7 +45,7 @@ class GasRefillModel{
userId: parsedJson["uid"],
title: parsedJson["title"],
clientName: parsedJson["client"],
status: Status.fromJson(parsedJson["status"]),
status: Lookup.fromJson(parsedJson["status"]),
details: details,
);
}

@ -1,10 +1,10 @@
class Status{
class Lookup{
final String label;
final String key;
final int id;
const Status({
const Lookup({
this.label,
this.key,
this.id,
@ -12,7 +12,7 @@ class Status{
@override
bool operator == (Object other) =>
identical(this, other) || other is Status &&
identical(this, other) || other is Lookup &&
key == other.key &&
id == other.id;
@ -20,26 +20,26 @@ class Status{
@override
int get hashCode => id.hashCode;
factory Status.fromStatus(Status old){
return Status(
factory Lookup.fromStatus(Lookup old){
return Lookup(
label: old.label,
id: old.id,
key: old.key,
);
}
factory Status.fromJson(Map<String,dynamic> parsedJson){
factory Lookup.fromJson(Map<String,dynamic> parsedJson){
if(parsedJson["id"] == null && parsedJson["uid"] == null) return null;
return Status(
return Lookup(
label: parsedJson["value"],
id: parsedJson["id"] is int
? parsedJson["id"]
: int.tryParse(parsedJson["id"] ?? parsedJson["uid"]),
? parsedJson["id"]
: int.tryParse(parsedJson["id"] ?? parsedJson["uid"]),
);
}
factory Status.fromServiceReportJson(Map<String,dynamic> parsedJson){
return Status(
factory Lookup.fromIntIdJson(Map<String,dynamic> parsedJson){
return Lookup(
label: parsedJson["value"],
id: parsedJson["id"],
);

@ -0,0 +1,26 @@
import 'package:test_sa/models/lookup.dart';
class CalibrationTool{
Lookup assetsNumber;
DateTime dataOfTesting;
CalibrationTool({
this.assetsNumber,
this.dataOfTesting,
});
Map<String, String> toMap() {
return {
if(assetsNumber != null) 'assetsSN': (assetsNumber?.id).toString(),
if(dataOfTesting != null) 'dataOfTesting': (dataOfTesting.millisecondsSinceEpoch ~/ 1000).toString(),
};
}
factory CalibrationTool.fromMap(Map<String, dynamic> map) {
return CalibrationTool(
assetsNumber: Lookup.fromJson(map['assetsSN']),
dataOfTesting: map['dataOfTesting'] == null || map['dataOfTesting'] == "" ? null :
DateTime.fromMillisecondsSinceEpoch(int.tryParse(map['dataOfTesting']) * 1000),
);
}
}

@ -0,0 +1,41 @@
import 'package:test_sa/models/lookup.dart';
class Contact{
Lookup title;
Lookup contactPerson;
String job;
String email;
String telephone;
String landLine;
Contact({
this.title,
this.contactPerson,
this.job,
this.email,
this.telephone,
this.landLine
});
Map<String, String> toMap() {
return {
if (title != null) 'title': title.id.toString(),
if (contactPerson != null) 'contactPerson': contactPerson.id.toString(),
if (job != null) 'job': job,
if (email != null) 'email': email,
if (telephone != null) 'telephone': telephone,
if (landLine != null) 'landLine': landLine,
};
}
factory Contact.fromMap(Map<String, dynamic> map) {
return Contact(
title: map['title'] as Lookup,
contactPerson: map['contactPerson'] as Lookup,
job: map['job'] as String,
email: map['email'] as String,
telephone: map['telephone'] as String,
landLine: map['landLine'] as String,
);
}
}

@ -0,0 +1,15 @@
import 'package:test_sa/models/lookup.dart';
class ContactTitle extends Lookup {
ContactTitle({
int id,
String label
}):super(id: id,label: label);
factory ContactTitle.fromMap(Map<String,dynamic> parsedJson){
return ContactTitle(
label: parsedJson["value"],
id: parsedJson["id"],
);
}
}

@ -0,0 +1,15 @@
import 'package:test_sa/models/lookup.dart';
class ContactTitle extends Lookup {
ContactTitle({
int id,
String label
}):super(id: id,label: label);
factory ContactTitle.fromMap(Map<String,dynamic> parsedJson){
return ContactTitle(
label: parsedJson["value"],
id: parsedJson["id"],
);
}
}

@ -0,0 +1,120 @@
import 'dart:convert';
import 'dart:io';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/pantry/calibration_tools.dart';
import 'package:test_sa/models/pantry/pm_kit.dart';
import 'package:test_sa/models/pantry/ppm_check_list.dart';
import 'package:test_sa/models/timer_model.dart';
class Pentry{
Lookup ppmVisitStatus;
Lookup status;
TimerModel timer;
DateTime actualVisitDate;
String travelingHours;
String image;
File imageFile;
// List<Contact> contacts;
List<PPMCheckList> ppmCheckLists;
List<CalibrationTool> calibrationTools;
List<PMKit> pmKits;
Pentry({
this.travelingHours,
this.timer,
this.status,
this.ppmVisitStatus,
this.actualVisitDate,
this.image,
this.imageFile,
// this.contacts,
this.ppmCheckLists,
this.calibrationTools,
this.pmKits,
});
bool validate(){
if(actualVisitDate == null) return false;
if(timer == null && timer.endAt != null) return false;
if(ppmVisitStatus == null) return false;
//if(status == null) return false;
return true;
}
Map<String, String> toMap() {
Map<String, String> map = {};
map["visit_status"] = ppmVisitStatus?.id.toString();
if(status != null) map["pentry_status"] = status?.id.toString();
if(travelingHours != null) map["traveling_hours"] = travelingHours;
if(imageFile != null) map["file_attachement"] = base64Encode(imageFile.readAsBytesSync());
map["actual_date"] = (actualVisitDate.millisecondsSinceEpoch / 1000).toStringAsFixed(0);
if(timer != null){
map["start_date"] = (timer.startAt.millisecondsSinceEpoch / 1000).toStringAsFixed(0);
map["end_date"] = ((timer.endAt ?? DateTime.now()).millisecondsSinceEpoch / 1000).toStringAsFixed(0);
map["working_hours"] = (timer.durationInSecond / 60 / 60).toStringAsFixed(5);
}
// if(contacts?.isNotEmpty == true) {
// for(int i = 0;i<contacts.length;i++){
// contacts[i].toMap().forEach((key, value) {
// body["contacts[$i].$key"] = value;
// });
// }
// }
map["ppmCheckLists"] = jsonEncode(ppmCheckLists.map((e) => e.toMap()).toList());
map["calibrationTools"] = jsonEncode(calibrationTools.map((e) => e.toMap()).toList());
map["pmKits"] = jsonEncode(pmKits.map((e) => e.toMap()).toList());
return map;
}
factory Pentry.fromMap(Map<String, dynamic> map) {
// List<Contact> contacts = [];
// if(map['contacts'] != null){
// contacts =(map['contacts'] as List<dynamic>)
// .map((e) => Contact.fromMap(e as Map<String, dynamic>))
// .toList();
// }
List<PMKit> pmKits = [];
if(map['pmKits'] != null){
pmKits =(map['pmKits'] as List<dynamic>)
.map((e) => PMKit.fromMap(e as Map<String, dynamic>))
.toList();
}
List<PPMCheckList> ppmCheckLists = [];
if(map['ppmCheckLists'] != null){
ppmCheckLists =(map['ppmCheckLists'] as List<dynamic>)
.map((e) => PPMCheckList.fromMap(e as Map<String, dynamic>))
.toList();
}
List<CalibrationTool> calibrationTools = [];
if(map['calibrationTools'] != null){
calibrationTools =(map['calibrationTools'] as List<dynamic>)
.map((e) => CalibrationTool.fromMap(e as Map<String, dynamic>))
.toList();
}
return Pentry(
status: Lookup.fromJson(map["pentry_status"]),
ppmVisitStatus: Lookup.fromJson(map["visit_status"]),
actualVisitDate: getDate(map["actual_date"]),
travelingHours: map["traveling_hours"],
timer: TimerModel(
startAt: getDate(map["start_date"]),
endAt: getDate(map["end_date"]),
durationInSecond: (int.tryParse(map["working_hours"] ?? "") ?? 0) * 60 *60
),
// contacts: contacts,
ppmCheckLists: ppmCheckLists,
calibrationTools: calibrationTools,
pmKits: pmKits,
);
}
static getDate(String date){
return date == null || date.isEmpty
? null : DateTime.fromMillisecondsSinceEpoch(int.tryParse(date) * 1000);
}
}

@ -0,0 +1,45 @@
import 'package:test_sa/models/lookup.dart';
class PMKit{
Lookup itemCode;
String itemName;
String preparationTimeFrame;
String kitFrequencyDemand;
String availability;
String quantityNeeded;
String quantityReserved;
PMKit({
this.itemCode,
this.itemName,
this.preparationTimeFrame,
this.kitFrequencyDemand,
this.availability,
this.quantityNeeded,
this.quantityReserved
});
Map<String, String> toMap() {
return {
if(itemCode != null) 'itemCode': (itemCode?.id).toString(),
if(itemName != null) 'itemName': itemName,
if(preparationTimeFrame != null) 'preparationTimeFrame': preparationTimeFrame,
if(kitFrequencyDemand != null) 'kitFrequencyDemand': kitFrequencyDemand,
if(availability != null) 'availability': availability,
if(quantityNeeded != null) 'quantityNeeded': quantityNeeded,
if(quantityReserved != null) 'quantityReserved': quantityReserved,
};
}
factory PMKit.fromMap(Map<String, dynamic> map) {
return PMKit(
itemCode: Lookup.fromJson(map['itemCode']),
itemName: map['itemName'] as String,
preparationTimeFrame: map['preparationTimeFrame'] as String,
kitFrequencyDemand: map['kitFrequencyDemand'] as String,
availability: map['availability'] as String,
quantityNeeded: map['quantityNeeded'] as String,
quantityReserved: map['quantityReserved'] as String,
);
}
}

@ -0,0 +1,33 @@
import 'package:test_sa/models/lookup.dart';
class PPMCheckList{
Lookup status;
String title;
String comment;
String measuredValue;
PPMCheckList({
this.title,
this.status,
this.comment,
this.measuredValue,
});
Map<String, String> toMap() {
return {
if(status != null) 'status': status?.id.toString(),
if(title != null) 'title': title,
if(comment != null) 'comment': comment,
if(measuredValue != null) 'measuredValue': measuredValue,
};
}
factory PPMCheckList.fromMap(Map<String, dynamic> map) {
return PPMCheckList(
status: Lookup.fromJson(map['status']),
title: map['title'] as String,
comment: map['comment'] as String,
measuredValue: map['measuredValue'] as String,
);
}
}

@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:test_sa/models/device/device.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/part.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/timer_model.dart';
class ServiceReport {
@ -10,11 +10,11 @@ class ServiceReport {
String operatingHours;
DateTime visitDate;
DateTime endDate;
Status serviceType;
Status callLastSituation;
Status status;
Status type;
Status reason;
Lookup serviceType;
Lookup callLastSituation;
Lookup status;
Lookup type;
Lookup reason;
String faultDescription;
String workPreformed;
//String workHours;
@ -90,7 +90,6 @@ class ServiceReport {
}
bool validate(){
if(visitDate == null) return false;
if(serviceType == null) return false;
if(status == null) return false;
@ -120,11 +119,11 @@ class ServiceReport {
}
return ServiceReport(
id: id,
serviceType: Status.fromJson(parsedJson["service_type"]),
callLastSituation: Status.fromJson(parsedJson["call_last_situtation"]),
reason: Status.fromJson(parsedJson["reasons"]),
status: Status.fromJson(parsedJson["service_report_status"]),
type: Status.fromJson(parsedJson["service_report_type"]),
serviceType: Lookup.fromJson(parsedJson["service_type"]),
callLastSituation: Lookup.fromJson(parsedJson["call_last_situtation"]),
reason: Lookup.fromJson(parsedJson["reasons"]),
status: Lookup.fromJson(parsedJson["service_report_status"]),
type: Lookup.fromJson(parsedJson["service_report_type"]),
faultDescription: parsedJson["fault_description"],
endDate:getDate(parsedJson["end_date"]),
invoiceCode: parsedJson["invoice_code"],

@ -1,4 +1,4 @@
import '../timer_model.dart';
import 'package:test_sa/models/lookup.dart';
class ServiceRequest{
String id;
@ -27,6 +27,9 @@ class ServiceRequest{
DateTime nextVisitDate;
String jobSheetNumber;
String reportID;
String deviceNumber;
Lookup priority;
Lookup defectType;
ServiceRequest({
this.id,
@ -55,6 +58,9 @@ class ServiceRequest{
this.nextVisitDate,
this.workPerformed,
this.reportID,
this.defectType,
this.priority,
this.deviceNumber,
});
@ -63,6 +69,7 @@ class ServiceRequest{
id: parsedJson["nid"],
requestCode: parsedJson["call_id"] ?? parsedJson["jobcode"] ,
hospitalName: parsedJson["call_client"],
deviceNumber: parsedJson["device_no"],
deviceId: parsedJson["deviceid"],
audio: parsedJson["audio"] ?? "",
deviceArName: parsedJson["equipment_arabic_name"] == false

@ -3,13 +3,12 @@ import 'package:test_sa/models/department.dart';
import 'package:test_sa/models/enums/user_types.dart';
import 'package:test_sa/models/hospital.dart';
class User{
class User {
String id;
String userName;
String password;
String email;
String image;
String hospitalID;
Hospital hospital;
Department department;
UsersTypes type;
@ -18,103 +17,95 @@ class User{
String token;
bool isActive;
User({
this.id,
this.userName = "",
this.email = "",
this.password = "",
this.phoneNumber = "",
this.hospital,
this.image,
this.department,
this.type,
this.whatsApp,
this.token,
this.isActive = false
});
User(
{this.id,
this.userName = "",
this.email = "",
this.password = "",
this.phoneNumber = "",
this.hospital,
this.image,
this.department,
this.type,
this.whatsApp,
this.token,
this.isActive = false});
Future<Map<String, dynamic>> toLoginJson() async {
if(FirebaseNotificationManger.token == null)
await FirebaseNotificationManger.getToken();
if (FirebaseNotificationManger.token == null) await FirebaseNotificationManger.getToken();
return {
"username":userName,
"pass":password,
"username": userName,
"pass": password,
"firebase_token": FirebaseNotificationManger?.token ?? "",
};
}
Map<String,dynamic> toUpdateProfileJson(){
Map<String,dynamic> jsonObject ={};
if(department?.id != null && department.id.isNotEmpty)
jsonObject["department"] = department.id;
if(whatsApp != null && whatsApp.isNotEmpty)
jsonObject["whatsapp"] = whatsApp;
if(phoneNumber != null && phoneNumber.isNotEmpty)
jsonObject["phone"] = phoneNumber;
Map<String, dynamic> toUpdateProfileJson() {
Map<String, dynamic> jsonObject = {};
if (department?.id != null && department.id.isNotEmpty) jsonObject["department"] = department.id;
if (whatsApp != null && whatsApp.isNotEmpty) jsonObject["whatsapp"] = whatsApp;
if (phoneNumber != null && phoneNumber.isNotEmpty) jsonObject["phone"] = phoneNumber;
return jsonObject;
}
Future<Map<String, dynamic>> toRegisterJson() async {
if(FirebaseNotificationManger.token == null)
await FirebaseNotificationManger.getToken();
if (FirebaseNotificationManger.token == null) await FirebaseNotificationManger.getToken();
return {
"username": userName,
"email":email,
"whatsapp":whatsApp,
"client":hospital.id,
"department":department?.id,
"phone":phoneNumber,
"pass":password,
"email": email,
"whatsapp": whatsApp,
"client": hospital.id,
"department": department?.id,
"phone": phoneNumber,
"pass": password,
"firebase_token": FirebaseNotificationManger?.token ?? "",
};
}
Map<String,dynamic> toJson(){
Map<String, dynamic> toJson() {
return {
"uid":id,
"uid": id,
"name": userName,
"email":email,
"token":token,
"phone":phoneNumber,
"whatsapp":whatsApp,
"client":hospital?.id,
"client_name":hospital?.name,
"department":department?.id,
"department_name":department?.name,
"password":password,
"picture":image,
"active":isActive ? 1 : 0,
"role": type == UsersTypes.engineer
? "field_engineer" : "normal_user" ,
// "token":token, pass is token
"email": email,
"token": token,
"phone": phoneNumber,
"whatsapp": whatsApp,
"client": hospital?.id,
"client_name": hospital?.name,
"department": department?.id,
"department_name": department?.name,
"password": password,
"picture": image,
"active": isActive ? 1 : 0,
"role": type == UsersTypes.engineer ? "field_engineer" : "normal_user",
// "token":token, pass is token
};
}
factory User.fromJson(Map<String,dynamic> parsedJson){
factory User.fromJson(Map<String, dynamic> parsedJson) {
UsersTypes type;
switch(parsedJson["role"]){
case "field_engineer": type = UsersTypes.engineer; break;
default: type = UsersTypes.normal_user; break;
switch (parsedJson["role"]) {
case "field_engineer":
type = UsersTypes.engineer;
break;
default:
type = UsersTypes.normal_user;
break;
}
return User(
id: parsedJson["uid"],
userName: parsedJson["name"] ?? parsedJson["title"],
email: parsedJson["mail"] ?? parsedJson["email"],
hospital: Hospital(
id: parsedJson["client"],
name: parsedJson["client_name"]
),
department: Department(
id: parsedJson["department"],
name: parsedJson["department_name"],
),
image: parsedJson["picture"],
phoneNumber: parsedJson["phone"],
whatsApp: parsedJson["whatsapp"],
token: parsedJson["token"],
isActive: parsedJson["active"] == "1",
type:type
);
id: parsedJson["uid"],
userName: parsedJson["name"] ?? parsedJson["title"],
email: parsedJson["mail"] ?? parsedJson["email"],
hospital: Hospital(id: parsedJson["client"], name: parsedJson["client_name"]),
department: Department(
id: parsedJson["department"],
name: parsedJson["department_name"],
),
image: parsedJson["picture"],
phoneNumber: parsedJson["phone"],
whatsApp: parsedJson["whatsapp"],
token: parsedJson["token"],
isActive: parsedJson["active"] == "1",
type: type);
}
}
}

@ -1,5 +1,4 @@
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/timer_model.dart';
import 'package:test_sa/models/lookup.dart';
class Visit{
String id;
@ -16,8 +15,9 @@ class Visit{
String employName;
String modelAndBrand;
String contactStatus;
Status status;
Lookup status;
String assignTo;
String deviceNumber;
List<String> images;
Visit({
@ -38,6 +38,7 @@ class Visit{
this.contactStatus,
this.images,
this.assignTo,
this.deviceNumber,
});
factory Visit.fromJson(Map<String,dynamic> parsedJson){
@ -45,6 +46,7 @@ class Visit{
id: parsedJson["nid"],
serialNumber: parsedJson["title"],
hospitalId: parsedJson["client"],
deviceNumber: parsedJson["device_no"],
hospitalName: parsedJson["client_name"],
deviceId: parsedJson["medical_equipment_nid"],
deviceSerialNumber: parsedJson["medical_equipment"],
@ -57,7 +59,7 @@ class Visit{
modelAndBrand: parsedJson["mode_brand"],
contactStatus: parsedJson["contactStatus"],
images: List<String>.from(parsedJson["images"] ?? []),
status: Status(
status: Lookup(
id: int.tryParse(parsedJson["status"] ?? "-1"), // actual value (0,1,2)
label: parsedJson["status_value"] // text value
),

@ -1,5 +1,5 @@
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/visits/visit.dart';
class VisitsGroup{
@ -8,8 +8,8 @@ class VisitsGroup{
String travelingHours;
String jobSheetNumber;
String image;
Status status;
Status taskStatus;
Lookup status;
Lookup taskStatus;
DateTime date;
List<Visit> visits;

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:test_sa/models/status.dart';
import 'package:test_sa/models/lookup.dart';
class AColors {
AColors._();
static const Color white = Color(0xffffffff);

@ -15,7 +15,6 @@ import 'package:test_sa/views/widgets/buttons/app_small_button.dart';
import 'package:test_sa/views/widgets/device_trancfer/device_transfer_info_section.dart';
import 'package:test_sa/views/widgets/loaders/loading_manager.dart';
import 'package:test_sa/views/widgets/requests/info_row.dart';
import 'package:test_sa/views/widgets/requests/request_status.dart';
class DeviceTransferDetails extends StatefulWidget {
final DeviceTransfer model;
@ -51,7 +50,6 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
_userProvider = Provider.of<UserProvider>(context);
_settingProvider = Provider.of<SettingProvider>(context);
_deviceTransferProvider = Provider.of<DeviceTransferProvider>(context);
print(_userProvider.user.id);
_isSender = _userProvider.user.id == widget.model.sender?.userId;
_isReceiver = _userProvider.user.id == widget.model.receiver?.userId;
return Scaffold(

@ -12,7 +12,6 @@ import 'package:test_sa/models/subtitle.dart';
import 'package:test_sa/views/app_style/sizing.dart';
import 'package:test_sa/views/widgets/buttons/app_button.dart';
import 'package:test_sa/views/widgets/departments/department_button.dart';
import 'package:test_sa/views/widgets/e_signature/e_signature.dart';
import 'package:test_sa/views/widgets/equipment/device_button.dart';
import 'package:test_sa/views/widgets/hospitals/hospital_button.dart';
import 'package:test_sa/views/widgets/loaders/loading_manager.dart';

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save