Exemplo n.º 1
0
        Widget _buildModalBarrier(BuildContext context)
        {
            Widget barrier;

            if (this.barrierColor != null && !this.offstage)
            {
                // changedInternalState is called if these update
                D.assert(this.barrierColor != _kTransparent);
                Animation <Color> color =
                    new ColorTween(
                        begin: _kTransparent,
                        end: this.barrierColor // changedInternalState is called if this updates
                        ).chain(_easeCurveTween).animate(this.animation);
                barrier = new AnimatedModalBarrier(
                    color: color,
                    dismissible: this.barrierDismissible
                    );
            }
            else
            {
                barrier = new ModalBarrier(
                    dismissible: this.barrierDismissible
                    );
            }

            return(new IgnorePointer(
                       ignoring: this.animation.status == AnimationStatus.reverse ||
                       this.animation.status == AnimationStatus.dismissed,
                       child: barrier
                       ));
        }
Exemplo n.º 2
0
        Widget _buildModalBarrier(BuildContext context)
        {
            Widget barrier;

            if (barrierColor != null && !offstage)
            {
                // changedInternalState is called if these update
                D.assert(barrierColor != _kTransparent);
                Animation <Color> color =
                    animation.drive(new ColorTween(
                                        begin: _kTransparent,
                                        end: barrierColor // changedInternalState is called if this updates
                                        ).chain(new CurveTween(curve: barrierCurve)));
                barrier = new AnimatedModalBarrier(
                    color: color,
                    dismissible: barrierDismissible

                    );
            }
            else
            {
                barrier = new ModalBarrier(
                    dismissible: barrierDismissible

                    );
            }
            if (_filter != null)
            {
                barrier = new BackdropFilter(
                    filter: _filter,
                    child: barrier
                    );
            }
            return(new IgnorePointer(
                       ignoring: animation.status == AnimationStatus.reverse ||
                       animation.status == AnimationStatus.dismissed,
                       child: barrier
                       ));
        }