Skip to content

Instantly share code, notes, and snippets.

@Sprajapati123
Created June 18, 2026 13:44
Show Gist options
  • Select an option

  • Save Sprajapati123/7e287ac57e7427c7d07d6aa4c82023dc to your computer and use it in GitHub Desktop.

Select an option

Save Sprajapati123/7e287ac57e7427c7d07d6aa4c82023dc to your computer and use it in GitHub Desktop.
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