load static method
Loads the images bytes for given url from Giphy.
Implementation
static Future<Uint8List?> load(String? url, {Client? client}) async {
if (url == null) {
return null;
}
final response = await (client ?? Client())
.get(Uri.parse(url), headers: {'accept': 'image/*'});
if (response.statusCode == 200) {
return response.bodyBytes;
}
return null;
}