logout function

Future<bool> logout(
  1. dynamic _logoutUrl
)

Implementation

Future<bool> logout(_logoutUrl) async {
  Uri url = Uri.parse(_logoutUrl);

  if (await canLaunchUrl(url)) {
    //await launch(_logoutUrl, forceWebView: true);
    await launchUrl(url);
  } else {
    throw 'Could not launch $url';
  }

  await Future.delayed(Duration(seconds: 4));

  /// closing web view function does not work in Windows applications
  if (currPlatform.isAppOS()) {
    //closeWebView();
    closeInAppWebView();
  }
  return true;
}