INNER CODE UNIT · Dart

AnimatedPageDragger

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

class AnimatedPageDragger {
  AnimatedPageDragger({
    required this.slideDirection,
    required this.transitionGoal,
    required double slidePercent,
    required StreamController<SlideUpdate> slideUpdateStream,
    required TickerProvider vsync,
  }) {
    final startSlidePercent = slidePercent;
    double endSlidePercent;
    Duration duration;

    // We have to complete the page reveal
    if (transitionGoal == TransitionGoal.open) {
      endSlidePercent = 1.0;

      final slideRemaining = 1.0 - slidePercent;
      // Standard value take for drag velocity to avoid complex calculations.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…