attach method

  1. @override
void attach(
  1. MotionContext context
)
override

Implementation

@override
void attach(MotionContext context) {
  super.attach(context);

  if (_childrenAttached) {
    for (final step in spec.steps) {
      step.effect.dispose();
    }
  }

  final childContext = MotionContext(
    vsync: context.vsync,
    animationsDisabled: context.animationsDisabled,
    onRequestRebuild: context.onRequestRebuild,
  );

  for (final step in spec.steps) {
    step.effect.attach(childContext);
  }
  _childrenAttached = true;
  tick(Duration.zero);
}