An import migration looks small until a dependency accepts a theme class from the old library. Your own screen may use the new package while the dependency still expects a different type with the same familiar name.
That is the useful lens for Flutter 3.50's design-library transition: review the boundaries between packages as carefully as the imports inside your application. Our earlier article explained why the libraries moved. This guide proposes a migration workflow for an existing app.
Know what changed in this release
Flutter 3.47 introduced the standalone packages. Flutter 3.50 formally deprecates the SDK Material and Cupertino libraries, and newly generated apps use the standalone Material package. Deprecation is a migration signal; it should not be described as removal. See the release announcement.
The official migration guide documents the automated fix, new imports, localization setup and bridge limitations. Keep that page open while reviewing the changes.
Make a dependency map before editing
Start with the widgets that cross package boundaries. A package that builds its own internal button has a different relationship to your app from a package that accepts your TextTheme as a public argument.
I suggest maintaining a small migration note:
| Dependency | Boundary to inspect | Evidence needed |
|---|---|---|
| Internal design system | Exported widget and theme types | A migrated example app compiles |
| Third-party navigation UI | Theme and builder parameters | Its documented compatible release |
| Form package | Field decoration and localization | A representative form behaves correctly |
| Reporting or chart package | Tooltips and overlays | Theme and text direction match the app |
This is an audit method, not a claim that every package in these categories is affected. Inspect the versions your app actually resolves.
Include internal packages in a monorepo. Searching only the main app can miss a shared library that re-exports an old import to every feature.
Apply the focused migration
Create a checkpoint, then run the documented fix:
dart fix --apply --code=migrate_design_widgets
Add either dependency if the fix did not add it and the application needs it:
flutter pub add material_ui
flutter pub add cupertino_ui
Review the resulting imports rather than blindly replacing every occurrence of package:flutter/. The relevant new imports are:
import 'package:material_ui/material_ui.dart';
import 'package:cupertino_ui/cupertino_ui.dart';
Run analysis before making visual changes. Compiler failures are easier to interpret while the migration remains limited to dependency and import changes.
For each error, find the declaration of the expected type and the declaration of the supplied type. If their libraries differ, a cast is unlikely to be a sound architectural fix. Resolve the dependency boundary instead.
Use the bridge for the problem it solves
The guide's MaterialUiCompatibilityBridge supplies legacy theme and localization context to unmigrated descendants. It does not convert incompatible public API types between the old and new libraries.
Use that distinction to sort migration problems. If a dependency reads inherited theme data, inspect whether the bridge is appropriate. If its constructor requires an old-library theme type that your app now creates from the new package, look for a migrated dependency release or update the internal package.
Keep a record of why a bridge remains in the tree and which dependency still needs it. That gives future maintenance work a concrete removal condition. Avoid treating it as permanent infrastructure with no owner.
Test localization as behavior
The migration guide moves design localizations into the standalone packages and shows GlobalMaterialLocalizations.delegates for Material apps. Review your generated diff against that guidance, particularly if your application previously assembled delegates manually.
For verification, choose a small set of flows with language-dependent behavior: a date picker, a validation message, a dialog action row and a text field with selection controls. Repeat them in a right-to-left locale and with a larger text setting.
Look for more than translated labels. Check alignment, reading order, truncation and whether a dialog still offers a reachable action. These are proposed acceptance checks; this article does not claim that every application will regress in these areas.
Separate the migration from a redesign
It is tempting to refresh colors and spacing while touching theme files. Keeping that work separate makes visual review more useful: an unexpected difference is easier to investigate when a redesign was not part of the change.
Capture a baseline for the flows your users rely on, then repeat those flows after migration. Explain any golden-image updates in terms of intended behavior. A large replacement of snapshots without inspection can hide the very incompatibilities the review is supposed to catch.
For package maintainers, treat the exported API as part of the release contract. The official guide calls migration to the new design-library types a breaking change for consumers. Test a consuming example, document the required dependency change and publish with an appropriate version boundary.
The migration is complete when your application and its package boundaries agree on the libraries they use, the important flows work, and every temporary bridge has a documented reason to remain.
Next, see the web deployment guide for another 3.50 change worth rolling out independently.