SwiperTheme class
Theme configuration for swiper overlay behavior and appearance.
Defines default properties for swiper components including overlay behavior, drag interaction, surface effects, and visual styling.
Features:
- Configurable drag and expansion behavior
- Surface effects and backdrop styling
- Barrier and interaction customization
- Consistent theming across swiper variants
Example:
ComponentThemeData(
data: {
SwiperTheme: SwiperTheme(
expands: true,
draggable: true,
barrierDismissible: true,
transformBackdrop: true,
),
},
child: MyApp(),
)
Constructors
- SwiperTheme({bool? expands, bool? draggable, bool? barrierDismissible, WidgetBuilder? backdropBuilder, bool? useSafeArea, bool? showDragHandle, BorderRadiusGeometry? borderRadius, Size? dragHandleSize, bool? transformBackdrop, double? surfaceOpacity, double? surfaceBlur, Color? barrierColor, HitTestBehavior? behavior})
-
Creates a SwiperTheme.
const
Properties
- backdropBuilder → WidgetBuilder?
-
Builder for custom backdrop content.
final
- barrierColor → Color?
-
Color of the modal barrier.
final
- barrierDismissible → bool?
-
Whether tapping the barrier dismisses the swiper.
final
- behavior → HitTestBehavior?
-
Hit test behavior for gesture detection.
final
- borderRadius → BorderRadiusGeometry?
-
Border radius for the swiper container.
final
- draggable → bool?
-
Whether the swiper can be dragged to dismiss.
final
- dragHandleSize → Size?
-
Size of the drag handle when displayed.
final
- expands → bool?
-
Whether the swiper should expand to fill available space.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDragHandle → bool?
-
Whether to show the drag handle.
final
- surfaceBlur → double?
-
Blur intensity for surface effects.
final
- surfaceOpacity → double?
-
Opacity for surface effects.
final
- transformBackdrop → bool?
-
Whether to transform the backdrop when shown.
final
- useSafeArea → bool?
-
Whether to respect device safe areas.
final
Methods
-
copyWith(
{ValueGetter< bool?> ? expands, ValueGetter<bool?> ? draggable, ValueGetter<bool?> ? barrierDismissible, ValueGetter<WidgetBuilder?> ? backdropBuilder, ValueGetter<bool?> ? useSafeArea, ValueGetter<bool?> ? showDragHandle, ValueGetter<BorderRadiusGeometry?> ? borderRadius, ValueGetter<Size?> ? dragHandleSize, ValueGetter<bool?> ? transformBackdrop, ValueGetter<double?> ? surfaceOpacity, ValueGetter<double?> ? surfaceBlur, ValueGetter<Color?> ? barrierColor, ValueGetter<HitTestBehavior?> ? behavior}) → SwiperTheme -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override