build method

  1. @override
Widget build (BuildContext context)
override

Override this method to build widgets that depend on the state of the listenable (e.g., the current value of the animation).

Implementation

@override
Widget build(BuildContext context) {
  final double turnsValue = turns.value;
  final Matrix4 transform = Matrix4.rotationZ(turnsValue * math.pi * 2.0);
  return Transform(
    transform: transform,
    alignment: alignment,
    child: child,
  );
}