loginBySMSCode static method Null safety

Future<LCUser> loginBySMSCode(
  1. String mobile,
  2. String code
)

Signs in a LCUser with their mobile number and verification code.

Implementation

static Future<LCUser> loginBySMSCode(String mobile, String code) {
  if (isNullOrEmpty(mobile)) {
    throw ArgumentError.notNull('mobile');
  }
  if (isNullOrEmpty(code)) {
    throw ArgumentError.notNull('code');
  }
  Map<String, dynamic> data = {'mobilePhoneNumber': mobile, 'smsCode': code};
  return _login(data);
}