return EdgeInsets . lerp ( begin , end , t ) ;
}
}
public class EdgeInsetsGeometryTween : Tween < EdgeInsetsGeometry > {
public EdgeInsetsGeometryTween (
EdgeInsetsGeometry begin = null ,
EdgeInsetsGeometry end = null ) : base ( begin : begin , end : end ) {
}
public override EdgeInsetsGeometry lerp ( float t ) {
return EdgeInsetsGeometry . lerp ( begin , end , t ) ;
}
}
public class BorderRadiusTween : Tween < BorderRadius > {
protected AnimationController controller {
get { return _controller ; }
}
Animation < float > _animation ;
public override void initState ( ) {
public class AnimatedContainer : ImplicitlyAnimatedWidget {
public AnimatedContainer (
Key key = null ,
Alignment alignment = null ,
AlignmentGeometry alignment = null ,
EdgeInsets padding = null ,
Color color = null ,
Decoration decoration = null ,
public readonly Widget child ;
public readonly Alignment alignment ;
public readonly AlignmentGeometry alignment ;
public readonly EdgeInsets padding ;
public override void debugFillProperties ( DiagnosticPropertiesBuilder properties ) {
base . debugFillProperties ( properties ) ;
properties . add ( new DiagnosticsProperty < Alignment > ( "alignment" , alignment , showName : false ,
properties . add ( new DiagnosticsProperty < AlignmentGeometry > ( "alignment" , alignment , showName : false ,
defaultValue : null ) ) ;
properties . add ( new DiagnosticsProperty < EdgeInsets > ( "padding" , padding , defaultValue : null ) ) ;
properties . add ( new DiagnosticsProperty < Decoration > ( "bg" , decoration , defaultValue : null ) ) ;
}
class _AnimatedContainerState : AnimatedWidgetBaseState < AnimatedContainer > {
AlignmentTween _alignment ;
AlignmentGeometry Tween _alignment ;
EdgeInsetsTween _padding ;
DecorationTween _decoration ;
DecorationTween _foregroundDecoration ;
protected override void forEachTween ( TweenVisitor visitor ) {
_alignment = ( AlignmentTween ) visitor . visit ( this , _alignment , widget . alignment ,
( Alignment value ) = > new AlignmentTween ( begin : value ) ) ;
_alignment = ( AlignmentGeometry Tween ) visitor . visit ( this , _alignment , widget . alignment ,
( AlignmentGeometry value ) = > new AlignmentGeometry Tween ( begin : value ) ) ;
_padding = ( EdgeInsetsTween ) visitor . visit ( this , _padding , widget . padding ,
( EdgeInsets value ) = > new EdgeInsetsTween ( begin : value ) ) ;
_decoration = ( DecorationTween ) visitor . visit ( this , _decoration , widget . decoration ,
alignment : _alignment ? . evaluate ( animation ) ,
padding : _padding ? . evaluate ( animation ) ,
decoration : _decoration ? . evaluate ( animation ) ,
forgroundDecoration : _foregroundDecoration ? . evaluate ( animation ) ,
fore groundDecoration : _foregroundDecoration ? . evaluate ( animation ) ,
transfr om : _transform ? . evaluate ( animation )
transfor m : _transform ? . evaluate ( animation )
) ;
}
description . add ( new DiagnosticsProperty < AlignmentTween > ( "alignment" , _alignment , showName : false ,
description . add ( new DiagnosticsProperty < AlignmentGeometryTween > ( "alignment" , _alignment , showName : false ,
defaultValue : null ) ) ;
description . add ( new DiagnosticsProperty < EdgeInsetsTween > ( "padding" , _padding , defaultValue : null ) ) ;
description . add ( new DiagnosticsProperty < DecorationTween > ( "bg" , _decoration , defaultValue : null ) ) ;
public class AnimatedPadding : ImplicitlyAnimatedWidget {
public AnimatedPadding (
Key key = null ,
EdgeInsets padding = null ,
EdgeInsetsGeometry padding = null ,
Widget child = null ,
Curve curve = null ,
TimeSpan ? duration = null ,
this . child = child ;
}
public readonly EdgeInsets padding ;
public readonly EdgeInsetsGeometry padding ;
public readonly Widget child ;
public override void debugFillProperties ( DiagnosticPropertiesBuilder properties ) {
base . debugFillProperties ( properties ) ;
properties . add ( new DiagnosticsProperty < EdgeInsets > ( "padding" , padding ) ) ;
properties . add ( new DiagnosticsProperty < EdgeInsetsGeometry > ( "padding" , padding ) ) ;
EdgeInsetsTween _padding ;
EdgeInsetsGeometry Tween _padding ;
_padding = ( EdgeInsetsTween ) visitor . visit ( this , _padding , widget . padding ,
( EdgeInsets value ) = > new EdgeInsetsTween ( begin : value ) ) ;
_padding = ( EdgeInsetsGeometry Tween ) visitor . visit ( this , _padding , widget . padding ,
( EdgeInsetsGeometry value ) = > new EdgeInsetsGeometry Tween ( begin : value ) ) ;
}
public override Widget build ( BuildContext context ) {
public override void debugFillProperties ( DiagnosticPropertiesBuilder description ) {
base . debugFillProperties ( description ) ;
description . add ( new DiagnosticsProperty < EdgeInsetsTween > ( "padding" , _padding ,
description . add ( new DiagnosticsProperty < EdgeInsetsGeometry Tween > ( "padding" , _padding ,
defaultValue : foundation_ . kNullDefaultValue ) ) ;
}
}
Key key = null ,
Alignment alignment = null ,
AlignmentGeometry alignment = null ,
Widget child = null ,
Curve curve = null ,
TimeSpan ? duration = null ,
this . child = child ;
}
public readonly Alignment alignment ;
public readonly AlignmentGeometry alignment ;
public readonly Widget child ;
public override void debugFillProperties ( DiagnosticPropertiesBuilder properties ) {
base . debugFillProperties ( properties : properties ) ;
properties . add ( new DiagnosticsProperty < Alignment > ( "alignment" , value : alignment ) ) ;
properties . add ( new DiagnosticsProperty < AlignmentGeometry > ( "alignment" , value : alignment ) ) ;
AlignmentTween _alignment ;
AlignmentGeometry Tween _alignment ;
_alignment = ( AlignmentTween ) visitor . visit ( this , tween : _alignment ,
targetValue : widget . alignment , constructor : value = > new AlignmentTween ( begin : value ) ) ;
_alignment = ( AlignmentGeometry Tween ) visitor . visit ( this , tween : _alignment ,
targetValue : widget . alignment , constructor : value = > new AlignmentGeometry Tween ( begin : value ) ) ;
}
public override Widget build ( BuildContext context ) {
public override void debugFillProperties ( DiagnosticPropertiesBuilder description ) {
base . debugFillProperties ( properties : description ) ;
description . add ( new DiagnosticsProperty < AlignmentTween > ( "alignment" , value : _alignment , defaultValue : null ) ) ;
description . add ( new DiagnosticsProperty < AlignmentGeometry Tween > ( "alignment" , value : _alignment , defaultValue : null ) ) ;
}
}
Curve curve = null ,
TimeSpan ? duration = null ,
VoidCallback onEnd = null
) : base ( key : key , curve : curve , duration : duration , onEnd : onEnd ) {
) : base ( key : key , curve : curve ? ? Curves . linear , duration : duration , onEnd : onEnd ) {
D . assert ( start = = null | | end = = null | | width = = null ) ;
D . assert ( top = = null | | bottom = = null | | height = = null ) ;
this . child = child ;
base ( key : key , curve : curve ? ? Curves . linear , duration : duration , onEnd : onEnd ) {
D . assert ( opacity ! = null & & opacity > = 0.0 & & opacity < = 1.0 ) ;
this . child = child ;
this . opacity = opacity ? ? 1.0f ;
this . opacity = opacity ;
public readonly float opacity ;
public readonly float? opacity ;
public override State createState ( ) {
return new _AnimatedOpacityState ( ) ;
protected SliverAnimatedOpacity (
Key key = null ,
Widget sliver = null ,
float opacity = default ,
Curve curve = null , //Curve curve = Curve.linear
float? opacity = null ,
Curve curve = null ,
) : base ( key : key , curve : curve , duration : duration , onEnd : onEnd ) {
) : base ( key : key , curve : curve ? ? Curves . linear , duration : duration , onEnd : onEnd ) {
this . opacity = opacity ;
this . sliver = sliver ;
public readonly float opacity ;
public readonly float? opacity ;
public override State createState ( ) {
return new _SliverAnimatedOpacityState ( ) ;
Animation < float > _opacityAnimation ;
protected override void forEachTween ( TweenVisitor visitor ) {
_opacity = ( FloatTween ) visitor . visit ( this , _opacity , widget . opacity , ( float value ) = > new FloatTween ( begin : value , 0 ) ) ;
_opacity = ( FloatTween ) visitor . visit ( this , _opacity , widget . opacity ? ? 0.0f , ( float value ) = > new FloatTween ( begin : value , 0 ) ) ;
}
protected override void didUpdateTweens ( ) {
bool softWrap = true ,
TextOverflow ? overflow = null ,
int? maxLines = null ,
TextWidthBasis textWidthBasis = TextWidthBasis . parent ,
ui . TextHeightBehavior textHeightBehavior = null ,
TimeSpan ? duration = null
) : base ( key : key , curve : curve ? ? Curves . linear , duration : duration ) {
TimeSpan ? duration = null ,
VoidCallback onEnd = null
) : base ( key : key , curve : curve ? ? Curves . linear , duration : duration , onEnd : onEnd ) {
D . assert ( overflow ! = null ) ;
this . child = child ;
this . style = style ;
this . textAlign = textAlign ;
this . textHeightBehavior = textHeightBehavior ;
this . textWidthBasis = textWidthBasis ;
}
public readonly Widget child ;
public readonly bool softWrap ;
public readonly TextAlign ? textAlign ;
public readonly ui . TextHeightBehavior textHeightBehavior ;
public readonly TextWidthBasis textWidthBasis ;
public readonly VoidCallback onEnd ;
public override State createState ( ) {
return new _AnimatedDefaultTextStyleState ( ) ;
base . debugFillProperties ( properties ) ;
properties . add ( new EnumProperty < TextAlign > ( "textAlign" , textAlign ? ? TextAlign . center ,
defaultValue : null ) ) ;
properties . add ( new FlagProperty ( "softWrap" , value : softWrap , ifTrue : "wrapping at box width" ,
ifFalse : "no wrapping except at line break characters" , showName : true ) ) ;
properties . add ( new EnumProperty < TextAlign > ( "textAlign" , textAlign ? ? TextAlign . start , defaultValue : null ) ) ;
properties . add ( new FlagProperty ( "softWrap" , value : softWrap , ifTrue : "wrapping at box width" , ifFalse : "no wrapping except at line break characters" , showName : true ) ) ;
properties . add ( new EnumProperty < TextWidthBasis > ( "textWidthBasis" , textWidthBasis , defaultValue : TextWidthBasis . parent ) ) ;
properties . add ( new DiagnosticsProperty < ui . TextHeightBehavior > ( "textHeightBehavior" , textHeightBehavior , defaultValue : null ) ) ;
}
}
softWrap : widget . softWrap ,
overflow : widget . overflow ,
maxLines : widget . maxLines ,
child : widget . child ) ;
textWidthBasis : widget . textWidthBasis ,
textHeightBehavior : widget . textHeightBehavior ,
child : widget . child
) ;
}
}
Color shadowColor = null ,
bool animateShadowColor = true ,
Curve curve = null ,
TimeSpan ? duration = null
) : base ( key : key , curve : curve ? ? Curves . linear , duration : duration ) {
TimeSpan ? duration = null ,
VoidCallback onEnd = null
) : base ( key : key , curve : curve ? ? Curves . linear , duration : duration , onEnd : onEnd ) {
D . assert ( duration ! = null ) ;
this . child = child ;
this . shape = shape ? ? BoxShape . circle ;
this . clipBehavior = clipBehavior ;
properties . add ( new DiagnosticsProperty < bool > ( "animateColor" , animateColor ) ) ;
properties . add ( new DiagnosticsProperty < Color > ( "shadowColor" , shadowColor ) ) ;
properties . add ( new DiagnosticsProperty < bool > ( "animateShadowColor" , animateShadowColor ) ) ;
}
}