refresh method

  1. @override
Future<double> refresh()
override

Update On.animation widgets listening the this animation

Has similar effect as when the widget rebuilds to invoke implicit animation

Implementation

@override
Future<double> refresh() async {
  animationEndFuture ??= Completer();
  for (var fn in _didUpdateWidgetListeners) {
    fn();
  }
  notify();
  await animationEndFuture?.future;
  return 0.0;
}