Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow changing transition duration #140

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

adil192
Copy link
Contributor

@adil192 adil192 commented Apr 11, 2024

Allows developers to specify the transition duration like so:

Navigator.of(context).push(
  NesVerticalCloseTransition.route<void>(
    pageBuilder: widget.openBuilder,
    duration: const Duration(milliseconds: 300),
  ),
);

Status

Ready for review

Description

Adds an optional argument to NesVerticalCloseTransition.route (and likewise with the other transition classes) to specify the transition duration, see adil192/ricochlime#41.

My first thought was to add a field to NesOverlayTransitionTheme but since the durations are different for each transition (i.e. 750ms vs 1750ms), it would be less verbose to just add a parameter to the ....route<T>() functions.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore
  • 🧪 Tests

Copy link
Owner

@erickzanardo erickzanardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! LGTM

@erickzanardo erickzanardo merged commit a12b4cc into erickzanardo:main Apr 11, 2024
2 checks passed
@adil192 adil192 deleted the transition-duration branch April 11, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants