Exemple #1
0
        protected override Widget _buildItem(int i, int realIndex, float animationValue)
        {
            float s = CustomLayoutUtils._getValue(this.scales, animationValue, i);
            float f = CustomLayoutUtils._getValue(this.offsets, animationValue, i);
            float o = CustomLayoutUtils._getValue(this.opacity, animationValue, i);

            Offset offset = this.widget.scrollDirection == Axis.horizontal
                ? new Offset(f, 0.0f)
                : new Offset(0.0f, f);

            Alignment alignment = this.widget.scrollDirection == Axis.horizontal
                ? Alignment.centerLeft
                : Alignment.topCenter;

            return(new Opacity(
                       opacity: o,
                       child: Transform.translate(
                           key: new ValueKey <int>(this._currentIndex + i),
                           offset: offset,
                           child: Transform.scale(
                               scale: s,
                               alignment: alignment,
                               child: new SizedBox(
                                   width: this.widget.itemWidth ?? float.PositiveInfinity,
                                   height: this.widget.itemHeight ?? float.PositiveInfinity,
                                   child: this.widget.itemBuilder(this.context, realIndex)
                                   )
                               )
                           )
                       ));
        }
Exemple #2
0
        public override Widget build(int i, float animationValue, Widget widget)
        {
            Offset s = CustomLayoutUtils._getOffsetValue(values: this.values, animationValue: animationValue, index: i);

            return(Transform.translate(
                       offset: s,
                       child: widget
                       ));
        }
Exemple #3
0
        public override Widget build(int i, float animationValue, Widget widget)
        {
            float v = CustomLayoutUtils._getValue(values: this.values, animationValue: animationValue, index: i);

            return(Transform.rotate(
                       degree: v,
                       child: widget
                       ));
        }
Exemple #4
0
        public override Widget build(int i, float animationValue, Widget widget)
        {
            float v = CustomLayoutUtils._getValue(values: this.values, animationValue: animationValue, index: i);

            return(new Opacity(
                       opacity: v,
                       child: widget
                       ));
        }
Exemple #5
0
        public override Widget build(int i, float animationValue, Widget widget)
        {
            float s = CustomLayoutUtils._getValue(values: this.values, animationValue: animationValue, index: i);

            return(Transform.scale(scale: s, child: widget));
        }