BeforeAfterTheme class
A theme extension class that defines custom styling and behavior for the BeforeAfter widget.
Use the BeforeAfterTheme
to customize the appearance and behavior of
the BeforeAfter widget throughout your app. The theme properties can be
accessed using BeforeAfterTheme.of(context)
. By default, the theme's
properties will be used. To override specific properties, use the
BeforeAfterThemeData.copyWith
method to create a new instance of the
theme with the desired changes.
See also:
BeforeAfterThemeData
, which is used to define the actual theme data.- BeforeAfter, which uses the
BeforeAfterTheme
to apply the styling defined in the theme data.
- Inheritance
-
- Object
- ThemeExtension<
BeforeAfterTheme> - BeforeAfterTheme
- Mixed-in types
Constructors
-
BeforeAfterTheme({double? trackWidth, Color? trackColor, double? thumbHeight, double? thumbWidth, Color? overlayColor, BoxDecoration? thumbDecoration, WidgetStateProperty<
MouseCursor?> ? mouseCursor}) -
Creates a BeforeAfterTheme.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
-
mouseCursor
→ WidgetStateProperty<
MouseCursor?> ? -
The cursor for a mouse pointer when it enters or is hovering over the
widget.
final
- overlayColor → Color?
-
The color of the overlay.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- thumbDecoration → BoxDecoration?
-
The decoration of the thumb.
final
- thumbHeight → double?
-
The height of the thumb.
final
- thumbWidth → double?
-
The width of the thumb.
final
- trackColor → Color?
-
The color of the track.
final
- trackWidth → double?
-
The width of the track.
final
- type → Object
-
The extension's type.
no setterinherited
Methods
-
copyWith(
{double? trackWidth, Color? trackColor, double? thumbHeight, double? thumbWidth, Color? overlayColor, BoxDecoration? thumbDecoration, WidgetStateProperty< MouseCursor?> ? mouseCursor}) → ThemeExtension<BeforeAfterTheme> -
Creates a copy of this theme extension with the given fields
replaced by the non-null parameter values.
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
-
lerp(
covariant BeforeAfterTheme? other, double t) → ThemeExtension< BeforeAfterTheme> -
Linearly interpolate with another ThemeExtension object.
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 brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
of(
BuildContext context) → BeforeAfterTheme -
Returns the closest BeforeAfterTheme instance given the
context
.