imageToByte function

Future<Uint8List> imageToByte(
  1. String path
)

Implementation

Future<Uint8List> imageToByte(String path) async {
  HttpClient httpClient = HttpClient();
  var request = await httpClient.getUrl(Uri.parse(path));
  var response = await request.close();
  Uint8List bytes = await consolidateHttpClientResponseBytes(response);
  return bytes;
}