Closed niranjan-b-prajapati closed 2 years ago
If you can't upgrade flutter, you must use an old version of this package.
Try app_tracking_transparency: ^1.1.0
There shouldn't be a problem with using old version. Only difference between 2.0.0 and 1.1.0 is null safety. Null safety came with flutter 2.0.
@untp thank you for your suggestion but when I tried using version 1.1.0 it gave me the following error:
The current Flutter SDK version is 1.12.13+hotfix.9.
Because my_app depends on app_tracking_transparency >=1.0.0+1 which requires Flutter SDK version >=1.20.0 <2.0.0 or >=2.0.0, version solving failed.
pub get failed (1; Because my_app depends on app_tracking_transparency >=1.0.0+1 which requires Flutter SDK version >=1.20.0 <2.0.0 or >=2.0.0, version solving failed.)
exit code 1
It expects the flutter version to be 1.20.0 or greater.
How can I solve this as my Flutter version is 1.12.13+hotfix.9
Yes, you are right. Also first version (1.0.0) of this package still depends on flutter 1.20. There is no version that satisfy flutter 1.12. So you need to download and modify it for your requirements.
You can download any version from https://pub.dev/packages/app_tracking_transparency/versions You should download 1.1.0+1 which is the latest version that not migrated to null safety. (https://storage.googleapis.com/pub-packages/packages/app_tracking_transparency-1.1.0%2B1.tar.gz)
Create a directory called packages
or third_party
or something in your project.
Extract to that directory.
Modify ./packages/app_tracking_transparency/pubspec.yaml
:
environment:
sdk: ">=2.7.0 <3.0.0"
flutter: ">=1.12.0 <2.0.0"
Then edit your project's pubspec:
dependencies:
app_tracking_transparency:
path: packages/app_tracking_transparency
@untp Thank you so much for the solution. I was able to implement the library in my Flutter version.
Thanks a ton for the prompt response.
Please close the issue.
I want to use this library but when I try to add it in my pubspec.yaml file and do pub get it gives me below error:
Following is the output of flutter --version command :
I can't upgrade flutter to latest version as it is client requirement that we can't upgrade flutter.
Please help me resolve this issue.