logout method

Future<void> logout()

Implementation

Future<void> logout() async {
  if (Platform.isIOS) {
    final browser = ChromeSafariBrowser();
    await browser.open(url: _buildEndSessionUrl()).then((value) async {
      await browser.close();
    });
  } else {
    await launch(_buildEndSessionUrl().toString());
  }
  _kindeApi.setBearerAuth(_bearerAuth, '');
  await Store.instance.clear();
}