packages icon indicating copy to clipboard operation
packages copied to clipboard

[camera] Add `isDisposed` getter to `CameraController`

Open Dampfwalze opened this issue 5 months ago • 5 comments

Add isDisposed getter to CameraController

Solves https://github.com/flutter/flutter/issues/141513

Pre-launch Checklist

  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [x] I read the Tree Hygiene wiki page, which explains my responsibilities.
  • [x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • [x] I signed the CLA.
  • [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • [x] I listed at least one issue that this PR fixes in the description above.
  • [x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • [x] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • [x] I updated/added relevant documentation (doc comments with ///).
  • [x] I added new tests to check the change I am making, or this PR is test-exempt.
  • [x] All existing and new tests are passing.

Dampfwalze avatar Jan 13 '24 19:01 Dampfwalze

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

flutter-dashboard[bot] avatar Jan 13 '24 19:01 flutter-dashboard[bot]

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jan 13 '24 19:01 google-cla[bot]

I am sorry, while editing it magicaly submitted by itself. I wasn't done...

Dampfwalze avatar Jan 13 '24 19:01 Dampfwalze

@Dampfwalze Is this ready for review? From the comments above it's not clear.

stuartmorgan avatar Mar 05 '24 20:03 stuartmorgan

Yes, it is ready for review. Sorry, I messed up a bit.

Dampfwalze avatar Mar 05 '24 23:03 Dampfwalze

My understanding is that historically we have deliberately avoided adding public isDisposed methods to classes in Flutter, because an object shouldn't be disposed until it's no longer being referenced. I would strongly prefer we not be inconsistent with Flutter patterns.

The linked issue requested further clarification of why you needed this, and it timed out without any response on this question. Please file a new issue further explaining (with detailed code samples) why you can't just null out your references to the object.

stuartmorgan avatar Mar 13 '24 18:03 stuartmorgan

The linked issue requested further clarification of why you needed this, and it timed out without any response on this question. Please file a new issue further explaining (with detailed code samples) why you can't just null out your references to the object.

Absent an answer to this question, this is not something we would move forward with; closing.

stuartmorgan avatar Apr 30 '24 19:04 stuartmorgan