updateToDarkMode static method
Future<void>
updateToDarkMode({
- PlayxThemeAnimation animation = const PlayxThemeAnimation.fade(),
- bool animate = true,
- bool forceUpdateNonAnimatedTheme = false,
Updates the app's theme to the first dark theme available.
You can specify an animation for the theme change using the animation parameter.
If animate is true, the theme change will be animated based on the specified animation.
If animate is false, the theme will change instantly.
Use forceUpdateNonAnimatedTheme to force a theme update without animation if animation is disabled.
Throws an Exception if no dark theme is available in the supported themes.
Implementation
static Future<void> updateToDarkMode({
PlayxThemeAnimation animation = const PlayxThemeAnimation.fade(),
bool animate = true,
bool forceUpdateNonAnimatedTheme = false,
}) {
return _controller.updateToDarkMode(
animation: animation,
animate: animate,
forceUpdateNonAnimatedTheme: forceUpdateNonAnimatedTheme,
);
}