apply method

  1. @override
Widget apply(
  1. BuildContext context,
  2. Widget child
)
override

Applies this Effect to given child. This is called by Effect builder widgets to apply the effect to given child.

Returns a Widget with the effect applied. lerp is called before apply to interpolate between two Effects. apply is then called on the resulting Effect from lerp.

Check out ScaleEffect.apply for an example of how to implement this method.

Implementation

@override
Widget apply(BuildContext context, Widget child) {
  return Transform(
    transform: Matrix4.skew(
      skewX ?? skew ?? 0,
      skewY ?? skew ?? 0,
    ),
    alignment: alignment,
    origin: origin,
    child: child,
  );
}