M3EThemeScope class

Hosts adaptive theme listeners and resolves M3EThemeData for components.

Inheritance

Constructors

M3EThemeScope({required M3EThemeData baseData, required M3EThemeController controller, required Widget child, Brightness? initialTheme, bool? autoTheming, bool? dynamicColoring, Key? key})
Creates an adaptive theme scope for child.
const

Properties

autoTheming bool?
When true, follows platform brightness (with optional invert).
final
baseData M3EThemeData
Light-oriented template used to derive light/dark resolved themes.
final
child Widget
The subtree under this adaptive scope.
final
controller M3EThemeController
Manual brightness / invert controller for this scope.
final
dynamicColoring bool?
When true, applies device dynamic color to the active scheme.
final
hashCode int
The hash code for this object.
no setterinherited
initialTheme Brightness?
Initial brightness when not following the system.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
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<M3EThemeScope>
Creates the mutable state for this widget.
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.
inherited
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

controllerOf(BuildContext context) M3EThemeController?
Returns the nearest adaptive M3EThemeController, if any.
maybeOf(BuildContext context) M3EThemeScopeState?
Returns the nearest scope, if any.
resolveForComponent(BuildContext context) M3EThemeData?
Resolves theme for a component, registering an inherited dependency.
resolveOf(BuildContext context) M3EThemeData?
Resolves theme from the nearest scope, or null when none is present.