You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MacosThemeData class does not implement value equality as ThemeData from the Material package does.
This causes _InheritedMacosTheme.updateShouldNotify to return true on every widget tree rebuild if, for example, the light theme and dark theme are instantiated the way they are in the MacosUI sample project.
class _InheritedMacosTheme extends InheritedWidget {
// ignore: use_super_parameters
const _InheritedMacosTheme({
Key? key,
required this.theme,
required super.child,
}) : super(key: key);
final MacosTheme theme;
/// Will always return true when MacosThemeData objects are instantiated inline in MyApp example below
@override
bool updateShouldNotify(_InheritedMacosTheme old) =>
theme.data != old.theme.data;
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MacosApp(
theme: MacosThemeData.light(),
darkTheme: MacosThemeData.dark(),
themeMode: ThemeMode.system,
);
}
}
The
MacosThemeData
class does not implement value equality asThemeData
from the Material package does.This causes
_InheritedMacosTheme.updateShouldNotify
to return true on every widget tree rebuild if, for example, the light theme and dark theme are instantiated the way they are in the MacosUI sample project.Steps To Reproduce
See superlistapp/super_editor#1568
The text was updated successfully, but these errors were encountered: