Skip to content

Conversation

dancamdev
Copy link
Contributor

@dancamdev dancamdev commented Apr 3, 2023

This PR includes support for having type-safe non-nullable $extra parameters when working with TypedGoRoutes. Optional $extra is still supported so this isn't a breaking change.

@TypedGoRoute<RequiredExtraRoute>(path: '/requiredExtra')
class RequiredExtraRoute extends GoRouteData {
  const RequiredExtraRoute({required this.$extra});

  final Extra $extra;

  @override
  Widget build(BuildContext context, GoRouterState state) =>
      RequiredExtraScreen(extra: $extra);
}

List which issues are fixed by this PR. You must list at least one issue.
#117261

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@chunhtai chunhtai requested a review from hannah-hyj April 3, 2023 16:52
@chunhtai
Copy link
Contributor

chunhtai commented Apr 3, 2023

Hi @Hangyujin Can you take a look at this PR?

Copy link
Member

@hannah-hyj hannah-hyj left a comment

Choose a reason for hiding this comment

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

LGTM

@dancamdev
Copy link
Contributor Author

Fixed the merge conflicts with 1.2.0

@dancamdev
Copy link
Contributor Author

Thanks @Michele-x98 for the fix!

Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM, once the ci failure are fixed

@dancamdev
Copy link
Contributor Author

@chunhtai should be good to go

@dancamdev dancamdev requested a review from chunhtai April 7, 2023 16:13
@chunhtai
Copy link
Contributor

chunhtai commented Apr 7, 2023

It looks like there are still some failures

@dancamdev
Copy link
Contributor Author

dancamdev commented Apr 7, 2023

It looks like there are still some failures

Due to the following:

info - lib/src/route_config.dart:99:57 - 'element' is deprecated and shouldn't be used. Use element2 instead. Try replacing the use of the deprecated member with the replacement. - deprecated_member_use

But this is a CI issue because element2 is deprecated and element should be used instead - the go_router_builder codebase is using element across the board.

If that's not it, mind pointing me to the issue you're seeing? Thanks

@dancamdev
Copy link
Contributor Author

@chunhtai Got it working!

@hannah-hyj hannah-hyj added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 11, 2023
@auto-submit auto-submit bot merged commit 1ddd2d9 into flutter:main Apr 11, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 12, 2023
@dancamdev dancamdev deleted the feature/required-extra branch April 13, 2023 15:01
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
…er#3627)

[go_router_builder] Adds support for required $extra parameter
auto-submit bot pushed a commit that referenced this pull request Jul 21, 2023
As per title, because of contributing to the following PRs:

[#3702](#3702)
[#3665](#3665)
[#3627](#3627)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: go_router_builder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants