Future<String> imageToBase64(String imagePath) async { File file = File(imagePath); List<int> imageBytes = await file.readAsBytes(); String base64Image = base64Encode(imageBytes); return base64Image; }