sadadPayLogin static method
Implementation
static Future<SendOtpModel?> sadadPayLogin(
{required String token, required String cellnumber, required String password}) async {
final url = Uri.parse(
ApiEndPoint.SDKLoginURL,
);
Map<String, String> header = {'Content-Type': 'application/json', "Authorization": token};
Map<String, dynamic> body = {"cellnumber": cellnumber, "password": password};
var result = await http.post(
url,
headers: header,
body: json.encode(body),
);
if (result.statusCode == 200) {
var response = jsonDecode(result.body);
print("test_sadadPayLogin:::${response}");
SendOtpModel sendOtpModel = sendOtpModelFromJson(jsonEncode(response));
return sendOtpModel;
}
return null;
}