Can we use the different version of same package in a single Flutter project?
I'm working on an app that was developed by some other developer who used the older version of the google_mobile_ads package (To be specific, it was google_mobile_ads: ^0.12.2+1).
Now I'm trying to implement a new feature of that package that is only available in the newer version of that same package. (To be specific, it is google_mobile_ads: ^0.13.6).
I don't want to update the old codes using that package, because there of thousands of lines which will consume a lot of time.
So is there any way I can use the same package twice with different versions in the same app?
No , you can't use same package twice with different version , Because if you define it in your pubspec.yaml
file , then it throws an error for declaring same package with different versions and you can't move further in your code.