iampawan / VelocityX

A minimalist Flutter framework for rapidly building Flutter apps.
https://velocityx.dev
MIT License
1.43k stars 190 forks source link

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

Closed Eleaus-Hossain-Evan closed 1 year ago

Eleaus-Hossain-Evan commented 1 year ago

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?

codersangam commented 1 year ago

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.

iampawan commented 1 year ago

Fixed with v4.1.1