login method

Future<void> login(
  1. String userID,
  2. dynamic config
)

Implementation

Future<void> login(String userID, dynamic config) async {
  Object _config = mapToJSObj(config);

  final promise = ZIM.getInstance()!.login(userID, _config);

  final Future<void> loginFuture = promiseToFuture(promise);

  await loginFuture.catchError((e) {
    throw PlatformException(code: e.code.toString(), message: e.message);
  });

  return Future.value();
}