public Widget _buildAnimation(BuildContext context, Widget child) { Color color = widget.controller.status == AnimationStatus.reverse ? _masklessColor : _mask.value; List <Color> colors = new List <Color>(); colors.Add(color); colors.Add(color); return(Positioned.fromRect( rect: _rect.value, child: foundation_.kIsWeb ? (Widget) new Container(key: _childGlobalKey, child: widget.child) : new ShaderMask( key: _childGlobalKey, shaderCallback: (Rect bounds) => { return new LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: colors).createShader(bounds); }, child: widget.child ) )); }