Skip to content

Lower minimum Flutter SDK floor to 3.24.0 (real API boundary) #82

Description

@alexey-pelykh

Context

The plugin currently requires flutter: ">=3.29.2" and sdk: ^3.7.0. This was set to avoid Impeller rendering bugs (black screens on MediaTek/PowerVR GPUs) present in Flutter 3.27.x. However, a code audit shows the actual API floor is Flutter 3.24.0 (Dart 3.5).

Related:

Analysis

The plugin's hard API dependency is TextureRegistry.SurfaceProducer and TextureRegistry.SurfaceProducer.Callback, which became stable in Flutter 3.24. No Dart 3.7-only language features or Flutter 3.29-only APIs are used anywhere in the codebase.

The 3.29.2 constraint was purely about Impeller runtime behavior, not API compatibility. But Impeller's impact is version-dependent — and for most versions below 3.27, Impeller wasn't even the default on Android:

Flutter Version Impeller on Android Black Screen Risk Workaround Needed
3.24.0 – 3.26.x Not default None None
3.27.0 – 3.28.x Default (Vulkan) High on MediaTek/PowerVR Disable Impeller via manifest
3.29.0 – 3.29.1 Default with GLES fallback Low None (but crash on API < 29)
3.29.2+ Default with GLES fallback + crash fix None None

Enforcing 3.29.2 excludes users on 3.24–3.26 who would have zero issues, and users on 3.27–3.28 who have a simple workaround.

Proposed Change

environment:
  sdk: ">=3.5.0 <4.0.0"
  flutter: ">=3.24.0"

Add a README section:

Flutter 3.29.2+ is strongly recommended. Flutter 3.27–3.28 enabled Impeller by default on Android, which causes black screens on some devices (MediaTek/PowerVR GPUs). This was fixed in Flutter 3.29.0 with automatic GLES fallback (and a crash fix in 3.29.2). If you use Flutter 3.27.x–3.28.x and experience a black screen, disable Impeller:

<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />

Flutter 3.24–3.26 users are unaffected (Impeller was not default on Android).

Rationale

  • The official camera plugin enforces 3.29, but that's Google's choice with Google's support resources. A community plugin benefits more from wider adoption.
  • The Impeller issue is a Flutter engine concern, not a plugin bug. Documenting it is appropriate; enforcing it at the SDK floor is not.
  • Directly unblocks Support for Flutter version 3.27 #60 and supersedes PR (chore) flutter: downgrade to 3.27.0 #61 (which targeted 3.27.0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions