Hi all, is there a way we can change the theme at runtime so that I can change colors according to the theme selected. Please let me know if this is possible.
Thanks
Hmm, that is a great question.
To be honest, I don’t think so, since all the themes are generated by sass at build time.
Hmm, hope we get this in future
How about this? Is it possible to apply in changing default theme and dark theme?
dynamic change theme in runtime
I believe it will very encourage the user who use ionic to change different themes in app.
As per the link here we can use dark theme in ionic2 by importing the specific scss file . As far as I understand, this can only be done at build time.
It would be nice to have an ability to switch themes programmatically . Is that possible now ?
Ionic 2 has the option to use a dark theme.
However, it is not clear to me that there is a way to switch/toggle between the dark theme and the default theme as the app is running.
One could I suppose attempt to set a class on the body tag, dynamically change the class, and have a bunch of css overrides. But that seems like fighting against the framework rather than working with it. Is this the only option?
Let say I have an iphone, the app will start with the ios theme by default.
If I want to switch to the “md” theme, what would be the function to do it, if any? I did not find anything on “Config”
Thanks
What if we want to allow a user to toggle between the dark and standard themes while running the app? Is resorting to custom css overrides the only way?