Migration to Flutter Guide
Discover our battle-tested 21-step framework for a smooth and successful migration to Flutter!
Home
Glossary

Flutter GPU

What is Flutter GPU?

Flutter GPU is a low-level graphics API that ships with Flutter (the flutter_gpu library, pulled in via sdk: flutter). It lets you build custom 2D and 3D renderers from scratch in pure Dart plus GLSL shaders, talking almost directly to the GPU. It's currently experimental and does not yet guarantee API stability.

It is built on Impeller, the same hardware-abstraction layer that renders Flutter's own UI, so it reuses Flutter's existing graphics stack rather than bolting on a second one. The output of your renderer composites natively into the normal Flutter widget tree.

How does it work?

You write shaders in GLSL. At build time they're compiled ahead-of-time by Impeller's shader compiler (impellerc) into a shader bundle asset, with reflection metadata generated so the runtime can lay out vertex attributes and uniforms for you. At runtime you use Dart to create GPU resources (device buffers, textures, pipelines), record commands into a command buffer (render passes, draw calls, blits), and submit them.

Your rendering target becomes a ui.Image, which you draw with Flutter's normal Canvas/widget system. So a 3D scene, a custom shader effect, or a bespoke 2D renderer sits inside an ordinary Flutter app with no platform channels, no FFI, and no native code.

When to use it?

Reach for Flutter GPU when Flutter's built-in widgets and the FragmentShader API aren't enough: Custom 3D rendering, large particle systems, custom material/lighting models, data visualization that needs raw vertex throughput, or any effect that needs fine-grained control over GPU pipelines and buffers.

Most app developers won't use Flutter GPU directly. The common path is a higher-level package built on top of it, such as Flutter Scene for 3D. Use Flutter GPU directly when you're building that kind of renderer or library, or when you need control a higher-level package doesn't expose.

Key traits

  • Pure Dart + GLSL. Build a renderer without dropping into platform-native code, FFI, or a webview.
  • First-party and cross-platform. It's part of the Flutter SDK and runs on the platforms where Impeller is available (iOS, Android, macOS; desktop support tracks Impeller). It does not currently run on web.
  • Low-friction by design. Ahead-of-time shader reflection, automatic GPU synchronization (no manual fences/barriers/semaphores), and automatic pipeline/resource caching remove most of the boilerplate you'd hit in Vulkan or Metal.
  • Integrated with Flutter's asset pipeline, including shader hot reload during development.

Limitations

  • Experimental status; API may change, and it's currently recommended to track Flutter's master channel when using this feature in order to access the latest bug fixes and features.
  • Requires Impeller; not currently available on web.
  • Steep learning curve, it's a genuine low-level graphics API and assumes shader and rasterizer knowledge.

Learn more

Complex Animations in Flutter

Complex Animations in Flutter

Flutter ships with plenty of high-quality widgets, layouts, and themes that developers can use to speed up the whole creation process. A great example of custom widgets made in Flutter is the Placement Wheel developed for one of our clients. See how to do it.

12 Flutter & Dart Code Hacks
by LeanCode

12 Flutter & Dart Code Hacks & Best Practices – How to Write Better Code?

In this article, we’re sharing LeanCode’s 12 practical Flutter and Dart patterns that help you write less boilerplate, make your code cleaner, and catch mistakes earlier. Apply these patterns and you'll find yourself coding faster, communicating more clearly with your teammates, and spending less time debugging issues that the compiler could have caught.