Created
June 18, 2026 13:44
-
-
Save Sprajapati123/7e287ac57e7427c7d07d6aa4c82023dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:ai38re/repo/image_repo.dart'; | |
| import 'package:cloudinary_public/cloudinary_public.dart'; | |
| class ImageRepoImpl implements ImageRepo { | |
| final cloudinary = CloudinaryPublic( | |
| "dvztiygb9", // replace with yours cloud name | |
| "projects", // replace with yours unsigned present | |
| cache: false, | |
| ); | |
| @override | |
| Future<String> uploadImage(String filePath) async { | |
| final response = await cloudinary.uploadFile( | |
| CloudinaryFile.fromFile( | |
| filePath, | |
| resourceType: CloudinaryResourceType.Image, | |
| folder: "products", | |
| ), | |
| ); | |
| return response.secureUrl; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment