diff --git a/lib/ui/landing/widget/services_widget.dart b/lib/ui/landing/widget/services_widget.dart index 7bb9bd4..7d2c2b2 100644 --- a/lib/ui/landing/widget/services_widget.dart +++ b/lib/ui/landing/widget/services_widget.dart @@ -255,75 +255,15 @@ class ServicesWidget extends StatelessWidget { } else { if (menuEntry.menuName == "HMG_TICKET_REQUESTS") { Utils.showLoading(context); - print("========="); TicketBookingResult response = await pro.fetchTicketBooking(); Utils.hideLoading(context); if (response.success) { - print("============ Allowed ============"); SSOAuthModel? ssoToken = await pro.fetchSSOAuthRedirection(clientID: response.clientId); if (ssoToken != null) { logger.d(ssoToken.data!.toJson()); logger.d(ssoToken.data!.accessToken); dynamic url = await pro.fetchURLRedirection(token: ssoToken.data!.accessToken!); Navigator.push(context, MaterialPageRoute(builder: (context) => SsoLoginWebView(url: url ?? "", jwtToken: ssoToken.data!.accessToken!))); - - // - // myInAppBrowser = MyInAppBrowser( - // onExitCallback: () { - // log("Browser Exited"); - // }, - // onLoadStartCallback: (String url) { - // log("Browser LoadStart for : $url"); - // if (url.contains("https://ek.techmaster.in/")) { - // // Handle the URL as needed - // log("SSO URL Loaded: $url"); - // } - // }, - // ); - // - // await myInAppBrowser!.openUrlRequest( - // urlRequest: URLRequest( - // url: WebUri(valu, forceToStringRawValue: true), - // allowsCellularAccess: true, - // allowsConstrainedNetworkAccess: true, - // allowsExpensiveNetworkAccess: true, - // // headers: {'Authorization': 'Bearer ${ssoToken.data!.accessToken}'}, - // ), - // settings: inAppBrowserOptions, - // ); - - // Navigator.of(context).push( - // MaterialPageRoute( - // builder: - // (context) => WebViewWidget( - // controller: - // WebViewController() - // ..setJavaScriptMode(JavaScriptMode.unrestricted) - // ..setNavigationDelegate( - // NavigationDelegate( - // onNavigationRequest: (NavigationRequest request) { - // return NavigationDecision.navigate; - // }, - // onHttpError: (HttpResponseError response) { - // print(response.response!.statusCode); - // }, - // onProgress: (int value) { - // print(value); - // }, - // onWebResourceError: (WebResourceError error) { - // print(error.errorCode); - // print(error.description); - // }, - // ), - // ) - // ..loadRequest(Uri.parse("https://ek.techmaster.in/SSO/HMG"), headers: {'Authorization': 'Bearer ${ssoToken.data!.accessToken}'}), - // ), - // ), - // ); - - // launchUrl(Uri.parse("https://ek.techmaster.in/SSO/HMG"),headers: {'Authorization': 'Bearer ${ssoToken.data!.accessToken}'}, mode: LaunchMode.inAppBrowserView); - // ddv - print("============ Token Fetched ============"); } } else { List _menuList =