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

auto_route support & class decorators #119

Open
Nolat opened this issue Nov 29, 2023 · 2 comments
Open

auto_route support & class decorators #119

Nolat opened this issue Nov 29, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Nolat
Copy link

Nolat commented Nov 29, 2023

Is your feature request related to a problem? Please describe.
I'm using the auto_route package, which needs to add an @RoutePage() decorator above the classes. If I try to add it above a functional widget, the generation doesn't work.

@RoutePage()
class SplashPage extends HookWidget {
  const SplashPage();

  @override
  Widget build(BuildContext context) {
    return Scaffold();
  }
}

Describe the solution you'd like
We need a way to add a decorator to the generated class.

@FunctionalWidget(
  decorators: [
    RoutePage
  ],
)
Widget splashPage() {
  return Scaffold();
}
@Nolat Nolat added the enhancement New feature or request label Nov 29, 2023
@dickermoshe
Copy link

@rrousselGit
Should I spend time adding this, or is the macro version of this going to fix this issue?

@rrousselGit
Copy link
Owner

Feel free to make a PR yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants