WeSlide constructor
WeSlide({
- Key? key,
- Widget? appBar,
- required Widget body,
- Widget? panel,
- Widget? panelHeader,
- double panelMinSize = 150.0,
- double panelMaxSize = 400.0,
- double? panelWidth,
- double panelBorderRadiusBegin = 0.0,
- double panelBorderRadiusEnd = 0.0,
- double bodyBorderRadiusBegin = 0.0,
- double bodyBorderRadiusEnd = 0.0,
- double? bodyWidth,
- double transformScaleBegin = 1.0,
- double transformScaleEnd = 0.85,
- double parallaxOffset = 0.1,
- double overlayOpacity = 0.0,
- double blurSigma = 5.0,
- Color overlayColor = Colors.black,
- Color blurColor = Colors.black,
- Color backgroundColor = Colors.black,
- double appBarHeight = 80.0,
- bool hidePanelHeader = true,
- bool parallax = false,
- bool transformScale = false,
- bool overlay = false,
- bool blur = false,
- bool hideAppBar = true,
- bool isDismissible = true,
- bool isUpSlide = true,
- List<
TweenSequenceItem< ? fadeSequence,double> > - Duration animateDuration = const Duration(milliseconds: 300),
- WeSlideController? controller,
Weslide Contructor
Implementation
WeSlide({
Key? key,
this.footer,
this.appBar,
required this.body,
this.panel,
this.panelHeader,
this.panelMinSize = 150.0,
this.panelMaxSize = 400.0,
this.panelWidth,
this.panelBorderRadiusBegin = 0.0,
this.panelBorderRadiusEnd = 0.0,
this.bodyBorderRadiusBegin = 0.0,
this.bodyBorderRadiusEnd = 0.0,
this.bodyWidth,
this.transformScaleBegin = 1.0,
this.transformScaleEnd = 0.85,
this.parallaxOffset = 0.1,
this.overlayOpacity = 0.0,
this.blurSigma = 5.0,
this.overlayColor = Colors.black,
this.blurColor = Colors.black,
this.backgroundColor = Colors.black,
this.footerHeight = 60.0,
this.appBarHeight = 80.0,
this.hideFooter = true,
this.hidePanelHeader = true,
this.parallax = false,
this.transformScale = false,
this.overlay = false,
this.blur = false,
this.hideAppBar = true,
this.isDismissible = true,
this.isUpSlide = true,
List<TweenSequenceItem<double>>? fadeSequence,
this.animateDuration = const Duration(milliseconds: 300),
this.controller,
}) : /*assert(body != null, 'body could not be null'),*/
assert(panelMinSize >= 0.0, 'panelMinSize cannot be negative'),
assert(footerHeight >= 0.0, 'footerHeight cannot be negative'),
assert(appBarHeight >= 0.0, 'appBarHeight cannot be negative'),
assert(panel != null, 'panel could not be null'),
assert(panelMaxSize >= panelMinSize,
'panelMaxSize cannot be less than panelMinSize'),
fadeSequence = fadeSequence ??
[
TweenSequenceItem<double>(
weight: 1.0, tween: Tween(begin: 1, end: 0)),
TweenSequenceItem<double>(
weight: 8.0, tween: Tween(begin: 0, end: 0)),
],
super(key: key) {
if (controller == null) {
// ignore: unnecessary_this
this.controller = WeSlideController();
}
}