Merge branch 'ios_issues' into 'master'

fix ios issues

See merge request Cloud_Solution/diplomatic-quarter!70
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit d90a28aecf

@ -1,87 +0,0 @@
# Uncomment this line to define a global platform for your project
platform :ios, '9.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 parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end

@ -1,310 +0,0 @@
PODS:
- barcode_scan (0.0.1):
- Flutter
- MTBBarcodeScanner
- SwiftProtobuf
- connectivity (0.0.1):
- Flutter
- Reachability
- connectivity_for_web (0.1.0):
- Flutter
- connectivity_macos (0.0.1):
- Flutter
- device_info (0.0.1):
- Flutter
- Firebase/Core (6.23.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.4.2)
- Firebase/CoreOnly (6.23.0):
- FirebaseCore (= 6.6.7)
- Firebase/Messaging (6.23.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.3.1)
- firebase_messaging (0.0.1):
- Firebase/Core
- Firebase/Messaging
- Flutter
- FirebaseAnalytics (6.4.2):
- FirebaseCore (~> 6.6)
- FirebaseInstallations (~> 1.2)
- GoogleAppMeasurement (= 6.4.2)
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (= 0.3.9011)
- FirebaseAnalyticsInterop (1.5.0)
- FirebaseCore (6.6.7):
- FirebaseCoreDiagnostics (~> 1.2)
- FirebaseCoreDiagnosticsInterop (~> 1.2)
- GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/Logger (~> 6.5)
- FirebaseCoreDiagnostics (1.2.4):
- FirebaseCoreDiagnosticsInterop (~> 1.2)
- GoogleDataTransportCCTSupport (~> 3.0)
- GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/Logger (~> 6.5)
- nanopb (~> 0.3.901)
- FirebaseCoreDiagnosticsInterop (1.2.0)
- FirebaseInstallations (1.2.0):
- FirebaseCore (~> 6.6)
- GoogleUtilities/Environment (~> 6.6)
- GoogleUtilities/UserDefaults (~> 6.6)
- PromisesObjC (~> 1.2)
- FirebaseInstanceID (4.3.4):
- FirebaseCore (~> 6.6)
- FirebaseInstallations (~> 1.0)
- GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/UserDefaults (~> 6.5)
- FirebaseMessaging (4.3.1):
- FirebaseAnalyticsInterop (~> 1.5)
- FirebaseCore (~> 6.6)
- FirebaseInstanceID (~> 4.3)
- GoogleUtilities/AppDelegateSwizzler (~> 6.5)
- GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/Reachability (~> 6.5)
- GoogleUtilities/UserDefaults (~> 6.5)
- Protobuf (>= 3.9.2, ~> 3.9)
- Flutter (1.0.0)
- flutter_flexible_toast (0.0.1):
- Flutter
- flutter_inappwebview (0.0.1):
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
- Flutter
- GoogleAppMeasurement (6.4.2):
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (= 0.3.9011)
- GoogleDataTransport (6.0.0)
- GoogleDataTransportCCTSupport (3.0.0):
- GoogleDataTransport (~> 6.0)
- nanopb (~> 0.3.901)
- GoogleUtilities/AppDelegateSwizzler (6.6.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (6.6.0):
- PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (6.6.0):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.6.0):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.6.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (6.6.0)"
- GoogleUtilities/Reachability (6.6.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.6.0):
- GoogleUtilities/Logger
- hexcolor (0.0.1):
- Flutter
- image_cropper (0.0.2):
- Flutter
- TOCropViewController (~> 2.5.2)
- image_picker (0.0.1):
- Flutter
- local_auth (0.0.1):
- Flutter
- manage_calendar_events (0.0.1):
- Flutter
- map_launcher (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11)
- nanopb (0.3.9011):
- nanopb/decode (= 0.3.9011)
- nanopb/encode (= 0.3.9011)
- nanopb/decode (0.3.9011)
- nanopb/encode (0.3.9011)
- path_provider_linux (0.0.1):
- Flutter
- "permission_handler (5.0.1+1)":
- Flutter
- PromisesObjC (1.2.8)
- Protobuf (3.11.4)
- Reachability (3.2)
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_linux (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
- Flutter
- shared_preferences_web (0.0.1):
- Flutter
- SwiftProtobuf (1.10.2)
- TOCropViewController (2.5.4)
- url_launcher (0.0.1):
- Flutter
- url_launcher_linux (0.0.1):
- Flutter
- url_launcher_macos (0.0.1):
- Flutter
- url_launcher_web (0.0.1):
- Flutter
DEPENDENCIES:
- barcode_scan (from `.symlinks/plugins/barcode_scan/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- hexcolor (from `.symlinks/plugins/hexcolor/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`)
- manage_calendar_events (from `.symlinks/plugins/manage_calendar_events/ios`)
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
SPEC REPOS:
trunk:
- Firebase
- FirebaseAnalytics
- FirebaseAnalyticsInterop
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseCoreDiagnosticsInterop
- FirebaseInstallations
- FirebaseInstanceID
- FirebaseMessaging
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleDataTransportCCTSupport
- GoogleUtilities
- MTBBarcodeScanner
- nanopb
- PromisesObjC
- Protobuf
- Reachability
- SwiftProtobuf
- TOCropViewController
EXTERNAL SOURCES:
barcode_scan:
:path: ".symlinks/plugins/barcode_scan/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_for_web:
:path: ".symlinks/plugins/connectivity_for_web/ios"
connectivity_macos:
:path: ".symlinks/plugins/connectivity_macos/ios"
device_info:
:path: ".symlinks/plugins/device_info/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
Flutter:
:path: Flutter
flutter_flexible_toast:
:path: ".symlinks/plugins/flutter_flexible_toast/ios"
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_plugin_android_lifecycle:
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
hexcolor:
:path: ".symlinks/plugins/hexcolor/ios"
image_cropper:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
local_auth:
:path: ".symlinks/plugins/local_auth/ios"
manage_calendar_events:
:path: ".symlinks/plugins/manage_calendar_events/ios"
map_launcher:
:path: ".symlinks/plugins/map_launcher/ios"
path_provider_linux:
:path: ".symlinks/plugins/path_provider_linux/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_linux:
:path: ".symlinks/plugins/shared_preferences_linux/ios"
shared_preferences_macos:
:path: ".symlinks/plugins/shared_preferences_macos/ios"
shared_preferences_web:
:path: ".symlinks/plugins/shared_preferences_web/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
url_launcher_linux:
:path: ".symlinks/plugins/url_launcher_linux/ios"
url_launcher_macos:
:path: ".symlinks/plugins/url_launcher_macos/ios"
url_launcher_web:
:path: ".symlinks/plugins/url_launcher_web/ios"
SPEC CHECKSUMS:
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Firebase: 585ae467b3edda6a5444e788fda6888f024d8d6f
firebase_messaging: 21344b3b3a7d9d325d63a70e3750c0c798fe1e03
FirebaseAnalytics: 558f7a03d19de451093032c806f39d5f9dff096e
FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae
FirebaseCore: a2788a0d5f6c1dff17b8f79b4a73654a8d4bfdbd
FirebaseCoreDiagnostics: b59c024493a409f8aecba02c99928d0d8431d159
FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
FirebaseInstallations: 2119fb3e46b0a88bfdbf12562f855ee3252462fa
FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b
FirebaseMessaging: 828e66eb357a893e3cebd9ee0f6bc1941447cc94
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
flutter_inappwebview: 69dfbac46157b336ffbec19ca6dfd4638c7bf189
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
GoogleAppMeasurement: 2253e99c1f22638cf234c059144660c338ad76c3
GoogleDataTransport: 061fe7d9b476710e3cd8ea51e8e07d8b67c2b420
GoogleDataTransportCCTSupport: 0f39025e8cf51f168711bd3fb773938d7e62ddb5
GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1
hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
manage_calendar_events: 0338d505ea26cdfd20cd883279bc28afa11eca34
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
SwiftProtobuf: bec1ae7d686ff73dd09d79866154f4970b891410
TOCropViewController: 2a1ae1242600b1f2d996fd91a5268b2309a33b5c
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
PODFILE CHECKSUM: 2609452b760cd11039b14039a86564367a3d8ab9
COCOAPODS: 1.9.1

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>

@ -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>IDEDidComputeMac32BitWarning</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>PreviewsEnabled</key>
<false/>
</dict>
</plist>

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -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>IDEDidComputeMac32BitWarning</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>PreviewsEnabled</key>
<false/>
</dict>
</plist>

@ -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)
}
}

@ -22,12 +22,20 @@
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSCalendarsUsageDescription</key>
<string>We Need to access the calender to add reminder for you</string>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
<string>Main</string> <string>Main</string>
<key>NSMicrophoneUsageDescription</key>
<string>Need microphone access for uploading videos</string>
<key>NSCameraUsageDescription</key>
<string>Need camera access for uploading images</string>
<key>NSLocationUsageDescription</key>
<string>Need location access for updating nearby friends</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app will use your location to show cool stuffs near you.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need photo library access for uploading images</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>

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

@ -235,7 +235,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
return children; return children;
}, },
), ),
onDaySelected: (date, events) { onDaySelected: (date, events,holidays) {
_onDaySelected(date, events); _onDaySelected(date, events);
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },

@ -348,7 +348,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
return children; return children;
}, },
), ),
onDaySelected: (date, events) { onDaySelected: (date, events,holidays) {
_onDaySelected(date, events); _onDaySelected(date, events);
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },

@ -1,388 +1,388 @@
import 'dart:async'; // import 'dart:async';
//
import 'package:diplomaticquarterapp/models/LiveCare/room_model.dart'; // import 'package:diplomaticquarterapp/models/LiveCare/room_model.dart';
import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart'; // import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart';
import 'package:diplomaticquarterapp/pages/conference/conference_room.dart'; // import 'package:diplomaticquarterapp/pages/conference/conference_room.dart';
import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart'; // import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart';
import 'package:diplomaticquarterapp/pages/conference/participant_widget.dart'; // import 'package:diplomaticquarterapp/pages/conference/participant_widget.dart';
import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart'; // import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart';
import 'package:diplomaticquarterapp/pages/conference/widgets/platform_alert_dialog.dart'; // import 'package:diplomaticquarterapp/pages/conference/widgets/platform_alert_dialog.dart';
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; // import 'package:flutter/services.dart';
import 'package:wakelock/wakelock.dart'; // import 'package:wakelock/wakelock.dart';
//
class ConferencePage extends StatefulWidget { // class ConferencePage extends StatefulWidget {
final RoomModel roomModel; // final RoomModel roomModel;
//
const ConferencePage({Key key, this.roomModel}) : super(key: key); // const ConferencePage({Key key, this.roomModel}) : super(key: key);
//
@override // @override
_ConferencePageState createState() => _ConferencePageState(); // _ConferencePageState createState() => _ConferencePageState();
} // }
//
class _ConferencePageState extends State<ConferencePage> { // class _ConferencePageState extends State<ConferencePage> {
final StreamController<bool> _onButtonBarVisibleStreamController = StreamController<bool>.broadcast(); // final StreamController<bool> _onButtonBarVisibleStreamController = StreamController<bool>.broadcast();
final StreamController<double> _onButtonBarHeightStreamController = StreamController<double>.broadcast(); // final StreamController<double> _onButtonBarHeightStreamController = StreamController<double>.broadcast();
ConferenceRoom _conferenceRoom; // ConferenceRoom _conferenceRoom;
StreamSubscription _onConferenceRoomException; // StreamSubscription _onConferenceRoomException;
//
@override // @override
void initState() { // void initState() {
super.initState(); // super.initState();
_lockInPortrait(); // _lockInPortrait();
_connectToRoom(); // // _connectToRoom();
_wakeLock(true); // _wakeLock(true);
} // }
//
void _connectToRoom() async { // // void _connectToRoom() async {
try { // // try {
final conferenceRoom = ConferenceRoom( // // final conferenceRoom = ConferenceRoom(
name: widget.roomModel.name, // // name: widget.roomModel.name,
token: widget.roomModel.token, // // token: widget.roomModel.token,
identity: widget.roomModel.identity, // // identity: widget.roomModel.identity,
); // // );
await conferenceRoom.connect(); // // await conferenceRoom.connect();
setState(() { // // setState(() {
_conferenceRoom = conferenceRoom; // // _conferenceRoom = conferenceRoom;
_onConferenceRoomException = _conferenceRoom.onException.listen((err) async { // // _onConferenceRoomException = _conferenceRoom.onException.listen((err) async {
await PlatformAlertDialog( // // await PlatformAlertDialog(
title: err is PlatformException ? err.message : 'An error occured', // // title: err is PlatformException ? err.message : 'An error occured',
content: err is PlatformException ? err.details : err.toString(), // // content: err is PlatformException ? err.details : err.toString(),
defaultActionText: 'OK', // // defaultActionText: 'OK',
).show(context); // // ).show(context);
}); // // });
_conferenceRoom.addListener(_conferenceRoomUpdated); // // _conferenceRoom.addListener(_conferenceRoomUpdated);
}); // // });
} catch (err) { // // } catch (err) {
print(err); // // print(err);
await PlatformAlertDialog( // // await PlatformAlertDialog(
title: err is PlatformException ? err.message : 'An error occured', // // title: err is PlatformException ? err.message : 'An error occured',
content: err is PlatformException ? err.details : err.toString(), // // content: err is PlatformException ? err.details : err.toString(),
defaultActionText: 'OK', // // defaultActionText: 'OK',
).show(context); // // ).show(context);
// //
Navigator.of(context).pop(); // // Navigator.of(context).pop();
} // // }
} // // }
//
Future<void> _lockInPortrait() async { // Future<void> _lockInPortrait() async {
await SystemChrome.setPreferredOrientations(<DeviceOrientation>[ // await SystemChrome.setPreferredOrientations(<DeviceOrientation>[
DeviceOrientation.portraitUp, // DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown, // DeviceOrientation.portraitDown,
]); // ]);
} // }
//
@override // @override
void dispose() { // void dispose() {
_freePortraitLock(); // _freePortraitLock();
_wakeLock(false); // _wakeLock(false);
_disposeStreamsAndSubscriptions(); // _disposeStreamsAndSubscriptions();
if (_conferenceRoom != null) _conferenceRoom.removeListener(_conferenceRoomUpdated); // if (_conferenceRoom != null) _conferenceRoom.removeListener(_conferenceRoomUpdated);
super.dispose(); // super.dispose();
} // }
//
Future<void> _freePortraitLock() async { // Future<void> _freePortraitLock() async {
await SystemChrome.setPreferredOrientations(<DeviceOrientation>[ // await SystemChrome.setPreferredOrientations(<DeviceOrientation>[
DeviceOrientation.landscapeRight, // DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft, // DeviceOrientation.landscapeLeft,
DeviceOrientation.portraitUp, // DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown, // DeviceOrientation.portraitDown,
]); // ]);
} // }
//
Future<void> _disposeStreamsAndSubscriptions() async { // Future<void> _disposeStreamsAndSubscriptions() async {
if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close(); // if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close();
if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close(); // if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close();
if (_onConferenceRoomException != null) await _onConferenceRoomException.cancel(); // if (_onConferenceRoomException != null) await _onConferenceRoomException.cancel();
} // }
//
@override // @override
Widget build(BuildContext context) { // Widget build(BuildContext context) {
return WillPopScope( // return WillPopScope(
onWillPop: () async => false, // onWillPop: () async => false,
child: Scaffold( // child: Scaffold(
backgroundColor: Colors.black, // backgroundColor: Colors.black,
body: _conferenceRoom == null ? showProgress() : buildLayout(), // body: _conferenceRoom == null ? showProgress() : buildLayout(),
), // ),
); // );
} // }
//
LayoutBuilder buildLayout() { // LayoutBuilder buildLayout() {
return LayoutBuilder( // return LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) { // builder: (BuildContext context, BoxConstraints constraints) {
return Stack( // return Stack(
children: <Widget>[ // children: <Widget>[
_buildParticipants(context, constraints.biggest, _conferenceRoom), // _buildParticipants(context, constraints.biggest, _conferenceRoom),
ConferenceButtonBar( // ConferenceButtonBar(
audioEnabled: _conferenceRoom.onAudioEnabled, // audioEnabled: _conferenceRoom.onAudioEnabled,
videoEnabled: _conferenceRoom.onVideoEnabled, // videoEnabled: _conferenceRoom.onVideoEnabled,
onAudioEnabled: _conferenceRoom.toggleAudioEnabled, // onAudioEnabled: _conferenceRoom.toggleAudioEnabled,
onVideoEnabled: _conferenceRoom.toggleVideoEnabled, // onVideoEnabled: _conferenceRoom.toggleVideoEnabled,
onHangup: _onHangup, // onHangup: _onHangup,
onSwitchCamera: _conferenceRoom.switchCamera, // onSwitchCamera: _conferenceRoom.switchCamera,
onPersonAdd: _onPersonAdd, // onPersonAdd: _onPersonAdd,
onPersonRemove: _onPersonRemove, // onPersonRemove: _onPersonRemove,
onHeight: _onHeightBar, // onHeight: _onHeightBar,
onShow: _onShowBar, // onShow: _onShowBar,
onHide: _onHideBar, // onHide: _onHideBar,
), // ),
], // ],
); // );
}, // },
); // );
} // }
//
Widget showProgress() { // Widget showProgress() {
return Column( // return Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
Center(child: CircularProgressIndicator()), // Center(child: CircularProgressIndicator()),
SizedBox( // SizedBox(
height: 10, // height: 10,
), // ),
Text( // Text(
'Connecting to the call...', // 'Connecting to the call...',
style: TextStyle(color: Colors.white), // style: TextStyle(color: Colors.white),
), // ),
], // ],
); // );
} // }
//
Future<void> _onHangup() async { // Future<void> _onHangup() async {
print('onHangup'); // print('onHangup');
await _conferenceRoom.disconnect(); // await _conferenceRoom.disconnect();
Navigator.of(context).pop(); // Navigator.of(context).pop();
} // }
//
void _onPersonAdd() { // void _onPersonAdd() {
print('onPersonAdd'); // print('onPersonAdd');
try { // try {
_conferenceRoom.addDummy( // _conferenceRoom.addDummy(
child: Stack( // child: Stack(
children: <Widget>[ // children: <Widget>[
const Placeholder(), // const Placeholder(),
Center( // Center(
child: Text( // child: Text(
(_conferenceRoom.participants.length + 1).toString(), // (_conferenceRoom.participants.length + 1).toString(),
style: const TextStyle( // style: const TextStyle(
shadows: <Shadow>[ // shadows: <Shadow>[
Shadow( // Shadow(
blurRadius: 3.0, // blurRadius: 3.0,
color: Color.fromARGB(255, 0, 0, 0), // color: Color.fromARGB(255, 0, 0, 0),
), // ),
Shadow( // Shadow(
blurRadius: 8.0, // blurRadius: 8.0,
color: Color.fromARGB(255, 255, 255, 255), // color: Color.fromARGB(255, 255, 255, 255),
), // ),
], // ],
fontSize: 80, // fontSize: 80,
), // ),
), // ),
), // ),
], // ],
), // ),
); // );
} on PlatformException catch (err) { // } on PlatformException catch (err) {
PlatformAlertDialog( // PlatformAlertDialog(
title: err.message, // title: err.message,
content: err.details, // content: err.details,
defaultActionText: 'OK', // defaultActionText: 'OK',
).show(context); // ).show(context);
} // }
} // }
//
void _onPersonRemove() { // void _onPersonRemove() {
print('onPersonRemove'); // print('onPersonRemove');
_conferenceRoom.removeDummy(); // _conferenceRoom.removeDummy();
} // }
//
Widget _buildParticipants(BuildContext context, Size size, ConferenceRoom conferenceRoom) { // Widget _buildParticipants(BuildContext context, Size size, ConferenceRoom conferenceRoom) {
final children = <Widget>[]; // final children = <Widget>[];
final length = conferenceRoom.participants.length; // final length = conferenceRoom.participants.length;
//
if (length <= 2) { // if (length <= 2) {
_buildOverlayLayout(context, size, children); // _buildOverlayLayout(context, size, children);
return Stack(children: children); // return Stack(children: children);
} // }
//
void buildInCols(bool removeLocalBeforeChunking, bool moveLastOfEachRowToNextRow, int columns) { // void buildInCols(bool removeLocalBeforeChunking, bool moveLastOfEachRowToNextRow, int columns) {
_buildLayoutInGrid( // _buildLayoutInGrid(
context, // context,
size, // size,
children, // children,
removeLocalBeforeChunking: removeLocalBeforeChunking, // removeLocalBeforeChunking: removeLocalBeforeChunking,
moveLastOfEachRowToNextRow: moveLastOfEachRowToNextRow, // moveLastOfEachRowToNextRow: moveLastOfEachRowToNextRow,
columns: columns, // columns: columns,
); // );
} // }
//
// if (length <= 3) { // // if (length <= 3) {
// buildInCols(true, false, 1); // // buildInCols(true, false, 1);
// } else if (length == 5) { // // } else if (length == 5) {
// buildInCols(false, true, 2); // // buildInCols(false, true, 2);
// } else if (length <= 6 || length == 8) { // // } else if (length <= 6 || length == 8) {
// buildInCols(false, false, 2); // // buildInCols(false, false, 2);
// } else if (length == 7 || length == 9) { // // } else if (length == 7 || length == 9) {
// buildInCols(true, false, 2); // // buildInCols(true, false, 2);
// } else if (length == 10) { // // } else if (length == 10) {
// buildInCols(false, true, 3); // // buildInCols(false, true, 3);
// } else if (length == 13 || length == 16) { // // } else if (length == 13 || length == 16) {
// buildInCols(true, false, 3); // // buildInCols(true, false, 3);
// } else if (length <= 18) { // // } else if (length <= 18) {
// buildInCols(false, false, 3); // // buildInCols(false, false, 3);
// } // // }
//
return Column( // return Column(
children: children, // children: children,
); // );
} // }
//
void _buildOverlayLayout(BuildContext context, Size size, List<Widget> children) { // void _buildOverlayLayout(BuildContext context, Size size, List<Widget> children) {
final participants = _conferenceRoom.participants; // final participants = _conferenceRoom.participants;
if (participants.length == 1) { // if (participants.length == 1) {
children.add(_buildNoiseBox()); // children.add(_buildNoiseBox());
} else { // } else {
final remoteParticipant = participants.firstWhere((ParticipantWidget participant) => participant.isRemote, orElse: () => null); // final remoteParticipant = participants.firstWhere((ParticipantWidget participant) => participant.isRemote, orElse: () => null);
if (remoteParticipant != null) { // if (remoteParticipant != null) {
children.add(remoteParticipant); // children.add(remoteParticipant);
} // }
} // }
//
final localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null); // final localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null);
if (localParticipant != null) { // if (localParticipant != null) {
children.add(DraggablePublisher( // children.add(DraggablePublisher(
key: Key('publisher'), // key: Key('publisher'),
child: localParticipant, // child: localParticipant,
availableScreenSize: size, // availableScreenSize: size,
onButtonBarVisible: _onButtonBarVisibleStreamController.stream, // onButtonBarVisible: _onButtonBarVisibleStreamController.stream,
onButtonBarHeight: _onButtonBarHeightStreamController.stream, // onButtonBarHeight: _onButtonBarHeightStreamController.stream,
)); // ));
} // }
} // }
//
void _buildLayoutInGrid( // void _buildLayoutInGrid(
BuildContext context, // BuildContext context,
Size size, // Size size,
List<Widget> children, { // List<Widget> children, {
bool removeLocalBeforeChunking = false, // bool removeLocalBeforeChunking = false,
bool moveLastOfEachRowToNextRow = false, // bool moveLastOfEachRowToNextRow = false,
int columns = 2, // int columns = 2,
}) { // }) {
final participants = _conferenceRoom.participants; // final participants = _conferenceRoom.participants;
ParticipantWidget localParticipant; // ParticipantWidget localParticipant;
if (removeLocalBeforeChunking) { // if (removeLocalBeforeChunking) {
localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null); // localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null);
if (localParticipant != null) { // if (localParticipant != null) {
participants.remove(localParticipant); // participants.remove(localParticipant);
} // }
} // }
final chunkedParticipants = chunk(array: participants, size: columns); // final chunkedParticipants = chunk(array: participants, size: columns);
if (localParticipant != null) { // if (localParticipant != null) {
chunkedParticipants.last.add(localParticipant); // chunkedParticipants.last.add(localParticipant);
participants.add(localParticipant); // participants.add(localParticipant);
} // }
//
if (moveLastOfEachRowToNextRow) { // if (moveLastOfEachRowToNextRow) {
for (var i = 0; i < chunkedParticipants.length - 1; i++) { // for (var i = 0; i < chunkedParticipants.length - 1; i++) {
var participant = chunkedParticipants[i].removeLast(); // var participant = chunkedParticipants[i].removeLast();
chunkedParticipants[i + 1].insert(0, participant); // chunkedParticipants[i + 1].insert(0, participant);
} // }
} // }
//
for (final participantChunk in chunkedParticipants) { // for (final participantChunk in chunkedParticipants) {
final rowChildren = <Widget>[]; // final rowChildren = <Widget>[];
for (final participant in participantChunk) { // for (final participant in participantChunk) {
rowChildren.add( // rowChildren.add(
Container( // Container(
width: size.width / participantChunk.length, // width: size.width / participantChunk.length,
height: size.height / chunkedParticipants.length, // height: size.height / chunkedParticipants.length,
child: participant, // child: participant,
), // ),
); // );
} // }
children.add( // children.add(
Container( // Container(
height: size.height / chunkedParticipants.length, // height: size.height / chunkedParticipants.length,
child: Row( // child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: rowChildren, // children: rowChildren,
), // ),
), // ),
); // );
} // }
} // }
//
NoiseBox _buildNoiseBox() { // NoiseBox _buildNoiseBox() {
return NoiseBox( // return NoiseBox(
density: NoiseBoxDensity.xLow, // density: NoiseBoxDensity.xLow,
backgroundColor: Colors.grey.shade900, // backgroundColor: Colors.grey.shade900,
child: Center( // child: Center(
child: Container( // child: Container(
color: Colors.black54, // color: Colors.black54,
width: double.infinity, // width: double.infinity,
height: 40, // height: 40,
child: Center( // child: Center(
child: Text( // child: Text(
'Waiting for another participant to connect to the call...', // 'Waiting for another participant to connect to the call...',
key: Key('text-wait'), // key: Key('text-wait'),
textAlign: TextAlign.center, // textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), // style: TextStyle(color: Colors.white),
), // ),
), // ),
), // ),
), // ),
); // );
} // }
//
List<List<T>> chunk<T>({@required List<T> array, @required int size}) { // List<List<T>> chunk<T>({@required List<T> array, @required int size}) {
final result = <List<T>>[]; // final result = <List<T>>[];
if (array.isEmpty || size <= 0) { // if (array.isEmpty || size <= 0) {
return result; // return result;
} // }
var first = 0; // var first = 0;
var last = size; // var last = size;
final totalLoop = array.length % size == 0 ? array.length ~/ size : array.length ~/ size + 1; // final totalLoop = array.length % size == 0 ? array.length ~/ size : array.length ~/ size + 1;
for (var i = 0; i < totalLoop; i++) { // for (var i = 0; i < totalLoop; i++) {
if (last > array.length) { // if (last > array.length) {
result.add(array.sublist(first, array.length)); // result.add(array.sublist(first, array.length));
} else { // } else {
result.add(array.sublist(first, last)); // result.add(array.sublist(first, last));
} // }
first = last; // first = last;
last = last + size; // last = last + size;
} // }
return result; // return result;
} // }
//
void _onHeightBar(double height) { // void _onHeightBar(double height) {
_onButtonBarHeightStreamController.add(height); // _onButtonBarHeightStreamController.add(height);
} // }
//
void _onShowBar() { // void _onShowBar() {
setState(() { // setState(() {
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]); // SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]);
}); // });
_onButtonBarVisibleStreamController.add(true); // _onButtonBarVisibleStreamController.add(true);
} // }
//
void _onHideBar() { // void _onHideBar() {
setState(() { // setState(() {
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); // SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
}); // });
_onButtonBarVisibleStreamController.add(false); // _onButtonBarVisibleStreamController.add(false);
} // }
//
Future<void> _wakeLock(bool enable) async { // Future<void> _wakeLock(bool enable) async {
try { // try {
return await (enable ? Wakelock.enable() : Wakelock.disable()); // return await (enable ? Wakelock.enable() : Wakelock.disable());
} catch (err) { // } catch (err) {
print('Unable to change the Wakelock and set it to $enable'); // print('Unable to change the Wakelock and set it to $enable');
print(err); // print(err);
} // }
} // }
//
void _conferenceRoomUpdated() { // void _conferenceRoomUpdated() {
setState(() {}); // setState(() {});
} // }
} // }

File diff suppressed because it is too large Load Diff

@ -96,10 +96,10 @@ class _HomePageState extends State<HomePage> {
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 15.0, left: 3.5, right: 3.5), top: 15.0, left: 3.5, right: 3.5),
child: SvgPicture.asset( // child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg', // 'assets/images/new-design/covid-19-car.svg',
width: 45.0, // width: 45.0,
height: 45.0), // height: 45.0),
), ),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -173,11 +173,11 @@ class _HomePageState extends State<HomePage> {
.withOpacity(0.3), .withOpacity(0.3),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5))), Radius.circular(5))),
child: SvgPicture.asset( // child: SvgPicture.asset(
projectViewModel.isArabic // projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg' // ? 'assets/images/new-design/livecare_arabic_logo.svg'
: 'assets/images/new-design/liveCare_white_logo.svg', // : 'assets/images/new-design/liveCare_white_logo.svg',
), // ),
), ),
), ),
), ),
@ -686,7 +686,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
height: 100, height: 100,
imageName: 'hmg_services_bg.png', imageName: 'contact_us_bg.png',
opacity: 0.5, opacity: 0.5,
color: Colors.grey[700], color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,

@ -78,35 +78,35 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print(route.settings.name); print(route.settings.name);
} }
setState(() { // setState(() {
print("didChangeAppLifecycleState"); // print("didChangeAppLifecycleState");
print('state = $state'); // print('state = $state');
AppGlobal.context = context; // AppGlobal.context = context;
if (state == AppLifecycleState.resumed) { // if (state == AppLifecycleState.resumed) {
print(LandingPage.isOpenCallPage); // print(LandingPage.isOpenCallPage);
if (LandingPage.isOpenCallPage) { // if (LandingPage.isOpenCallPage) {
if (!isPageNavigated) { // if (!isPageNavigated) {
isPageNavigated = true; // isPageNavigated = true;
Navigator.push( // Navigator.push(
context, // context,
MaterialPageRoute( // MaterialPageRoute(
builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
.then((value) { // .then((value) {
isPageNavigated = false; // isPageNavigated = false;
}); // });
} // }
} // }
} // }
//
if (state == AppLifecycleState.paused) { // if (state == AppLifecycleState.paused) {
isPageNavigated = false; // isPageNavigated = false;
} // }
//
if (state == AppLifecycleState.inactive) { // if (state == AppLifecycleState.inactive) {
isPageNavigated = false; // isPageNavigated = false;
} // }
}); // });
} }
@override @override
@ -346,14 +346,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}, },
), ),
actions: [ actions: [
IconButton( // IconButton(
iconSize: 70, // iconSize: 70,
icon: SvgPicture.asset('assets/images/svg/robort_svg.svg', // icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
height: 100, width: 100, fit: BoxFit.cover), // height: 100, width: 100, fit: BoxFit.cover),
onPressed: () { // onPressed: () {
triggerRobot(); // triggerRobot();
} //do something, // } //do something,
) // )
], ],
centerTitle: true, centerTitle: true,
), ),

@ -213,13 +213,13 @@ class _IncomingCallState extends State<IncomingCall>
token: widget.incomingCallData.sessionId, token: widget.incomingCallData.sessionId,
identity: widget.incomingCallData.identity); identity: widget.incomingCallData.identity);
await Navigator.of(context).push( // await Navigator.of(context).push(
MaterialPageRoute<ConferencePage>( // MaterialPageRoute<ConferencePage>(
fullscreenDialog: true, // fullscreenDialog: true,
builder: (BuildContext context) => // builder: (BuildContext context) =>
ConferencePage(roomModel: roomModel), // ConferencePage(roomModel: roomModel),
), // ),
); // );
} catch (err) { } catch (err) {
print(err); print(err);
await PlatformExceptionAlertDialog( await PlatformExceptionAlertDialog(

@ -144,7 +144,7 @@ dependencies:
# recase: ^3.0.0 # recase: ^3.0.0
wakelock: ^0.1.4 wakelock: ^0.1.4
after_layout: ^1.0.7 after_layout: ^1.0.7
twilio_programmable_video: ^0.5.0+3 #twilio_programmable_video: ^0.5.0+3
flutter_tts: ^1.2.6 flutter_tts: ^1.2.6
speech_to_text: speech_to_text:

Loading…
Cancel
Save