createAccount method

Future<XRPCResponse<CreateAccountOutput>> createAccount({
  1. String? email,
  2. required String handle,
  3. String? did,
  4. String? inviteCode,
  5. String? verificationCode,
  6. String? verificationPhone,
  7. String? password,
  8. String? recoveryKey,
  9. Map<String, dynamic>? plcOp,
  10. Map<String, String>? $unknown,
  11. Map<String, String>? $headers,
  12. PostClient? $client,
})

Implementation

Future<XRPCResponse<CreateAccountOutput>> createAccount({
  String? email,
  required String handle,
  String? did,
  String? inviteCode,
  String? verificationCode,
  String? verificationPhone,
  String? password,
  String? recoveryKey,
  Map<String, dynamic>? plcOp,
  Map<String, String>? $unknown,
  Map<String, String>? $headers,
  PostClient? $client,
}) async =>
    await _ctx.post<CreateAccountOutput>(
      ns.comAtprotoServerCreateAccount,
      headers: $headers,
      body: {
        if (email != null) 'email': email,
        'handle': handle,
        if (did != null) 'did': did,
        if (inviteCode != null) 'inviteCode': inviteCode,
        if (verificationCode != null) 'verificationCode': verificationCode,
        if (verificationPhone != null) 'verificationPhone': verificationPhone,
        if (password != null) 'password': password,
        if (recoveryKey != null) 'recoveryKey': recoveryKey,
        if (plcOp != null) 'plcOp': plcOp,
        ...?$unknown,
      },
      to: const CreateAccountOutputConverter().fromJson,
      client: $client,
    );