openBrowser method

dynamic openBrowser(
  1. String url,
  2. String redirectUrl, [
  3. bool isTestMode = false
])

Opens browser with URL returned from startTransaction()

Implementation

openBrowser(final String url, final String redirectUrl, [final bool isTestMode = false]) async {
  final ZainpayInAppBrowser browser = ZainpayInAppBrowser(callBack: _callBack);

  var options = InAppBrowserClassOptions(
    crossPlatform: InAppBrowserOptions(
        hideUrlBar: true,
      hideToolbarTop: true,
    ),
    inAppWebViewGroupOptions: InAppWebViewGroupOptions(
      crossPlatform: InAppWebViewOptions(
          javaScriptEnabled: true,
        clearCache: true
      ),
    ),
  );

  await browser.openUrlRequest(
      urlRequest: URLRequest(url: Uri.parse(url)), options: options);
}