Skip to content

Conversation

@TomerPacific
Copy link
Contributor

@TomerPacific TomerPacific commented Oct 12, 2025

Brief Summary of Changes

This pull request refactors both the image and video components to require an explicit Cloudinary instance, removing implicit dependency on the global CloudinaryContext. This change improves code clarity and testability by making dependencies explicit. The test code is also updated to reflect these changes.

Dependency Injection Refactor

  • The constructors for both CldImageWidget (lib/image/cld_image.dart) and CldVideoController (lib/video/cld_video_controller.dart) now require a Cloudinary instance to be passed explicitly, instead of optionally falling back to a global singleton.
  • All internal usages of cloudinary in these classes now assume it is non-null and directly reference its properties, removing fallback logic and null checks.

Test Updates

  • The test file test/cld_video_controller_test.dart is updated to create and configure a local Cloudinary instance instead of using the global CloudinaryContext, and all test usages of CldVideoController are updated to pass this instance explicitly.

Cleanup

  • Unused imports of cloudinary_context.dart are removed from both the image and video Dart files, as well as from the test file.

What does this PR address?

Are tests included?

  • Yes
  • No

Reviewer, please note:

Since we don't want to rely on CloudinaryContext internally anymore, as it is deprecated, I made the Cloudinary argument required.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I ran the full test suite before pushing the changes and all the tests pass.

tests

… required instead of optional and removing the usage of cloudinary context
… required instead of optional and removing the usage of cloudinary context
@TomerPacific
Copy link
Contributor Author

@adimiz1 / @tommyg-cld / @michalkcloudinay, can you please review this PR?

@skalahasti-cloudinary
Copy link

Hi @TomerPacific ,

Thanks for the PR. Our team will review the request and take necessary action accordingly.

Thanks,
Sree

@TomerPacific
Copy link
Contributor Author

@adimiz1 - Can you review this PR?

@TomerPacific
Copy link
Contributor Author

TomerPacific commented Oct 21, 2025

@adimiz1 / @skalahasti-cloudinary - Can anyone review this PR or at least add the hacktoberfest-accepted label?

@skalahasti-cloudinary
Copy link

Hi @TomerPacific ,

Sorry for the delay. I have sent this over to Adi to look into this further.

Thanks,
Sree

@TomerPacific
Copy link
Contributor Author

@skalahasti-cloudinary - Thanks, any chance you can add the hacktoberfest-accepted label?
I also have opened this PR -> #40

@TomerPacific
Copy link
Contributor Author

@adimiz1 / @skalahasti-cloudinary - Four days till hacktoberfest ends. When will you have time to review this? It has been open for more than two weeks.

@TomerPacific
Copy link
Contributor Author

@adimiz1 - Last chance...

@devpatocld
Copy link

Thank you for your contribution to Hacktoberfest! As a token of our thanks, we at Cloudinary have emailed you with instructions on how to claim your bespoke 2025 swag pack @TomerPacific

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants