ExpressiveHost class
The app's host: mounts the Expressive theme in force (light or dark by
brightness, or by the platform's when null) on an
ExpressiveTheme; under it a thin Material ThemeData for the
primitives Expressive builds on (ink, text editing and selection,
scrolling, page transitions), whose platform is the ambient one; the
ground (the surface role); the text and icon defaults (Compose's
bodyLarge in onSurface); the text-selection colours (primary, its
background at HostBehavior.textSelectionBackgroundOpacity); and on
Android, edge-to-edge system bars: transparent, their icons contrasting
with the ground.
Mounted once, around the router's Navigator:
MaterialApp.router(builder: (context, child) => ExpressiveHost(child: child!)).
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ExpressiveHost
Constructors
- ExpressiveHost({required Widget child, ExpressiveThemeData? light, ExpressiveThemeData? dark, ExpressiveThemeData? highContrastLight, ExpressiveThemeData? highContrastDark, Brightness? brightness, Key? key})
-
A host mounting the Expressive theme over
child.const
Properties
- brightness → Brightness?
-
The brightness to wear; null follows the platform's.
final
- child → Widget
-
What the host stands the theme over: the app.
final
- dark → ExpressiveThemeData?
-
The dark theme; null wears the default preset's.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highContrastDark → ExpressiveThemeData?
-
The dark theme while the platform asks for high contrast, as
MaterialApp.highContrastDarkTheme: null wears dark, or the default preset at high contrast when dark is null too.final - highContrastLight → ExpressiveThemeData?
-
The light theme while the platform asks for high contrast
(
MediaQuery.highContrastOf), asMaterialApp.highContrastTheme: null wears light, or the default preset at high contrast when light is null too.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- light → ExpressiveThemeData?
-
The light theme; null wears the default preset's.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ExpressiveHost> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
mediaThemeOf(
BuildContext context) → ExpressiveThemeData -
The theme a media ground wears under the nearest host (design_kit's
ChromeGround.media): the host's dark theme, whatever brightness the app is in; the default preset's dark theme outside any host. -
systemBarsOf(
ExpressiveThemeData theme) → SystemUiOverlayStyle -
Android's edge-to-edge system bars over
theme's ground: transparent, no contrast scrim, icons dark on a light ground and light on a dark one.