Curtains.drawn constructor
const
Curtains.drawn({
- Key? key,
- Axis? axis = Axis.vertical,
- Decoration? startCurtain,
- Decoration? endCurtain,
- double spread = 0.0,
- Sensitivity sensitivity = Sensitivity.none,
- bool isStartVisible = true,
- bool isEndVisible = true,
- AlignmentGeometry? alignment,
- TextDirection? textDirection,
- Clip clipBehavior = Clip.hardEdge,
- Widget? child,
- Duration? duration = _350ms,
- Curve? curve = Curves.easeOut,
These Curtains
behave a little differently.
Instead of toggling visibility based on the scrollable child
's extent,
the startCurtain and endCurtain are static.
Toggling either isStartVisible
or isEndVisible
will still
intrinsically animate over the given duration and curve.
Implementation
const Curtains.drawn({
Key? key,
Axis? axis = Axis.vertical,
this.startCurtain,
this.endCurtain,
this.spread = 0.0,
this.sensitivity = Sensitivity.none,
bool isStartVisible = true,
bool isEndVisible = true,
this.alignment,
this.textDirection,
this.clipBehavior = Clip.hardEdge,
Widget? child,
this.duration = _350ms,
this.curve = Curves.easeOut,
}) : _isDrawn = true,
scrollDirection = axis ?? Axis.vertical,
child = child ?? const SizedBox(key: Key('DRAWNđź“śCURTAIN')),
startInitVisible = isStartVisible, // will be checked on-the-fly
endInitVisible = isEndVisible, // will be checked on-the-fly
elevation = null,
color = null,
super(key: key);