Flutter's UI Decoupling: The 184-File Split That Took Seven Years
In July 2026, Flutter officially released the
material_uiandcupertino_uipackages (version 0.0.2, unlisted) on pub.dev, marking the substantive phase of the largest architectural change in Flutter's history.This article is the first in a series. All analyses can be verified through the real source code under
doc/ref/:
- Old Framework:
flutter/lib/src/material/(184 files) +flutter/lib/src/cupertino/(52 files)- New Packages:
material_ui-0.0.2/lib/src/(186 files) +cupertino_ui-0.0.2/lib/src/(~54 files)
1. It All Started with a Reasonable Decision
In May 2017, at Google I/O, the first alpha version of Flutter was officially unveiled. Its core selling point was "one codebase, two platforms". To help developers get started quickly, the Flutter team made a decision that seemed completely reasonable at the time: bundling the Material Design and Cupertino design systems directly into the core flutter package.
import 'package:flutter/material.dart'; // One import, the whole Material family
import 'package:flutter/cupertino.dart'; // iOS style is also in the same package
The complete historical background of this decision is as follows:
timeline
title Flutter and the Development of Design Languages
2014 : Google releases Material Design
2015 : Flutter project starts (codename "Sky", Android only)
2016 : Flutter renamed, no longer called Sky
2017 : Flutter alpha released, bundled with Material Design
2018 : Flutter 1.0 released, Cupertino added as a first-class citizen
2021 : Material You / Material 3 released
2024 : Material 3 Expressive + iOS 26 Liquid Glass previewed
2025 : Flutter officially announces UI decoupling roadmap
2026 : material_ui 0.0.2 and cupertino_ui 0.0.2 released
In 2015, Flutter was still called "Sky" and only ran on Android. Material Design was a brand-new design language Google had just launched in 2014. The Flutter team's core logic at the time was clear:
- Lower the barrier: Developers only needed one
importto get all UI capabilities. - Reduce fragmentation: A unified design language meant all Flutter apps looked "like Flutter apps".
- Speed up iteration: No need to deal with infrastructure issues like cross-package dependencies and version coordination—pub.dev wasn't even mature yet in 2015.
When Flutter 1.0 was released in 2018, the Cupertino library was added as a "first-class citizen". But by then, the architecture was already set—Material and Cupertino shared the same InheritedWidget theme propagation mechanism, the same localization framework, and the same testing infrastructure. To separate them now meant touching the bones.
In the words of Flutter co-founder Ian Hickson: "We optimized for developer ergonomics at the cost of architectural purity."
This trade-off was reasonable for the first five years. But by the seventh year, the interest began to eat into the principal.
2. What Does Tight Coupling Really Mean? (Source-Code-Level Analysis)
2.1 Layer-by-Layer Statistics of the Entire Framework
Counting the number of dart files in each layer under the old framework source code doc/ref/flutter/lib/src/:
# You can verify directly in the doc/ref/ directory
ls flutter/lib/src/material/ | wc -l # 182
ls flutter/lib/src/cupertino/ | wc -l # 52
ls flutter/lib/src/widgets/ | wc -l # 186
ls flutter/lib/src/rendering/ | wc -l # 48
| Layer | Path | File Count | Percentage |
|---|---|---|---|
| widgets | flutter/lib/src/widgets/ |
186 | 25.5% |
| material | flutter/lib/src/material/ |
182 | 24.9% |
| cupertino | flutter/lib/src/cupertino/ |
52 | 7.1% |
| services | flutter/lib/src/services/ |
52 | 7.1% |
| rendering | flutter/lib/src/rendering/ |
48 | 6.6% |
| painting | flutter/lib/src/painting/ |
48 | 6.6% |
| foundation | flutter/lib/src/foundation/ |
42 | 5.7% |
| gestures | flutter/lib/src/gestures/ |
27 | 3.7% |
| Others | animation, physics, semantics, etc. | 26 | 3.6% |
A few noteworthy numbers:
material(182 files) andwidgets(186 files) are almost the same size—the design system's code volume is comparable to the entire widget layer.materialis 3.5 times the size ofcupertino—an app using only Cupertino still has 182 Material files pulled into its build.material+cupertino= 234 files, accounting for 32% of the framework's total UI code.materialhas more files thanrendering+painting+foundation+gesturescombined (165 files).
This ratio means: nearly one-third of the framework's code is design system code, which should have been introduced on demand.
2.2 Seeing the Concrete Coupling Chain from Source Code
In the old framework, the coupling between Material and Cupertino is not an abstract concept but is solidly written into every line of import. By comparing the diffs between the old and new source code, we can precisely see every coupling point.
Coupling Point 1: Direct reference to Cupertino types in theme_data.dart
--- a/flutter/lib/src/material/theme_data.dart (Old Framework)
+++ b/material_ui-0.0.2/lib/src/theme_data.dart (New Package)
- import 'package:flutter/cupertino.dart';
+ import 'package:cupertino_ui/cupertino_ui.dart';
This import is a runtime dependency—the material_ui package needs the cupertino_ui package at runtime to work. The reason is hidden in the constructor of the ThemeData class:
// material_ui-0.0.2/lib/src/theme_data.dart (Real source code, around line 88)
class ThemeData with Diagnosticable {
// Constructor parameter directly references a Cupertino type
final NoDefaultCupertinoThemeData? cupertinoOverrideTheme;
// Factory method: generates ThemeData from a Cupertino theme style
factory ThemeData.cupertino() {
return ThemeData(
cupertinoOverrideTheme: const CupertinoThemeData(
brightness: Brightness.light,
),
// ...
);
}
}
The final NoDefaultCupertinoThemeData? cupertinoOverrideTheme; on line 88 means: even if you only use Material, the NoDefaultCupertinoThemeData symbol will still be compiled into your app along with ThemeData. Dart's tree-shaker cannot determine if this reference path is reachable—it doesn't know if cupertinoOverrideTheme will be accessed in some code path—so it must retain all related code.
Coupling Point 2: Reference to cupertino selection controls in input_decorator.dart
By searching the import statements in doc/ref/material_ui-0.0.2/lib/src/:
// material_ui-0.0.2/lib/src/input_decorator.dart (Real source code)
import 'package:cupertino_ui/cupertino_ui.dart'
show CupertinoTextSelectionControls;
The text input decorator needs to use Cupertino-style text selection controls (magnifier + selection handles) on iOS platforms. In the old framework, this was just an internal cross-directory reference; in the independent package, it becomes a cross-package reference.
Coupling Point 3: Cupertino transition animations in page_transitions_theme.dart
// material_ui-0.0.2/lib/src/theme_data.dart (Real source code, __lerp method)
// The theme interpolation function also needs to handle Cupertino themes
static ThemeData __lerp(ThemeData a, ThemeData b, double t) {
return ThemeData(
// ...
cupertinoOverrideTheme: t < 0.5
? a.cupertinoOverrideTheme
: b.cupertinoOverrideTheme,
// ...
);
}
__lerp is the linear interpolation function between ThemeData instances—when animating a transition between two themes, the Cupertino theme part also needs to be transitioned. This is another reference point that must be retained.
2.3 Asymmetric Reverse Dependency
Looking at cupertino_ui from the other side:
--- a/flutter/lib/src/cupertino/theme.dart (Old Framework)
+++ cupertino_ui-0.0.2/lib/src/theme.dart (New Package)
- /// @docImport 'package:flutter/material.dart';
+ /// @docImport 'package:material_ui/material_ui.dart';
Note that this uses @docImport—this is a documentation comment, not a code-level dependency. @docImport is only for the dartdoc tool to generate cross-package documentation links and does not affect compilation or packaging.
2.4 The Complete Chain of Tree-shaking Failure
Dart's tree-shaking algorithm starts from the main() entry point and performs static reference tracing:
The complete logic of this closed loop is:
Step 1: User's main.dart imports 'package:flutter/cupertino.dart'
→ Triggers the Flutter packager to load the cupertino module
Step 2: After the cupertino module is loaded, its theme.dart uses
@docImport 'package:flutter/material.dart'
making the packager aware that the material module is also needed
→ cupertino's documentation references Material concepts
Step 3: After material/theme_data.dart is loaded, it is found to
import 'package:flutter/cupertino.dart' (line 10)
→ material code needs cupertino's type definitions
Step 4: The cupertinoOverrideTheme parameter in the ThemeData constructor
(type NoDefaultCupertinoThemeData?) ensures that
cupertino's theme_data.dart must be fully loaded
→ A closed loop is formed, and no part can be safely removed
Final Result: In the APK of a pure Cupertino app, Material code still occupies a significant proportion.
2.5 Four Reasons Why Flutter Didn't Decouple Earlier
Since the problem is so obvious, why did it take until 2025 to start?
Reason One: It couldn't be done—the first two attempts failed.
Copying 184 Material files from the flutter framework to an independent package sounds like a mechanical operation, but the actual difficulties were:
Material to copy: 184 dart files
Cross-references: On average, each file references 3-5 files from other packages
Imports needing refactoring: approximately 600-1000
Tests needing rewriting: 200+
The first two attempts (late 2023 and mid-2024) both got stuck at the CI stage—compilation passed, but tests failed on a large scale, leading to rollbacks.
Reason Two: Infrastructure wasn't mature.
The flutter/packages monorepo only developed enough by 2024 to host these two heavyweight packages. Before that, there was no cross-package testing framework, no cross-package support for golden tests, and no automated pub.dev publishing process. Without this infrastructure, the decoupled packages could not be independently maintained.
Reason Three: External pressure wasn't strong enough.
Before 2023, Flutter didn't have a strong enough external motivation to do this. The evolution of Material 3 was relatively gentle, and Apple's design language updates were also smooth. The real turning point occurred in 2024-2025:
- Google launched Material 3 Expressive—a major upgrade to the theme system.
- Apple previewed iOS 26 Liquid Glass—requiring entirely new rendering capabilities.
- Compose Multiplatform rapidly filled out its cross-platform map, from iOS to Desktop.
The rapid iteration of two design languages plus a competitor's architectural advantage made the cost of tight coupling unacceptable.
Reason Four: The user base is too large.
By 2025, Flutter had millions of developers. Any breaking change could affect millions of people. The Flutter team needed to ensure:
- Migration tools cover over 90% of common scenarios.
- All official packages are synchronously adapted.
- Documentation, tutorials, and video courses are all updated.
This is like deciding to change tires on a race car while it's on the highway—it's not that it can't be done, but the timing is crucial.
3. The 2025 Roadmap: A Three-Phase Plan
In 2025, the official Flutter roadmap formally listed decoupling as the highest priority. The plan is divided into three phases:
As of July 27, 2026, we can verify the following facts through the real source code under doc/ref/:
| Verification Item | Real Source Code Path | Evidence |
|---|---|---|
| Old Material file count | doc/ref/flutter/lib/src/material/ |
182 files |
| New Material file count | doc/ref/material_ui-0.0.2/lib/src/ |
186 files |
| Old Cupertino file count | doc/ref/flutter/lib/src/cupertino/ |
52 files |
| New Cupertino file count | doc/ref/cupertino_ui-0.0.2/lib/src/ |
~54 files |
| import change | Old vs. new theme_data.dart line 10 |
flutter/cupertino.dart → cupertino_ui/cupertino_ui.dart |
| @Deprecated count | material_ui-0.0.2/lib/src/theme_data.dart |
29 instances |
| Runtime dependency | material_ui-0.0.2/pubspec.yaml |
cupertino_ui: ^0.0.2 ✅ |
| Reverse runtime dependency | cupertino_ui-0.0.2/pubspec.yaml |
dev_dependencies only ❌ |
// Real usage after decoupling (verified in doc/ref/material_ui-0.0.2/)
import 'package:material_ui/material_ui.dart';
// Theme.of(context) still returns ThemeData, class name hasn't changed
ThemeData theme = Theme.of(context);
ColorScheme colors = theme.colorScheme;
ElevatedButton(child: Text('Click'), onPressed: () {});
4. Seeing the Dependency Relationship from the Real pubspec.yaml
Having understood "why to decouple", we will next delve into the technical details: 184 old files vs. 186 new files, how was this code migration specifically carried out? From the 8 dependency declarations in pubspec.yaml to the 200-line export list in the entry file, from the class definition of ThemeData to the distribution of 29 @Deprecated annotations, we will dissect the solution design from all angles.
4.1 The Complete pubspec of material_ui 0.0.2
# material_ui-0.0.2/pubspec.yaml (Real source code)
name: material_ui
version: 0.0.2
description: The official Flutter Material UI Library
environment:
sdk: ^3.12.0
flutter: ">=3.44.0"
dependencies:
collection: ^1.19.1
cupertino_ui: ^0.0.2 # ★ Runtime dependency on cupertino_ui
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.20.2
material_color_utilities: ^0.13.0
vector_math: ^2.2.0
4.2 The Complete pubspec of cupertino_ui 0.0.2
# cupertino_ui-0.0.2/pubspec.yaml (Real source code)
name: cupertino_ui
version: 0.0.2
description: The official Flutter Cupertino Design Library
environment:
sdk: ^3.12.0
flutter: ">=3.44.0"
dependencies:
collection: ^1.19.1
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.20.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_goldens:
sdk: flutter
material_ui:
# TODO(justinmc): Use the pub.dev package when published.
path: ../material_ui # ★ Only depends on it in tests
4.3 Four Key Findings
Finding One: Asymmetric dependency. material_ui has a runtime dependency on cupertino_ui (declared in dependencies), while cupertino_ui only references material_ui in dev_dependencies. This is consistent with the import 'package:cupertino_ui/cupertino_ui.dart' we saw in theme_data.dart—Material code's references to Cupertino are direct and at runtime, whereas the reverse direction is only needed for testing.
This is a typical characteristic of the intermediate state of decoupling: the code has been moved to independent packages, but cross-references have not yet been completely eliminated.
Finding Two: A TODO comment reveals the future direction. There is a clear TODO in cupertino_ui:
# TODO(justinmc): Use the pub.dev package when published.
The author of this TODO, justinmc (Justin McCandless), is an engineer on the Flutter team. The comment indicates that using path: ../material_ui is a temporary solution, and when the official version is released (when the stable version of material_ui is available on pub.dev), this reference will be changed to a version number reference.
Finding Three: Both packages directly depend on the flutter SDK. The current architecture is a two-layer structure of independent packages plus the SDK.
Finding Four: SDK version locked to >=3.44.0. Flutter 3.44 is the version released at Google I/O in May 2026, which introduced better support for package renaming and conditional dependencies. This indicates that these packages are built on features of the new SDK, and older versions of Flutter may not be compatible.
4.4 The Complete Entry File of material_ui
material_ui-0.0.2/lib/material_ui.dart is the entry point of the entire package. What it does is very simple: define the library name + export all components line by line.
// material_ui/lib/material_ui.dart (Real source code, approximately 200 lines in total)
library material_ui;
export 'package:flutter/widgets.dart'; // ★ Key: re-exports widgets
export 'src/about.dart';
export 'src/about_list_tile.dart';
export 'src/action_chip.dart';
export 'src/action_sheet.dart';
export 'src/animated_icons.dart';
export 'src/app.dart'; // → MaterialApp widget
export 'src/app_bar.dart';
export 'src/app_bar_theme.dart';
export 'src/arc.dart';
export 'src/autocomplete.dart';
export 'src/back_button.dart';
export 'src/banner.dart';
export 'src/bottom_app_bar.dart';
export 'src/bottom_navigation_bar.dart';
export 'src/bottom_navigation_bar_theme.dart';
export 'src/bottom_sheet.dart';
export 'src/bottom_sheet_theme.dart';
export 'src/button.dart';
export 'src/button_bar.dart';
export 'src/button_theme.dart';
export 'src/card.dart';
export 'src/card_theme.dart';
export 'src/checkbox.dart';
export 'src/checkbox_list_tile.dart';
export 'src/chip.dart';
export 'src/chip_theme.dart';
export 'src/choice_chip.dart';
export 'src/circle_avatar.dart';
export 'src/color_scheme.dart';
export 'src/colors.dart';
export 'src/date_picker.dart';
export 'src/date_picker_theme.dart';
export 'src/dialog.dart';
export 'src/divider.dart';
export 'src/drawer.dart';
export 'src/drawer_header.dart';
export 'src/dropdown.dart';
export 'src/elevated_button.dart';
export 'src/expansion_tile.dart';
export 'src/expansion_tile_theme.dart';
export 'src/filled_button.dart';
export 'src/floating_action_button.dart';
export 'src/floating_action_button_theme.dart';
export 'src/icon_button.dart'; // → M3 Expressive variant
export 'src/input_decorator.dart';
export 'src/input_decorator_theme.dart';
export 'src/list_tile.dart';
export 'src/material_localizations.dart';
export 'src/navigation_bar.dart';
export 'src/navigation_rail.dart';
export 'src/outlined_button.dart';
export 'src/page.dart';
export 'src/radio.dart';
export 'src/radio_list_tile.dart';
export 'src/scaffold.dart';
export 'src/scrollbar.dart';
export 'src/selection_area.dart';
export 'src/slider.dart';
export 'src/slider_theme.dart';
export 'src/snack_bar.dart';
export 'src/snack_bar_theme.dart';
export 'src/switch.dart';
export 'src/switch_list_tile.dart';
export 'src/tab_bar_theme.dart';
export 'src/tabs.dart';
export 'src/text_button.dart';
export 'src/text_field.dart';
export 'src/text_form_field.dart';
export 'src/theme.dart'; // → Theme widget (InheritedWidget)
export 'src/theme_data.dart'; // → ThemeData class (Core!)
export 'src/time_picker.dart';
export 'src/time_picker_theme.dart';
export 'src/toggle_buttons.dart';
export 'src/toggle_buttons_theme.dart';
export 'src/tooltip.dart';
export 'src/tooltip_visibility.dart';
export 'src/typography.dart';
// ... approximately 140 lines of exports in total
4.5 The Complete Entry File of cupertino_ui
// cupertino_ui/lib/cupertino_ui.dart (Real source code, approximately 54 lines)
library cupertino_ui;
export 'package:flutter/widgets.dart'; // ★ Also re-exports widgets
export 'src/action_sheet.dart';
export 'src/activity_indicator.dart';
export 'src/app.dart'; // → CupertinoApp
export 'src/bottom_tab_bar.dart';
export 'src/bottom_tab_theme.dart';
export 'src/bouncing_scroll_physics.dart';
export 'src/button.dart';
export 'src/checkbox.dart';
export 'src/colors.dart';
export 'src/context_menu.dart';
export 'src/context_menu_action.dart';
export 'src/context_menu_button.dart';
export 'src/date_picker.dart';
export 'src/date_picker_theme.dart';
export 'src/dialog.dart';
export 'src/dismissible.dart';
export 'src/dynamic_color.dart';
export 'src/form_row.dart';
export 'src/icon_theme_data.dart';
export 'src/nav_bar.dart';
export 'src/nav_bar_theme.dart';
export 'src/page_scaffold.dart';
export 'src/page_transition.dart';
export 'src/picker.dart';
export 'src/refresh_control.dart';
export 'src/route.dart';
export 'src/scrollbar.dart';
export 'src/search_text_field.dart';
export 'src/section.dart';
export 'src/segmented_control.dart';
export 'src/slider.dart';
export 'src/slider_theme.dart';
export 'src/switch.dart';
export 'src/tab_scaffold.dart';
export 'src/text_field.dart';
export 'src/theme.dart'; // → CupertinoTheme + CupertinoThemeData
export 'src/thumb_painter.dart';
// ... approximately 54 lines of exports in total
4.6 The Design Intent Behind Re-exporting widgets
Both packages have export 'package:flutter/widgets.dart' as their first line. The intent of this design is clear: maintain backward compatibility.
// Before decoupling
import 'package:flutter/material.dart';
// This import simultaneously imports:
// - Everything in package:flutter/widgets.dart
// - All components in material
// After decoupling
import 'package:material_ui/material_ui.dart';
// This import also imports:
// - Everything in package:flutter/widgets.dart (because it's re-exported)
// - All components in material_ui
// The set of accessible symbols from both imports is identical
// So the following code works both before and after decoupling:
ThemeData theme = Theme.of(context);
ColorScheme colors = theme.colorScheme;
final appBar = AppBar(title: Text('Title'));
final button = ElevatedButton(child: Text('Click'), onPressed: () {});
This design means: for most applications, the migration work involves only one step—changing the import statement.
5. The Real Situation of the Theme System
5.1 ThemeData: Class Name Unchanged, Package Path Changed
The definition of ThemeData in material_ui 0.0.2:
// material_ui/lib/src/theme_data.dart (Real source code, key parts extracted)
import 'package:cupertino_ui/cupertino_ui.dart'; // Line 10
class ThemeData with Diagnosticable {
// Constructor (already has 29 @Deprecated annotations)
@Deprecated('Use ThemeData(...) with specific parameters instead.')
ThemeData({
// ... old API
});
// Cupertino theme parameter is still present
final NoDefaultCupertinoThemeData? cupertinoOverrideTheme;
// Cupertino factory method is still present
factory ThemeData.cupertino() {
return ThemeData(
cupertinoOverrideTheme: const CupertinoThemeData(
brightness: Brightness.light,
),
// ...
);
}
// M3 dynamic color system
final ColorScheme colorScheme;
final TextTheme textTheme;
final ButtonThemeData buttonTheme;
final InputDecorationTheme inputDecorationTheme;
// ... approximately 150 properties
}
Key conclusions:
- The class name is
ThemeData, notMaterialThemeData— community speculation about a "rename" is unfounded. - The
cupertinoOverrideThemeparameter is still present — the theme system has not yet been fully decoupled. - The
ThemeData.cupertino()factory method is still present — a method in a Material package that generates a Cupertino-style theme. - There are already 29
@Deprecatedannotations — the Flutter team is gradually cleaning up the old API.
5.2 The Definition of CupertinoThemeData
// cupertino_ui/lib/src/theme.dart (Real source code)
class CupertinoThemeData extends NoDefaultCupertinoThemeData with Diagnosticable {
const CupertinoThemeData({
this.brightness,
this.primaryColor,
this.primaryContrastingColor,
this.textTheme,
this.navBarTheme,
this.tabBarTheme,
this.iconTheme,
this.scaffoldBackgroundColor,
this.applyThemeToAll,
});
final Brightness? brightness;
final CupertinoColor? primaryColor;
final CupertinoColor? primaryContrastingColor;
final CupertinoTextTheme? textTheme;
final NavBarThemeData? navBarTheme;
final TabBarThemeData? tabBarTheme;
final IconThemeData? iconTheme;
final Color? scaffoldBackgroundColor;
final bool? applyThemeToAll;
}
CupertinoThemeData does not depend on any material_ui symbols. It inherits from NoDefaultCupertinoThemeData—this is a base class defined in the flutter SDK (originating from the package:flutter/cupertino.dart prototype).
5.3 Clarification on BasicThemeData
Based on the real source code of material_ui 0.0.2 and cupertino_ui 0.0.2, BasicThemeData does not exist.
The "three-layer theme architecture" (BasicThemeData → MaterialThemeData / CupertinoThemeData) mentioned in some analysis articles is speculative and has not been implemented in the current version of the code. The actual architecture is:
6. Component Completeness Analysis
By counting the export lists of material_ui 0.0.2 and cupertino_ui 0.0.2, we can evaluate the component completeness of both packages:
6.1 material_ui Component Coverage
| Category | Components (from the real export list) | Count |
|---|---|---|
| App-level | app.dart (MaterialApp) |
1 |
| Theme | theme.dart, theme_data.dart, color_scheme.dart, colors.dart, text_theme.dart, typography.dart |
6 |
| Buttons | button.dart, elevated_button.dart, text_button.dart, outlined_button.dart, filled_button.dart, icon_button.dart, button_bar.dart, floating_action_button.dart, toggle_buttons.dart |
9 |
| Inputs | text_field.dart, text_form_field.dart, input_decorator.dart, dropdown.dart, autocomplete.dart |
5 |
| Dialogs | dialog.dart, alert_dialog.dart, simple_dialog.dart, about_dialog.dart, bottom_sheet.dart, action_sheet.dart |
6 |
| Navigation | app_bar.dart, navigation_bar.dart, bottom_navigation_bar.dart, drawer.dart, navigation_rail.dart, tabs.dart |
6 |
| Lists/Cards | card.dart, list_tile.dart, chip.dart, expansion_tile.dart, data_table.dart |
5 |
| Selectors | checkbox.dart, radio.dart, switch.dart, slider.dart, date_picker.dart, time_picker.dart |
6 |
| Containers | scaffold.dart, banner.dart, card.dart, divider.dart |
4 |
| Others | snack_bar.dart, tooltip.dart, stepper.dart, progress_indicator.dart, scrollbar.dart, selection_area.dart |
6+ |
6.2 cupertino_ui Component Coverage
| Category | Components (from the real export list) | Count |
|---|---|---|
| App-level | app.dart (CupertinoApp) |
1 |
| Theme | theme.dart, colors.dart, dynamic_color.dart, icon_theme_data.dart |
4 |
| Navigation | nav_bar.dart, bottom_tab_bar.dart, tab_scaffold.dart, page_transition.dart, route.dart |
5 |
| Pages | page_scaffold.dart |
1 |
| Controls | button.dart, checkbox.dart, switch.dart, slider.dart, picker.dart, segmented_control.dart, date_picker.dart, text_field.dart, search_text_field.dart, activity_indicator.dart, refresh_control.dart |
11 |
| Dialogs | dialog.dart, action_sheet.dart, context_menu.dart |
3 |
| Others | dismissible.dart, form_row.dart, section.dart, scrollbar.dart, bouncing_scroll_physics.dart, thumb_painter.dart |
6 |
6.3 Localization System Analysis
Both packages depend on the same localization infrastructure:
// material_ui/lib/src/material_localizations.dart (Real source code)
// Localization classes are still in the material_ui package
export 'src/l10n/material_localizations.dart';
export 'src/l10n/material_localizations_en.dart'; // English
export 'src/l10n/material_localizations_zh.dart'; // Chinese
// ... other languages
// In the entry file of cupertino_ui
export 'src/cupertino_localizations.dart'; // Cupertino localization
The localization system has currently just been moved from the flutter framework into independent packages. The strings and translation files have not yet undergone substantive splitting or refactoring.
Next Article Preview
With the plan explained, in the next article we will look at the latest progress as of July 2026: What is the status of the two packages on pub.dev? What does the source code directory structure look like? When can we expect the official 1.0.0 version?
This article was written on July 27, 2026. All code references are based on the real source code of material_ui 0.0.2 and cupertino_ui 0.0.2. Verifiable at any time.
Top 3 of 4 from juejin.cn, machine-translated. The original thread is authoritative.
So which one do we use for development?
Wait for the SDK version upgrade later; this is just a preview for now.
Looking forward to the next masterpiece [rose] [lightbulb moment]
[thumbs up]