catchAnimationCancel function

Future catchAnimationCancel(
  1. TickerFuture future
)

skip the TickerCanceled exception

Implementation

Future catchAnimationCancel(TickerFuture future) async {
  return future.orCancel.catchError((_) async {
    // do nothing, skip TickerCanceled exception
    return null;
  }, test: (ex) => ex is TickerCanceled);
}