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

Add getParams method to router.dart #453

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update pkgs/shelf_router/lib/src/router.dart
Co-authored-by: Jonas Finnemann Jensen <[email protected]>
  • Loading branch information
CLNMR and jonasfj authored Nov 14, 2024
commit 489f4fcf61c7ff56a9a62e076f5f990b76ccc3f2
1 change: 1 addition & 0 deletions pkgs/shelf_router/lib/src/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class Router {
}

/// Get URL parameters captured by the [Router].
///
/// Returns `null` if no parameters are captured.
Map<String, String>? getParams(Request request) {
Copy link
Member

Choose a reason for hiding this comment

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

If we decide to land this, how about the name urlParameters.

https://dart.dev/effective-dart/design#avoid-starting-a-method-name-with-get

for (var route in _routes) {
Expand Down