From 223310daed9075aa7a100e85d2881c7f15eb7130 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 10 Oct 2021 16:59:43 +0300 Subject: [PATCH] Client statements --- lib/constants.dart | 2 ++ lib/ui/invoice/invoice_pdf.dart | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/constants.dart b/lib/constants.dart index 1fa6f160d..5ea440bd7 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -247,6 +247,8 @@ const String kGatewayTypeCredit = '10'; const String kGatewayTypeKBC = '11'; const String kGatewayTypeBancontact = '12'; const String kGatewayTypeIDeal = '13'; +const String kGatewayTypeGiropay = '14'; +const String kGatewayTypePrzelewy24 = '15'; const kGatewayTypes = { kGatewayTypeCreditCard: 'credit_card', diff --git a/lib/ui/invoice/invoice_pdf.dart b/lib/ui/invoice/invoice_pdf.dart index 57668193b..9f31b3cbd 100644 --- a/lib/ui/invoice/invoice_pdf.dart +++ b/lib/ui/invoice/invoice_pdf.dart @@ -324,9 +324,7 @@ Future _loadPDF( } else { final invitation = invoice.invitations.first; final url = invitation.downloadLink; - final client = http.Client(); - response = await client.get(Uri.parse(url)); - client.close(); + response = await WebClient().get(url, '', rawResponse: true); } if (response.statusCode >= 400) {