isAnimation method

Duration isAnimation({
  1. required bool status,
  2. Duration duration = const Duration(milliseconds: 0),
})

Implementation

Duration isAnimation(
    {required bool status,
    Duration duration = const Duration(milliseconds: 0)}) {
  if (status) {
    return duration;
  } else {
    return disable;
  }
}