Skip to content

Allow an embedded Flutter View on Android to size itself #149033

@jiahaog

Description

@jiahaog

This is like #134501 and #169147, but for Android.

A use case for addtoapp would be to embed Flutter into a native scrollable of some sort. Consider the following:

image

At this time, on mobile platforms, the size of the Flutter view must be fixed in the embedding. This reduces the design space for the embedded Flutter app.

<LinearLayout
  android:id="@+id/flutter_view_container"
  android:layout_width="match_parent"
  android:layout_height="500dp" />

Instead, we want to be able to set wrap_content:

<LinearLayout
  android:id="@+id/flutter_view_container"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"/>

See b/342534475 for more internal context.

cc @xster

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttercustomer: thoughts (g3)engineflutter/engine related. See also e: labels.team-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions