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

PhysicalModel

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

final double elevation;

final Color color;

final Color shadowColor;

final Clip clipBehavior;

final BorderRadius? borderRadius;

final BoxShape shape;

const PhysicalModelAttributes({
required this.elevation,
required this.color,
required this.shadowColor,
required this.clipBehavior,
this.borderRadius,
required this.shape,
required super.parentBuilderId,
required super.affectedProperties,
});

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

PhysicalModel(
&duit_attributes.PhysicalModelAttributes{
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,
},
"id",
false,
//child,
)