createAccount method

Future createAccount(
  1. String scheme,
  2. String secret,
  3. bool login,
  4. AccountParams? params,
)

Create a new user. Wrapper for account method

Implementation

Future createAccount(
    String scheme, String secret, bool login, AccountParams? params) {
  var promise = account(topic_names.USER_NEW, scheme, secret, login, params);
  if (login) {
    promise = promise.then((dynamic ctrl) {
      _authService.onLoginSuccessful(ctrl);
      return ctrl;
    });
  }
  return promise;
}