Flutter Explained: Render Native Controls in Flutter

Tomic Riedel
6 min readMay 27, 2024
Icon by flaticon

Flutter draws content onto a texture and its widget tree is self-contained. Because of that, there is no opportunity for Android or iOS views to be part of Flutter’s internal structure or to be rendered alongside Flutter widgets. This challenges developers who want to integrate existing platform components, like a browser control, into their Flutter applications.

Luckily, there is a solution in Flutter.

Platform view widgets.

These widgets allow you to embed this into your own Flutter app.

There are two platform view widgets available: AndroidView and UIKitView.

In today’s article, we will look at how we can integrate these views into our Flutter widget tree.

How Platform Views work and when to use them

Each widget functions as a bridge to the underlying operating system. For example, on Android, the AndroidView widget performs several key roles: it copies the graphic texture from the native view. It integrates it into Flutter by displaying it on a Flutter-rendered surface each time a frame is painted. Additionally, it manages hit testing and input gestures, translating these into the appropriate native inputs. It also builds a version of the accessibility tree, enabling the…

--

--

Tomic Riedel

Sharing the process of building a portfolio of apps to make people more productive.