skew method

void skew(
  1. double amount, {
  2. Duration? duration,
  3. Curve? curve,
})

Skew by amount percentage (0 - 1.0) This can be used with a MouseReagion to indicate that the card can be flipped. skew(0) to go back to original.

Implementation

void skew(double amount, {Duration? duration, Curve? curve}) {
  assert(0 <= amount && amount <= 1);

  if (state!.isFront) {
    controller?.animateTo(amount, duration: duration, curve: curve!);
  } else {
    controller?.animateTo(1 - amount, duration: duration, curve: curve!);
  }
}