Changing themes
Learning objectives
- You know how to change the theme of a running application.
Changing the theme within an application is also straightforward. Having already learned about state management, we can store a ThemeData
object into a provider, and create an application that uses the ThemeData
object. The following example outlines the basic building blocks for this, although the actual functionality for changing the theme on the fly is not implemented.
If you feel that it has been a while since last working with state management, it might be a good idea to go back and review the part on State management with Riverpod before working on the next assignment.