public static void LoadTheme(MaterialColor theme = null) { MaterialColor.SetOnCurrentResourceThemeColor(theme); var service = DependencyService.Get <IStatusBar>(); service?.SetStatusBarColor(ThemeColors.PrimaryDark); }
//public static MaterialColor Style { get; private set; } public static void LoadTheme(MaterialColor theme = null) { var themeOrRandom = theme ?? MaterialColor.GetRandom(); //App.Style = themeOrRandom; MaterialColor.SetOnCurrentResourceThemeColor(themeOrRandom); var service = DependencyService.Get <IStatusBar>(); service?.SetStatusBarColor(themeOrRandom.Primary); //var service = DependencyService.Get<IStatusBar>(); //service?.SetStatusBarColor(ThemeColors.BackgroundPage); }