Skip to content

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

@camsim99

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.

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

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions