CarouselViewThemeData class
Defines default property values for descendant CarouselView widgets.
Descendant widgets obtain the current CarouselViewThemeData object using CarouselViewTheme.of. Instances of CarouselViewThemeData can be customized with CarouselViewThemeData.copyWith.
Typically a CarouselViewThemeData is specified as part of the overall Theme with ThemeData.carouselViewTheme.
All CarouselViewThemeData properties are null
by default. When null, the CarouselView
will provide its own defaults.
See also:
- CarouselViewTheme, an InheritedWidget that propagates the theme to its descendants.
- ThemeData, which describes the overall theme information for the application.
- Mixed-in types
- Annotations
Constructors
-
CarouselViewThemeData.new({double? elevation, Color? backgroundColor, WidgetStateProperty<
Color?> ? overlayColor, OutlinedBorder? shape, EdgeInsets? padding}) -
Creates a theme that can be used for ThemeData.carouselViewTheme.
const
Properties
- backgroundColor → Color?
-
The background color for each carousel item.
final
- elevation → double?
-
The z-coordinate of each carousel item.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
overlayColor
→ WidgetStateProperty<
Color?> ? -
The highlight color to indicate the carousel items are in pressed, hovered
or focused states.
final
- padding → EdgeInsets?
-
The amount of space to surround each carousel item with.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → OutlinedBorder?
-
The shape of the carousel item's Material.
final
Methods
-
copyWith(
{Color? backgroundColor, double? elevation, OutlinedBorder? shape, WidgetStateProperty< Color?> ? overlayColor, EdgeInsets? padding}) → CarouselViewThemeData - Creates a copy of this object with the given fields replaced with the new values.
-
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
-
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
-
lerp(
CarouselViewThemeData? a, CarouselViewThemeData? b, double t) → CarouselViewThemeData - Linearly interpolate between two carousel themes.