Merge branch 'sikander-development' into 'main'
Sikander development See merge request haroon6138/cloudsolutions-atoms!1merge-requests/2/merge
@ -0,0 +1,4 @@
|
||||
storePassword=Cloud@AtomsSA
|
||||
keyPassword=Cloud@AtomsSA
|
||||
keyAlias=playstore
|
||||
storeFile=/Users/sikandersaleem/StudioProjects/cloudsolutions-atoms/android/AtomsSA-playStore.jks
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 278 KiB |
|
After Width: | Height: | Size: 704 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 68 B |
|
After Width: | Height: | Size: 68 B |
|
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"
|
||||
@ -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,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>
|
||||
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||