imageToBytes method

Future<Uint8List> imageToBytes(
  1. String imageUrl
)

Implementation

Future<Uint8List> imageToBytes(String imageUrl) async {
  var response = await _dio?.get(imageUrl,
      options: Options(responseType: ResponseType.bytes));
  return Uint8List.fromList(response?.data);
}