Skip to content

Commit

Permalink
fix fetching qrcodes izly
Browse files Browse the repository at this point in the history
  • Loading branch information
hatch01 committed Mar 7, 2024
1 parent 455f41a commit c6f7b69
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/izlyclient/lib/src/izlyclient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ class IzlyClient {
assert(n < 4);
var r = await RequestsPlus.post("$_baseUrl/Home/CreateQrCodeImg",
body: {
'nbrOfQrCode': n.toString(),
'numberOfQrCodes': n.toString(),
},
corsProxyUrl: _corsProxyUrl);
List<Uint8List> result = [];
for (var i in jsonDecode(r.body)) {
result.add(base64Decode(i['Src'].split("base64,").last));
}
List<Uint8List> result = jsonDecode(r.body).map<Uint8List>((e) {
return base64Decode(e);
}).toList();
return result;
}

Expand Down

0 comments on commit c6f7b69

Please sign in to comment.