resendCode method

Future<Result<AuthSentCodeBase>> resendCode({
  1. required String phoneNumber,
  2. required String phoneCodeHash,
})

Resend Code.

ID: 3ef1a9bf.

Implementation

Future<Result<AuthSentCodeBase>> resendCode({
  required String phoneNumber,
  required String phoneCodeHash,
}) async {
  // Preparing the request.
  final request = AuthResendCode(
    phoneNumber: phoneNumber,
    phoneCodeHash: phoneCodeHash,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<AuthSentCodeBase>();
}