-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#4315Closed
Copy link
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
The documentation for GoRoute's constructor says:
- One of either [builder] or [pageBuilder] must be provided.
Suggesting that builder must be provided even if redirect is provided.
However, the assertions seem to indicate that it's okay to forgo passing builder as long as redirect is provided:
assert(pageBuilder != null || builder != null || redirect != null,
'builder, pageBuilder, or redirect must be provided'),
In practice, I get "No routeBuilder provided to GoRoute" if I provide redirect but not builder, so that seems to support the constructor's documentation rather than the assertions. If this is all intentional, then perhaps the assertion should be updated to
assert(pageBuilder != null || builder != null, 'builder or pageBuilder must be provided)
nolbertj, kylegraycar, JDMukiibs, kvenn, Gasol and 3 more
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.