repeatForever method

AnimationSpec repeatForever({
  1. bool reverse = true,
})

Returns a copy of this AnimationSpec which repeats forever.

If reverse is true, the animation will reverse after finishing, instead of starting immediately from the beginning.

Examples

import 'package:flutter/animation.dart';

final withRepeatForever = Curves.linear.animation().repeatForever();

Implementation

AnimationSpec repeatForever({bool reverse = true}) =>
    _copyWith(repeatCount: _foreverRepeatCount, reverse: reverse);