Curtains.elevated constructor
const
Curtains.elevated({
- Key? key,
- Axis scrollDirection = Axis.vertical,
- double? elevation = 9.0,
- Color? color,
- Sensitivity sensitivity = Sensitivity.none,
- bool startInitVisible = false,
- bool endInitVisible = true,
- AlignmentGeometry? alignment,
- TextDirection? textDirection,
- Clip clipBehavior = Clip.hardEdge,
- required Widget child,
- Duration? duration = _350ms,
- Curve? curve = Curves.easeOut,
Wraps a scrollable child with scrim shadows while
not at the start or end, alluding to unrevealed content.
Construct simple elevated
📜 Curtains
that only require
a scrollable child. Instead of Decorations for each curtain,
supply double
elevation that is shared by both.
Parameter scrollDirection defaults to Axis.vertical like ListView.
- Initialize this property to match the child's
scrollDirection
.
Parameter textDirection defaults to Directionality.of(context)
,
but may be overridden.
With non-negative Sensitivity, the scrims of this 📜 Curtains
will change state before the scrollable reaches a min/max extent.
sensitivity.start
defines startCurtain tolerance to min extent.sensitivity.end
defines endCurtain tolerance to max extent.
Parameter elevation defaults to 9.0
and color may be overridden
- For more information, see: 👥
package:shadows
'sElevation
static methods, such as Elevation.asBoxShadows and Elevation.asBoxDecoration
- Before any scrolling occurs,
end
curtain initializes visible, even if this 📜 Curtains wraps a scrollable not long enough to scroll.- If this does not fit the situation, consider endInitVisible.
- Also available is startInitVisible. Defaults
false
.
See class documentation for full examples: 📜 Curtains
Implementation
const Curtains.elevated({
Key? key,
this.scrollDirection = Axis.vertical,
this.elevation = 9.0,
this.color,
this.sensitivity = Sensitivity.none,
this.startInitVisible = false,
this.endInitVisible = true,
this.alignment,
this.textDirection,
this.clipBehavior = Clip.hardEdge,
required this.child,
this.duration = _350ms,
this.curve = Curves.easeOut,
}) : _isDrawn = false,
startCurtain = null,
endCurtain = null,
spread = 0.0,
super(key: key);