registerDevice method
Implementation
Future<String> registerDevice(String body, String encryptedHash) async {
Dio dio = Dio();
/* dio.interceptors
.add(InterceptorsWrapper(onError: (DioException err, handler) async {
//to do add some kind of a fallback here
}));*/
String url =
"${AppUrls.baseUrlVSMS}/subscriberv2/v1/device/register/${DeviceRegistration.providerid}?hash=$encryptedHash";
dio.options.headers['Content-Type'] = "text/plain;charset=UTF-8";
final response = await dio.post(url, data: body);
return response.data['success'];
}