createAccount static method
dynamic
createAccount({})
Implementation
static createAccount(
{String name = "",
String email = "",
String phone = "",
String password = "",
String? captcha,
String? gtoken,
String? fbtoken,
String? appletoken}) async {
String url = "${AppUrls.baseUrlVSMS}/subscriberv2/v1/subscriber";
await DeviceRegistration().getDeviceInformation();
var body = {
"subscribername": name.isEmpty ? null : name,
"country": DeviceInfo.countryCode,
"password": password.isEmpty ? null : password,
"captcha": captcha ?? "",
"deviceos": DeviceInfo.deviceos,
"model": DeviceInfo.devicemodel,
"email": email.isEmpty ? null : email,
"mobileno": phone.isEmpty ? null : phone,
"make": DeviceInfo.devicemodel,
"version": DeviceRegistration.appversion,
"devicetype": DeviceInfo.devicetype,
"gtoken": gtoken,
"fbtoken": fbtoken,
"appletoken": appletoken,
};
final response = await _dio!.post(url, data: body);
var data = response.data;
return data;
}