getDuration static method

Duration getDuration({
  1. required bool isAnimate,
  2. required int userMilliseconds,
})

Implementation

static Duration getDuration(
    {required bool isAnimate, required int userMilliseconds}) {
  if (isAnimate) {
    return Duration(milliseconds: userMilliseconds);
  } else {
    return const Duration(milliseconds: kNoAnimationDuration);
  }
}