signUp method Null safety

Future<LCUser> signUp()

Signs up a new user.

This will create a new user on the server, and also persist the session.


Future<LCUser> signUp() async {
  if (isNullOrEmpty(username)) {
    throw ArgumentError.notNull('username');
  if (isNullOrEmpty(password)) {
    throw ArgumentError.notNull('password');
  if (objectId != null) {
    throw ArgumentError('Cannot sign up a user that already exists.');
  await save();
  return this;