Skip to content

Instantly share code, notes, and snippets.

@leonardopinho
Last active March 30, 2020 17:48
Show Gist options
  • Save leonardopinho/62086dd3960d37498c0369a89de68491 to your computer and use it in GitHub Desktop.
Save leonardopinho/62086dd3960d37498c0369a89de68491 to your computer and use it in GitHub Desktop.
static Future<Uint8List> convertToUint8List({@required String url}) async {
Uint8List result;
try {
Response response = await client.get(url);
result = response.bodyBytes;
} on Exception catch (e) {
Helper.log(e);
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment