create method

Future<String?> create(
  1. String username,
  2. String password
)

Creates a new user with the username and password provided. Returns the public key of the user.

Implementation

Future<String?> create(String username, String password) {
  final completer = Completer<String?>();
  _user.create(username, password, allowInterop(
    (Object data) {
      completer.complete(getProperty(data, 'pub'));
    },
  ));
  return completer.future;
}