ExtendedTransformScrollbarController constructor
ExtendedTransformScrollbarController({
- required AnimationController fadeoutAnimationControllerVertical,
- required AnimationController fadeoutAnimationControllerHorizontal,
- required TransformScrollbarWidgetInterface controlInterface,
- ScrollPhysics? scrollPhysics,
- bool? thumbVisibility,
- OutlinedBorder? shape,
- Radius? radius,
- double? thickness,
- Color? thumbColor,
- double minThumbLength = _kMinThumbExtent,
- double? minOverscrollLength,
- bool? trackVisibility,
- Radius? trackRadius,
- Color? trackColor,
- Color? trackBorderColor,
- Duration fadeDuration = _kScrollbarFadeDuration,
- Duration timeToFade = _kScrollbarTimeToFade,
- Duration pressDuration = Duration.zero,
- bool? interactive,
- double mainAxisMargin = 0.0,
- double crossAxisMargin = 0.0,
- EdgeInsets? padding,
Implementation
ExtendedTransformScrollbarController({
required this.fadeoutAnimationControllerVertical,
required this.fadeoutAnimationControllerHorizontal,
required this.controlInterface,
this.scrollPhysics,
this.thumbVisibility,
this.shape,
this.radius,
this.thickness,
this.thumbColor,
this.minThumbLength = _kMinThumbExtent,
this.minOverscrollLength,
bool? trackVisibility,
this.trackRadius,
this.trackColor,
this.trackBorderColor,
this.fadeDuration = _kScrollbarFadeDuration,
this.timeToFade = _kScrollbarTimeToFade,
this.pressDuration = Duration.zero,
this.interactive,
this.mainAxisMargin = 0.0,
this.crossAxisMargin = 0.0,
this.padding,
}) : assert(
!(thumbVisibility == false && (trackVisibility ?? false)),
'A scrollbar track cannot be drawn without a scrollbar thumb.',
),
assert(minThumbLength >= 0),
assert(minOverscrollLength == null ||
minOverscrollLength <= minThumbLength),
assert(minOverscrollLength == null || minOverscrollLength >= 0),
assert(radius == null || shape == null),
trackVisibilityV = trackVisibility,
trackVisibilityH = trackVisibility,
super(
fadeoutOpacityAnimationHorizontal: CurvedAnimation(
parent: fadeoutAnimationControllerHorizontal,
curve: Curves.fastOutSlowIn,
),
fadeoutOpacityAnimationVertical: CurvedAnimation(
parent: fadeoutAnimationControllerVertical,
curve: Curves.fastOutSlowIn,
),
color: thumbColor ?? const Color(0x66BCBCBC),
thickness: thickness ?? _kScrollbarThickness,
radius: radius,
trackRadius: trackRadius,
mainAxisMargin: mainAxisMargin,
shape: shape,
crossAxisMargin: crossAxisMargin,
minLength: minThumbLength,
minOverscrollLength: minOverscrollLength ?? minThumbLength,
);