dynamic_theme
dynamic_theme copied to clipboard
Issue #63
Fix #63
- Changed version number to
2.0.0 - Migration to null-safety (Fix #62, Fix #60, Fix #59)
- Now use the
ThemeModeinstead ofBrightness(Fix #49). ThemedWidgetBuilder themedWidgetBuildertakes now the following parameters:BuildContext, ThemeMode, ThemeData.dataparameter is now optional and has the typeThemeDataWithThemeModeBuilder.defaultBrightnessbecamedefaultThemeModeand use by defaultThemeMode.system.loadBrightnessOnStartbecameloadThemeOnStart.- import
package:dynamic_theme/dynamic_theme.dartfor bothDynamicThemeandBrightnessSwitcherDialog.
Nice work Guillaume!
I'm trying to install your fork, but I have this error:
Because every version of dynamic_theme from git depends on shared_preferences >=2.0.8 which requires SDK version >=2.14.0 <3.0.0, dynamic_theme from git is forbidden.
My company project has Dart >=2.12.
Could you downgrade shared_preferences to 2.0.7?
I suggest you to make another version of this package that supports Dart >=2.14
Hi @guillempuche,
I've changed the dependency from shared_preferences: ^2.0.9 to shared_preferences: ">=2.0.0 <3.0.0" which should fix your issue. Note that you can also use dependency_overrides in your pubspec.yaml to force the use of a specific version of shared_preferences:
dependencies:
# my dependencies
dependency_overrides:
shared_preferences: 2.0.7
Thanks a lot for sharing your knowledge, Guillaume!
@Norbert515, could you update the package?
@Norbert515, could you merge this, please?
+1 @Norbert515