ATTENTION: This space is strictly for proposing architectural evolutions or new capabilities for the Open Neom ecosystem.
馃幆 Pillar Alignment
Which pillar(s) does this feature affect?
Is your feature request related to a problem?
Flutter 3.47 introduced the official standalone material_ui package and
an opt-in migration from:
import 'package:flutter/material.dart';
to:
import 'package:material_ui/material_ui.dart';
SINT 1.6.1 still imports package:flutter/material.dart internally,
including in SintMaterialApp and other public Material-facing APIs.
After running:
dart fix --apply --code=migrate_design_widgets
an application cannot pass the new standalone Material types to
SintMaterialApp, because the old and new classes have the same names
but are different Dart types.
Minimal reproduction
dependencies:
flutter:
sdk: flutter
sint: ^1.6.1
material_ui: ^1.1.1
import 'package:flutter/widgets.dart';
import 'package:material_ui/material_ui.dart';
import 'package:sint/sint.dart';
void main() {
runApp(
SintMaterialApp(
theme: ThemeData(),
darkTheme: ThemeData.dark(),
themeMode: ThemeMode.system,
initialRoute: '/',
sintPages: [
SintPage(
name: '/',
page: () => const Scaffold(),
),
],
),
);
}
This produces type errors similar to:
The argument type 'ThemeData (material_ui)' can't be assigned to
the parameter type 'ThemeData? (flutter/material.dart)'.
The argument type 'ThemeMode (material_ui)' can't be assigned to
the parameter type 'ThemeMode (flutter/material.dart)'.
The same split affects other public SINT APIs that expose legacy
Material types, including theme context extensions and
Sint.changeTheme() / Sint.changeThemeMode().
Expected behavior
SINT should provide a documented way for applications migrated to the
standalone material_ui package to use:
SintMaterialApp;
material_ui.ThemeData;
material_ui.ThemeMode;
- context theme extensions;
- theme-changing APIs;
- Material-related navigation and overlay APIs.
Compatibility consideration
SINT currently supports Flutter >=3.22.0, while standalone
material_ui requires Flutter >=3.44.0.
Migrating SINT's public Material types directly may therefore require:
- raising the minimum Flutter version in a breaking release;
- providing a separate compatibility package or entry point, such as
sint_material_ui;
- supporting standalone Material in SINT 2.0 while maintaining the
current branch for older Flutter versions.
A coordinated plan for cupertino_ui may also be needed because SINT
currently exposes legacy Cupertino types as well.
Why MaterialUiCompatibilityBridge is insufficient
MaterialUiCompatibilityBridge can bridge inherited theme and
localization data for legacy widget subtrees, but it cannot solve
compile-time type mismatches in the SintMaterialApp constructor and
other public APIs.
Environment
- Flutter 3.47
- Dart 3.13
- SINT 1.6.1
- material_ui 1.1.1
References
ATTENTION: This space is strictly for proposing architectural evolutions or new capabilities for the Open Neom ecosystem.
馃幆 Pillar Alignment
Which pillar(s) does this feature affect?
Is your feature request related to a problem?
Flutter 3.47 introduced the official standalone
material_uipackage andan opt-in migration from:
to:
SINT 1.6.1 still imports
package:flutter/material.dartinternally,including in
SintMaterialAppand other public Material-facing APIs.After running:
an application cannot pass the new standalone Material types to
SintMaterialApp, because the old and new classes have the same namesbut are different Dart types.
Minimal reproduction
This produces type errors similar to:
The same split affects other public SINT APIs that expose legacy
Material types, including theme context extensions and
Sint.changeTheme()/Sint.changeThemeMode().Expected behavior
SINT should provide a documented way for applications migrated to the
standalone
material_uipackage to use:SintMaterialApp;material_ui.ThemeData;material_ui.ThemeMode;Compatibility consideration
SINT currently supports Flutter
>=3.22.0, while standalonematerial_uirequires Flutter>=3.44.0.Migrating SINT's public Material types directly may therefore require:
sint_material_ui;current branch for older Flutter versions.
A coordinated plan for
cupertino_uimay also be needed because SINTcurrently exposes legacy Cupertino types as well.
Why MaterialUiCompatibilityBridge is insufficient
MaterialUiCompatibilityBridgecan bridge inherited theme andlocalization data for legacy widget subtrees, but it cannot solve
compile-time type mismatches in the
SintMaterialAppconstructor andother public APIs.
Environment
References