ContentTheme class
A theme for content-driven sites.
The theme provides colors and typography styles for a page. When no theme is provided, the default ContentColors and ContentTypography are used.
Constructors
-
ContentTheme.new({Color? primary, Color? background, Color? text, List<
ColorToken> colors = const [], FontFamily? font, FontFamily? codeFont, ContentTypography? typography}) - Creates a new theme with the provided colors, fonts and styles.
- ContentTheme.none()
-
Disables any theming and styles for the page.
constfactory
Properties
- codeFont → FontFamily?
-
The font family to use for code blocks and similar elements.
final
-
colors
→ List<
ColorToken> -
A set of color tokens for the site.
final
- font → FontFamily?
-
The font family to use for the page.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- reset → bool
-
Whether to apply a set of CSS reset styles to the page.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
styles
→ List<
StyleRule> -
no setter
- typography → ContentTypography
-
The typography styles to use for the content.
final
Methods
-
apply(
{List< ColorToken> ? colors, FontFamily? font, FontFamily? codeFont, ContentTypography? typography, bool mergeColors = true}) → ContentTheme -
copyWith(
{List< ColorToken> ? colors, FontFamily? font, FontFamily? codeFont, ContentTypography? typography}) → ContentTheme -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultCodeFont → FontFamily
-
The default font family to use for code blocks and similar elements.
final
- defaultFont → FontFamily
-
The default font family to use for the page.
final