iampawan / VelocityX

A minimalist Flutter framework for rapidly building Flutter apps.

Home Page:https://velocityx.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

conflict with GoRouter extension method context.push and contaxt.pop

Eleaus-Hossain-Evan opened this issue · comments

I got a conflict error between GoRouter and VelocityX extension method push and pop.

I'm using GoRouter as my main package for routing for 1 year and recently I know about VelocityX through youtube and am willing to use it. but, after using it, it got this error on the same page where VelocityX and GoRouter exist.

A member named 'push' is defined in extension 'GoRouterHelper' and extension 'VxContextExtensions', and none are more specific. Try using an extension override to specify the extension you want to be chosen

Screenshot 2023-07-23 172455

So, I have no idea how to use both packages together. Can anyone give me any suggestions?

Instead of using context, you can use directly
GoRouter.of(context).push(RouteName);

or In imports you can give alias name using "as" keyword either for GoRouter or Velocity_x.

Fixed with v4.1.1