nySetTheme method

Future<void> nySetTheme(
  1. String themeId, {
  2. bool remember = false,
})

Change the current theme.

themeId - The ID of the theme to set. remember - If true, sets this theme as the preferred theme for its type (light or dark). This is used when following system theme to remember which theme variant the user prefers.

Implementation

Future<void> nySetTheme(String themeId, {bool remember = false}) async {
  await NyThemeManager.instance.setTheme(themeId, remember: remember);
}