I would like to use a placeholder image file that I've added to my code as "assets/placeholder.png"
, but I'm getting a File not found error. This is how I'm doing it from the dartlang documentation...
var bytes = await new File('assets/placeholder.png').readAsBytes();
String base64 = CryptoUtils.bytesToBase64(bytes);
The bytes
variable errors every time. How can I save the bytes of a locally saved image file?