Skip to content

[camera] CameraLensType not exported from package #171433

@LowLevelSubmarine

Description

@LowLevelSubmarine

What package does this bug report belong to?

camera

What target platforms are you seeing this bug on?

Platform-Independent

Have you already upgraded your packages?

Yes

Dependency versions

Occurring on latest version 0.11.1

Steps to reproduce

  1. Import the package using import 'package:camera/camera.dart';.
  2. Try to filter the availableCameras() by LensType
  3. Can't filter by lens type because of missing export of CameraLensType

Expected results

No analysis errors

Actual results

Analysis error:

Undefined name 'CameraLensType'.
Try correcting the name to one that is defined, or defining the name.

Code sample

Camera selection could look like this:

cameras.firstWhere(
  (camera) => camera.lensDirection == CameraLensDirection.back && camera.lensType == CameraLensType.wide,
);

With this default import:

import 'package:camera/camera.dart';

Screenshots or Videos

No response

Logs

No response

Flutter Doctor output

Not relevant for this issue

Metadata

Metadata

Labels

P2Important issues not at the top of the work listgood first issueRelatively approachable for first-time contributorsp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions