Skip to content

Camera: Incompatible version 0.9.4+12 #98660

@lauroboeni

Description

@lauroboeni

It seems that the version 0.9.4+12 of the camera package is not compatible with older ones.

I used to have camera: ^0.9.4+5 in my pubspec.yaml and during building, I get the following error:

../programs/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.9.4+12/lib/src/camera_controller.dart:813:15: Error: The argument type 'Future<void>?' can't be assigned to the parameter type 'Future<void>' because 'Future<void>?' is nullable and 'Future<void>' isn't.
 - 'Future' is from 'dart:async'.
    unawaited(_deviceOrientationSubscription?.cancel());

However, when I change the version of the package to camera: 0.9.4+11, there is no error and the build is successful.

My flutter doctor:

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19043.1526], locale de-CH)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[√] Chrome - develop for the web
[!] Android Studio (version 4.0)
    X Unable to determine bundled Java version.
[√] Android Studio (version 2020.3)
[√] VS Code, 64-bit edition (version 1.63.2)
[√] Connected device (3 available)

! Doctor found issues in 1 category.

Metadata

Metadata

Labels

P2Important issues not at the top of the work listc: regressionIt was better in the past than it is nowp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions