downloadImage method
Implementation
Future<dynamic> downloadImage(String url, String localPath) async {
File(localPath).createSync(recursive: true);
File file = File(localPath);
var bytes = await _getImageBytes(url);
await file.writeAsBytes(bytes);
return bytes;
}