fetchPartById method
Implementation
Future<MyResponse<Part>> fetchPartById(int partId) async {
var response = await DioUtils.request(DioUtils.REQUEST_GET, "${Apis.FETCH_ALL_PARTS}$partId");
if (response.statusCode == 200) {
return MyResponse<Part>.fromJson(response.data,Apis.SINGLE);
} else {
return MyResponse<Part>.init(Apis.CODE_ERROR, null, null);
}
}