init method

Future<bool> init({
  1. String url = '',
})

Init all repos with data retrieved from givenUrl Call this after getConnectionURL Give the url the user was redirected to after loggin in After this, user is considered logged in and repos can be called You can save the redirected url and use this method when user comes back to the app returns false if there was an issue parsing the URL

Implementation

Future<bool> init({String url = ''}) async {
  String userToken = accessToken ?? '';
  if (url.isNotEmpty) {
    userToken = parseUrl(url: url);
  }
  if (userToken.isEmpty) return false;
  _setTokenAndClient(token: userToken);
  await validateToken();
  return true;
}