PhysicalModelExt extension

为PhysicalModel组件添加隐式动画效果。

curve 动画曲线,默认为线性。 duration 动画持续时间,默认为300毫秒。 onEnd 动画结束时的回调函数。 color 物理模型的颜色。 borderRadius 边框圆角半径,默认为5.0。 clipBehavior 剪裁行为,默认为Clip.none。 elevation 阴影高度,默认为0。 shadowColor 阴影颜色,默认为灰色。 shape 形状,默认为BoxShape.rectangle。

返回一个AnimatedPhysicalModel组件。

on

Methods

animatedPhysicalModel({Curve curve = Curves.linear, Duration duration = const Duration(milliseconds: 300), VoidCallback? onEnd, required Color color, double borderRadius = 5.0, Clip clipBehavior = Clip.none, double elevation = 0, Color shadowColor = Colors.grey, BoxShape shape = BoxShape.rectangle}) AnimatedPhysicalModel

Available on Widget, provided by the PhysicalModelExt extension