pub trait ThemeFn<State, Theme> {
// Required method
fn theme(&self, state: &State) -> Option<Theme>;
}Expand description
The theme logic of some Application.
Any implementors of this trait can be provided as an argument to
Application::theme.
iced provides two implementors:
- the built-in
Themeitself - and any
Fn(&State) -> impl Into<Option<Theme>>.
Required Methods§
Sourcefn theme(&self, state: &State) -> Option<Theme>
fn theme(&self, state: &State) -> Option<Theme>
Returns the theme of the Application for the current state.
If None is returned, iced will try to use a theme that
matches the system color scheme.