Flutter's UI Decoupling: The 184-File Split That Took Seven Years
Flutter apps that target only iOS have been shipping with 182 unnecessary Material files, inflating binary size and complicating updates to either design system. The decoupling lets the Flutter team iterate Material 3 Expressive and iOS 26 Liquid Glass independently, and it removes a structural disadvantage against Compose Multiplatform's modular architecture.
A seven-year architectural decision to bundle Material Design and Cupertino directly into the Flutter framework is now being unwound. The 2026 release of `material_ui` and `cupertino_ui` as standalone packages marks the first concrete step in a three-phase plan to let apps pull in only the design system they need. Source-level analysis of the 0.0.2 packages shows the migration is still in an intermediate state: `material_ui` retains a runtime dependency on `cupertino_ui`, and `ThemeData` still carries a `cupertinoOverrideTheme` parameter alongside 29 deprecation annotations.
The core problem was a tree-shaking loop. A pure Cupertino app's import of `cupertino.dart` would trigger a chain that forced the entire Material library—182 files, larger than the rendering, painting, foundation, and gestures layers combined—into the final binary. Two earlier decoupling attempts failed in CI during 2023 and 2024. The current approach re-exports `package:flutter/widgets.dart` from both new packages, meaning most apps can migrate by changing a single import statement. The localization system has been moved but not yet split, and a speculated `BasicThemeData` base class does not exist in the shipped code.
The asymmetry of the dependency—Material needs Cupertino at runtime but not vice versa—reveals that the coupling was never mutual; it was Material's design that absorbed iOS-specific concerns into its own API surface.
Shipping 29 deprecations in a 0.0.2 release signals that the Flutter team is using the package boundary as a forcing function to clean up a decade of accumulated API surface, not just to move files.
The re-export of `widgets.dart` is a clever compatibility shim, but it also means the new packages are not truly independent; they still lean on the framework's widget layer as a shared foundation.
External pressure from Compose Multiplatform and simultaneous major updates to both Material and iOS design languages created a window where the cost of inaction finally exceeded the cost of the migration.
The TODO comment referencing a Flutter team engineer by name in a public package file is a small but telling sign that this is still an internal migration in progress, not a finished product.