Перейти к основному содержимому

AnimatedPhysicalModel

Название типаПоддерживает анимации свойствКонтроллируемый по умолчаниюМожет содержать связанное действиеСсылка
AnimatedPhysicalModel✗✔️✗link
Атрибуты (устаревшие модели)
final class AnimatedPhysicalModelAttributes extends ImplicitAnimatable
implements _PhysicalModelProps, DuitAttributes<AnimatedPhysicalModelAttributes> {

final double elevation;

final Color color;

final Color shadowColor;

final Clip clipBehavior;

final BorderRadius? borderRadius;

final BoxShape shape;

final bool animateColor, animateShadowColor;

const AnimatedPhysicalModelAttributes({
required this.elevation,
required this.color,
required this.shadowColor,
required this.clipBehavior,
this.borderRadius,
required this.shape,
required super.curve,
required super.duration,
required super.onEnd,
required this.animateColor,
required this.animateShadowColor,
});

Пример использования​

AnimatedPhysicalModel(
&duit_attributes.AnimatedPhysicalModelAttributes{
Elevation: 8.0,
Color: duit_color.Color{R: 255, G: 87, B: 34, A: 255},
ShadowColor: duit_color.Color{R: 0, G: 0, B: 0, A: 255},
ClipBehavior: duit_clip.AntiAlias,
BorderRadius: &duit_border_radius.BorderRadius{
TopLeft: 8, TopRight: 8, BottomLeft: 8, BottomRight: 8,
},
Shape: duit_box_shape.Rectangle,
Duration: 300 * time.Millisecond,
Curve: duit_animations.EaseInOut,
AnimateColor: true,
AnimateShadowColor: true,
},
"id",
false,
//child,
)