Closed Almighty-Alpaca closed 2 years ago
I'm using this library together with auto_route which expects an annotation on e.g. query parameters:
auto_route
@FunctionalWidget() Widget myPage( BuildContext context, { @QueryParam('tab') int? initialTabIndex, }) => Container();
Previously, the constructor for the generated widget was missing the brackets and therefore also parameters:
const MyPage({Key? key, @QueryParam this.initialTabIndex})
This PR fixed that behavior and copies the whole annotation source from the function widget to the constructor:
const MyPage({Key? key, @QueryParam('tab') this.initialTabIndex})
I've also added some tests for this case.
I'm using this library together with
auto_route
which expects an annotation on e.g. query parameters:Previously, the constructor for the generated widget was missing the brackets and therefore also parameters:
This PR fixed that behavior and copies the whole annotation source from the function widget to the constructor:
I've also added some tests for this case.