fetchAlbum function

Future<ApiResponse> fetchAlbum(
  1. dynamic args
)

Implementation

Future<ApiResponse> fetchAlbum(args) async {
  final queryParameter = {
    "id": "eb5f37b2-ca34-40a1-83ba-cb161eb55e6e",
  };
//http://demo5462168.mockable.io/landingScreenPartner
   //   Uri.parse('http://demo1043773.mockable.io/orderDetails'),
  final response = await http.get(
    Uri.parse('https://demo2510181.mockable.io/paymentScreen'),
    headers: {
      "ngrok-skip-browser-warning": "value",
    },
  );

  if (response.statusCode == 200) {
    return ApiResponse.fromJson(jsonDecode(response.body));
  } else {
    throw Exception('Failed to load album');
  }
}