INNER CODE UNIT · Dart

slideRemaining

aagarwal1012/IntroViews-Flutter · lib/src/animation_gesture/animated_page_dragger.dart:27

      final slideRemaining = 1.0 - slidePercent;
      // Standard value take for drag velocity to avoid complex calculations.
      duration = Duration(
          milliseconds: (slideRemaining / PERCENT_PER_MILLISECOND).round());
    }
    // We have to close the page reveal
    else {
      endSlidePercent = 0.0;

      duration = Duration(
          milliseconds: (slidePercent / PERCENT_PER_MILLISECOND).round());
    }

    // Adding listener to animation controller
    // Also value to animation controller vary from 0.0 to 1.0 according to duration.
    completionAnimationController = AnimationController(
        duration: duration, vsync: vsync)
      ..addListener(() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…