build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Widget that performs animation swing between x and y

Implementation

@override
Widget build(BuildContext context) {
  return Container(
    padding: index == 0
        ? const EdgeInsets.only(top: 10)
        : const EdgeInsets.only(top: 0),
    child: Opacity(
      opacity: 1 - value,
      child: Transform(
        alignment: Alignment.bottomCenter,
        transform: Matrix4.identity()
          ..translate(0, -10, 0)
          ..rotateZ(value / 0.05)
          ..translate(0, 10, 110),
        child: child,
      ),
    ),
  );
}