getFavicon method

Future<Uint8List> getFavicon({
  1. required String url,
})

Get Favicon

Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.

Implementation

Future<Uint8List> getFavicon({required String url}) async {
  const String path = '/avatars/favicon';

  final Map<String, dynamic> params = {
    'url': url,
    'project': client.config['project'],
  };

  final res = await client.call(HttpMethod.get,
      path: path, params: params, responseType: ResponseType.bytes);
  return res.data;
}