Milad-Akarie / auto_route_library

Flutter route generator
MIT License
1.6k stars 405 forks source link

Generating a route with generic type isn't supported #2050

Open WissamALSbenaty opened 2 months ago

WissamALSbenaty commented 2 months ago

I am trying to do the following example

@RoutePage()
class EditingPage<T extends EditingController > extends StatefulWidget {

  const EditingPage({super.key});

  @override
  State< EditingPage > createState() => EditingPageState();
}

class EditingPage State<T extends EditingController> extends State< EditingPage > {
 late getIt<T>controller =getIt<T>()

when i generate i get an error

class EditingRoute<T> extends PageRouteInfo<void> {const EditingRoute<T>({List<PageRouteInfo>? children}) : super(EditingRoute<T>.name, initialChildren: children, );

is it possible to achieve in current version or its not implement ?