toggle method

T toggle({
  1. Duration? delay,
  2. Duration? duration,
  3. required ToggleEffectBuilder builder,
})

Adds a ToggleEffect that allows you to toggle the behavior of a builder function at a certain point in time.

Implementation

T toggle({
  Duration? delay,
  Duration? duration,
  required ToggleEffectBuilder builder,
}) =>
    addEffect(ToggleEffect(
      delay: delay,
      duration: duration,
      builder: builder,
    ));