FG
📱 Mobile & Cross-PlatformGoogle

Support integrating with C/C++ in plugin framework

Freshabout 6 years ago
Mar 14, 20260 views
Confidence Score77%
77%

Problem

It would be nice to have an example of calling C/C++ code, or at least how to build native code along with a Flutter app. This may purely a Gradle question, but its not clear to someone that's not an expert on Gradle (for example, me), how to pull this off. --- Admin comment: Please see https://github.com/dart-lang/sdk/issues/34452 for current status and additional information

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence92% success rate9 verificationsLast verified Mar 14, 2026

Solution: Support integrating with C/C++ in plugin framework

Low Risk

We have heard this requirement from a couple of Google apps: - One such app wrote their own C++ libraries for operating the camera to reduce latency. These libraries are platform specific and optimized to work as quickly as possible. Invoking these libraries with the lowest possible latency is critical for such apps. Forcing them to go through PlatformChannel + JNI will not achieve that on Androi

74

Trust Score

9 verifications

92% success
  1. 1

    We have heard this requirement from a couple of Google apps:

    We have heard this requirement from a couple of Google apps:

  2. 2

    One such app wrote their own C++ libraries for operating the camera to reduce la

    - One such app wrote their own C++ libraries for operating the camera to reduce latency. These libraries are platform specific and optimized to work as quickly as possible. Invoking these libraries with the lowest possible latency is critical for such apps. Forcing them to go through PlatformChannel + JNI will not achieve that on Android.

  3. 3

    There are advanced mobile teams out there who write business logic components in

    - There are advanced mobile teams out there who write business logic components in C++ to be able to share it between their Android and iOS implementations. Flutter supporting direct integration with those libraries would further cement its position of being the best cross-platform framework out there.

  4. 4

    I don't think this is a _must have_. However, this is one area that Flutter can

    I don't think this is a _must have_. However, this is one area that Flutter can further differentiate itself from other cross-platform solutions.

Validation

Resolved in flutter/flutter GitHub issue #7053. Community reactions: 125 upvotes.

Verification Summary

Worked: 9
Partial: 2
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

flutterdartmobilec:-new-featureplatform-androidenginedependency:-dart