generateRetryOtp method
Future<String>
generateRetryOtp({
- required String phoneNumber,
- required int step,
- required IGraphQlClient client,
Implementation
Future<String> generateRetryOtp({
required String phoneNumber,
required int step,
required IGraphQlClient client,
}) async {
final Map<String, dynamic> _variables = <String, dynamic>{
'msisdn': phoneNumber,
'step': step
};
final http.Response result =
await client.query(generateRetryOTPQuery, _variables);
final Map<String, dynamic> data = client.toMap(result);
final String? parseError = client.parseError(data);
if (parseError != null) {
return Future<String>.value(parseError);
}
final dynamic otp = data['data']['generateRetryOTP'];
return otp as String;
}