diff --git a/ios/Flutter/App.framework/App b/ios/Flutter/App.framework/App index f439695..59c79d5 100755 Binary files a/ios/Flutter/App.framework/App and b/ios/Flutter/App.framework/App differ diff --git a/ios/Flutter/Flutter.framework/Flutter b/ios/Flutter/Flutter.framework/Flutter index 3d78fe1..982332d 100755 Binary files a/ios/Flutter/Flutter.framework/Flutter and b/ios/Flutter/Flutter.framework/Flutter differ diff --git a/ios/Flutter/Generated.xcconfig b/ios/Flutter/Generated.xcconfig index 9bd4244..496f0f7 100644 --- a/ios/Flutter/Generated.xcconfig +++ b/ios/Flutter/Generated.xcconfig @@ -1,9 +1,9 @@ // This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/Users/dinect/projects/flutter -FLUTTER_APPLICATION_PATH=/Users/dinect/projects/checker +FLUTTER_ROOT=/Users/ntrlab/flutter +FLUTTER_APPLICATION_PATH=/Users/ntrlab/semyon/apps/dinect FLUTTER_TARGET=lib/main.dart -FLUTTER_BUILD_MODE=release +FLUTTER_BUILD_MODE=debug FLUTTER_BUILD_DIR=build SYMROOT=${SOURCE_ROOT}/../build/ios -FLUTTER_FRAMEWORK_DIR=/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release +FLUTTER_FRAMEWORK_DIR=/Users/ntrlab/flutter/bin/cache/artifacts/engine/ios #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" diff --git a/ios/Flutter/app.flx b/ios/Flutter/app.flx index e41504e..e707853 100644 Binary files a/ios/Flutter/app.flx and b/ios/Flutter/app.flx differ diff --git a/ios/Podfile.lock b/ios/Podfile.lock index f8d55f9..9d22e06 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -12,20 +12,20 @@ PODS: - FMDB DEPENDENCIES: - - Flutter (from `/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release`) - - image_picker (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.3/ios`) - - path_provider (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios`) - - sqflite (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios`) + - Flutter (from `/Users/ntrlab/flutter/bin/cache/artifacts/engine/ios`) + - image_picker (from `/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.3/ios`) + - path_provider (from `/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios`) + - sqflite (from `/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios`) EXTERNAL SOURCES: Flutter: - :path: "/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release" + :path: /Users/ntrlab/flutter/bin/cache/artifacts/engine/ios image_picker: - :path: "/Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.3/ios" + :path: /Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.3/ios path_provider: - :path: "/Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios" + :path: /Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios sqflite: - :path: "/Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios" + :path: /Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios SPEC CHECKSUMS: Flutter: d674e78c937094a75ac71dd77e921e840bea3dbf @@ -36,4 +36,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 351e02e34b831289961ec3558a535cbd2c4965d2 -COCOAPODS: 1.1.0.rc.2 +COCOAPODS: 1.2.1 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 9d5d7e3..e9bfeb9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -80,8 +80,6 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - AC45BF491F9E3C56009713E2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AC45BF4A1F9E3C56009713E2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; AC45BF661F9E3F97009713E2 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; AC45BF911F9E408E009713E2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = /Users/ntrlab/semyon/apps/checker/ios/Runner/Info.plist; sourceTree = ""; }; AC73A4241F9F7F920026EBA4 /* Dinect.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Dinect.plist; path = /Users/ntrlab/semyon/apps/checker/ios/Runner/Dinect.plist; sourceTree = ""; }; @@ -171,7 +169,6 @@ ACE103BB1F8FCCA500D17794 /* ZBarSDK */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, - AC45BF3A1F9E3C55009713E2 /* develop */, 97C146EF1CF9000F007C117D /* Products */, BBA9BB001F1786510053B6EA /* Frameworks */, 578B8FA7D56ACA2E56C02128 /* Pods */, @@ -214,15 +211,6 @@ name = "Supporting Files"; sourceTree = ""; }; - AC45BF3A1F9E3C55009713E2 /* develop */ = { - isa = PBXGroup; - children = ( - AC45BF491F9E3C56009713E2 /* Info.plist */, - AC45BF4A1F9E3C56009713E2 /* main.m */, - ); - path = develop; - sourceTree = ""; - }; ACE103BB1F8FCCA500D17794 /* ZBarSDK */ = { isa = PBXGroup; children = ( @@ -321,7 +309,7 @@ ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { ACE861271F9F745B006FEF38 = { - DevelopmentTeam = 926V94K5Q8; + DevelopmentTeam = XU4S344HDL; SystemCapabilities = { com.apple.Push = { enabled = 1; @@ -381,7 +369,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; ACE861291F9F745B006FEF38 /* Run Script */ = { @@ -587,7 +575,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 926V94K5Q8; + DEVELOPMENT_TEAM = XU4S344HDL; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -626,7 +614,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 926V94K5Q8; + DEVELOPMENT_TEAM = XU4S344HDL; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/UserInterfaceState.xcuserstate b/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/UserInterfaceState.xcuserstate index 4824d34..d9731a2 100644 Binary files a/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 49bd793..90a8da5 100644 --- a/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/ios/Runner.xcworkspace/xcuserdata/ntrlab.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -10,7 +10,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Runner/AppDelegate.m" - timestampString = "530550700.366503" + timestampString = "533131021.955531" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "78" @@ -26,7 +26,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Runner/AppDelegate.m" - timestampString = "530550700.366692" + timestampString = "533131021.956561" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "10" @@ -42,7 +42,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Runner/AppDelegate.m" - timestampString = "530550700.366785" + timestampString = "533131021.957304" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "13" @@ -58,7 +58,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Runner/AppDelegate.m" - timestampString = "530550700.366865" + timestampString = "533131021.957849" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "15" @@ -74,7 +74,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Runner/AppDelegate.m" - timestampString = "530550700.366933" + timestampString = "533131021.958377" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "9" @@ -90,11 +90,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Runner/ScannerViewController.swift" - timestampString = "530550700.367155" + timestampString = "533136853.177463" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "50" - endingLineNumber = "50" + startingLineNumber = "88" + endingLineNumber = "88" landmarkName = "viewDidLoad()" landmarkType = "7"> @@ -138,11 +138,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Runner/ScannerViewController.swift" - timestampString = "530550700.368435" + timestampString = "533136853.177572" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "51" - endingLineNumber = "51" + startingLineNumber = "89" + endingLineNumber = "89" landmarkName = "viewDidLoad()" landmarkType = "7"> diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m index 073a14e..aa5d80c 100644 --- a/ios/Runner/AppDelegate.m +++ b/ios/Runner/AppDelegate.m @@ -31,7 +31,7 @@ @"appTitle" : @"Dinect", @"showBonus" : @YES, }, - @"com.dinect.develop" : @{ + @"com.dinect.develop-iOS" : @{ @"locale" : @"ru", @"flavor" : @"autobonus", @"currency" : @643, diff --git a/ios/Runner/Assets.xcassets/Contents.json b/ios/Runner/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/ios/Runner/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/card.imageset/Contents.json b/ios/Runner/Assets.xcassets/card.imageset/Contents.json new file mode 100644 index 0000000..d6a484d --- /dev/null +++ b/ios/Runner/Assets.xcassets/card.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Icon-20.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Icon-40.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Icon-60.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/card.imageset/Icon-20.png b/ios/Runner/Assets.xcassets/card.imageset/Icon-20.png new file mode 100644 index 0000000..85fe074 Binary files /dev/null and b/ios/Runner/Assets.xcassets/card.imageset/Icon-20.png differ diff --git a/ios/Runner/Assets.xcassets/card.imageset/Icon-40.png b/ios/Runner/Assets.xcassets/card.imageset/Icon-40.png new file mode 100644 index 0000000..06381d7 Binary files /dev/null and b/ios/Runner/Assets.xcassets/card.imageset/Icon-40.png differ diff --git a/ios/Runner/Assets.xcassets/card.imageset/Icon-60.png b/ios/Runner/Assets.xcassets/card.imageset/Icon-60.png new file mode 100644 index 0000000..3860c77 Binary files /dev/null and b/ios/Runner/Assets.xcassets/card.imageset/Icon-60.png differ diff --git a/ios/Runner/Assets.xcassets/phone.imageset/Contents.json b/ios/Runner/Assets.xcassets/phone.imageset/Contents.json new file mode 100644 index 0000000..d6a484d --- /dev/null +++ b/ios/Runner/Assets.xcassets/phone.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Icon-20.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Icon-40.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Icon-60.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/phone.imageset/Icon-20.png b/ios/Runner/Assets.xcassets/phone.imageset/Icon-20.png new file mode 100644 index 0000000..9f87b55 Binary files /dev/null and b/ios/Runner/Assets.xcassets/phone.imageset/Icon-20.png differ diff --git a/ios/Runner/Assets.xcassets/phone.imageset/Icon-40.png b/ios/Runner/Assets.xcassets/phone.imageset/Icon-40.png new file mode 100644 index 0000000..f2bd708 Binary files /dev/null and b/ios/Runner/Assets.xcassets/phone.imageset/Icon-40.png differ diff --git a/ios/Runner/Assets.xcassets/phone.imageset/Icon-60.png b/ios/Runner/Assets.xcassets/phone.imageset/Icon-60.png new file mode 100644 index 0000000..57ff96a Binary files /dev/null and b/ios/Runner/Assets.xcassets/phone.imageset/Icon-60.png differ diff --git a/ios/Runner/ScannerViewController.swift b/ios/Runner/ScannerViewController.swift index c53da63..329a1d0 100644 --- a/ios/Runner/ScannerViewController.swift +++ b/ios/Runner/ScannerViewController.swift @@ -19,9 +19,47 @@ extension ZBarSymbolSet: Sequence { } @objc class ScannerViewController: UIViewController, ZBarReaderDelegate, UITextFieldDelegate { + + enum ButtonState { + case card + case phone + + var icon: UIImage { + + switch self { + case .card: return UIImage(named: "card")! + case .phone: return UIImage(named: "phone")! + } + } + + var inputText: String { + switch self { + case .card: return "Enter the barcode manualy" + case .phone: return "Enter the phone manualy" + } + } + + var errorText: String { + switch self { + case .card: return "User with card number %@ not found" + case .phone: return "User with phone number %@ not found" + } + } + + var searchType: String { + switch self { + case .card: return "card" + case .phone: return "phone" + } + } + } + + var buttonState: ButtonState = .card + var platformChannel: FlutterMethodChannel? let readerViewController = ZBarReaderViewController() + //Вьюшка для верхнего меню let topView = UIView() @@ -49,12 +87,15 @@ extension ZBarSymbolSet: Sequence { topView.addSubview(settingButton) textField.delegate = self - textField.keyboardType = .numberPad + //textField.keyboardType = .numberPad //Looks for single or multiple taps. let tap = UITapGestureRecognizer(target: self, action: #selector(ScannerViewController.hideKeyboard)) readerViewController.view.addGestureRecognizer(tap) + settingButton.setImage(self.buttonState.icon, for: .normal) + textField.placeholder = self.buttonState.inputText + } func hideKeyboard() { @@ -63,8 +104,12 @@ extension ZBarSymbolSet: Sequence { func buttonTouch(){ - sendResult(textField.text!) - + switch self.buttonState { + case .card: self.buttonState = .phone + case .phone: self.buttonState = .card + } + settingButton.setImage(self.buttonState.icon, for: .normal) + textField.placeholder = self.buttonState.inputText } func textFieldShouldReturn(_ textField: UITextField) -> Bool { @@ -75,9 +120,9 @@ extension ZBarSymbolSet: Sequence { } func sendResult(_ str: String) { - platformChannel?.invokeMethod("findUserAndPurchase", arguments: [str], result: { (result: Any?) in + platformChannel?.invokeMethod("findUserAndPurchase", arguments: [str, buttonState.searchType], result: { (result: Any?) in if result is FlutterError { - self.showErrorAlert() + self.showErrorAlert(str) } else { self.presentingViewController?.dismiss(animated: false, completion: { self.dismiss(animated: true) }) } @@ -86,9 +131,12 @@ extension ZBarSymbolSet: Sequence { } - func showErrorAlert() { - let alertController = UIAlertController(title: "Error", message: - "Wrong code", preferredStyle: UIAlertControllerStyle.alert) + func showErrorAlert(_ str: String) { + let alertController = UIAlertController( + title: "Error", + message: String(format: buttonState.errorText, str), + preferredStyle: UIAlertControllerStyle.alert + ) alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.default,handler: nil)) self.present(alertController, animated: true, completion: nil) @@ -96,14 +144,8 @@ extension ZBarSymbolSet: Sequence { } override func viewWillAppear(_ animated: Bool) { - topView.backgroundColor = UIColor.white - settingButton.setTitle("+", for: .normal) - textField.placeholder = "Enter code" textField.borderStyle = .roundedRect - - //self.present(readerViewController, animated: true) - super.viewWillAppear(animated) } @@ -115,8 +157,8 @@ extension ZBarSymbolSet: Sequence { readerViewController.view.frame = view.bounds topView.frame = CGRect(x: 0, y: 0, width: readerViewController.view.frame.size.width, height: 40) - textField.frame = CGRect(x: 8, y: 5, width: readerViewController.view.frame.size.width - 50, height: 30) - settingButton.frame = CGRect(x: textField.frame.maxX + 8, y: 10, width: 20, height: 20) + textField.frame = CGRect(x: settingButton.frame.maxX + 8, y: 5, width: readerViewController.view.frame.size.width - 50, height: 30) + settingButton.frame = CGRect(x: 8, y: 10, width: 20, height: 20) } @@ -127,32 +169,9 @@ extension ZBarSymbolSet: Sequence { if let symbol = symbol as? ZBarSymbol, let data = symbol.data { sendResult(data) -/* - if let platformChannel = self.platformChannel { - // self.dismiss(animated: true, completion: { - // self.presentingViewController?.dismiss(animated: true, completion: { - platformChannel.invokeMethod("findUserAndPurchase", arguments: [data], result: { (result: Any?) in - - print("result: \(result ?? "")") - self.presentingViewController?.dismiss(animated: false, completion: { self.dismiss(animated: true) }) - }) - // }) - // }) -// let result = platformChannel.invokeMethod("getUserByCode", arguments: [data], handleResult(result: FlutterResult)) -// print(result); - } - /* - let toast = UIAlertController() - toast.message = data - toast.add - toast.show() -*/ - //navigationController?.popViewController(animated: true) - */ + } } - //navigationController?.popViewController(animated: true) - } diff --git a/lib/common.dart b/lib/common.dart index 73c7339..dd8e3a3 100644 --- a/lib/common.dart +++ b/lib/common.dart @@ -104,8 +104,18 @@ startScanner(BuildContext context, String app, SqliteHelper helper) async { } else if (call.method == 'findUserAndPurchase') { var userResponse; + print(call.arguments[1]); + try { - userResponse = await getUserByCard(call.arguments[0],token); + switch (call.arguments[1]) { + case 'card': + userResponse = await getUserByCard(call.arguments[0],token); + break; + case 'phone': + userResponse = await getUserByPhone(call.arguments[0],token); + break; + } + } catch (error) { print(error.toString()); } @@ -127,13 +137,8 @@ startScanner(BuildContext context, String app, SqliteHelper helper) async { print(userString); print(card); pushRoute(context, new PurchaseScreen(helper, app, JSON.encode(users[0]), card)); -// var route = new MaterialPageRoute( -// builder: (BuildContext context) => -// new PurchaseScreen(helper, app,)); -// while (Navigator.of(context).canPop()) { -// Navigator.of(context).pop(); -// } -// Navigator.of(context).pushReplacement(route); + } else { + throw new FlutterError("Users not found"); } diff --git a/lib/network.dart b/lib/network.dart index f78bd3c..20097c2 100644 --- a/lib/network.dart +++ b/lib/network.dart @@ -82,6 +82,21 @@ getUserByCard(String card, String token) async { return httpClient.get(finalEndpoint, headers: headers); } +getUserByPhone(String phone, String token) async { + + var headers = { + 'DM-Authorization': 'dmapptoken ${await getToken()}', + 'Authorization': 'dmtoken ${token}', + 'Accept-Language': Intl.defaultLocale + }; + + + var finalEndpoint = "${await getEndpoint()}users/?phone=$phone"; + print(finalEndpoint); + + return httpClient.get(finalEndpoint, headers: headers); +} + getEndpoint() async { return await platform.invokeMethod('getEndpoint'); }