Skip to content

[camerax] Remove references of initial UseCase target rotations/flash mode & expose getters for current target rotations/flash mode #140664

Closed

Description

@camsim99

Currently, the camera_android_camerax plugin wraps UseCases and fields for their initial target rotations and flash modes, e.g. https://github.com/flutter/packages/blob/36a7b99381f85e86914e82c75fc7d9038ed96cca/packages/camera/camera_android_camerax/lib/src/image_capture.dart#L51. As these UseCases are managed by the wrapped CameraX library, so are there current rotations and flash modes, so the initial target rotation and flash mode (which are literally targets and may not be achievable by CameraX) are irrelevant and should not be referenced for determining the current rotation or flash mode.

The initial target rotation and flash mode should not be saved since it should never be referenced beyond the UseCase constructors and instead, getters for the flash mode and target rotation of the UseCase like https://developer.android.com/reference/androidx/camera/core/ImageCapture#getTargetRotation(), for example, should be exposed.

Activity

  1. added
    packageflutter/packages repository. See also p: labels.
    P2Important issues not at the top of the work list
    team-androidOwned by Android platform team
    triaged-androidTriaged by Android platform team
    on Dec 27, 2023
  2. self-assigned this
    on Dec 27, 2023
  3. Muakd commented on Dec 27, 2023

    @Muakd
  4. Muakd commented on Dec 27, 2023

    @Muakd
  5. removed their assignment
    on Jan 31, 2024
  6. moved this to [Non-blocking] Issues in Deprecating camera_androidon Jul 11, 2025
  7. camsim99 commented on Aug 27, 2025

    @camsim99
    ContributorAuthor

    This issue is no longer relevant as the plugin now uses ProxyAPIs.

  8. moved this from [Non-blocking] Issues to Done in Deprecating camera_androidon Aug 27, 2025
  9. github-actions commented on Sep 10, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.team-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions