Okay so i have built an app nearly a year and half ago for my company, my boss recently wanted me to add a new screen to it and i did using all old and deprecated code of firebase and everything else (i really really dont wanna update them because i know everything nearly changed and building a whole new app would be better than editing this lol, so i'm trying to avoid that option), the app runs on Android just fine, but it doesnt build on ios and it does not allow me do "flutter build ios" in the terminal giving above error when trying to build ios or trying to pub Get.
Granted my intl version
was ^0.16.1
, then it would say that it requires 0.17.0
, then I changed it based on another post here to intl: ^0.17.0-nullsafety.2
but it gives the output above. what's the problem?
Here is my Pubspec.yaml:
name: tamatafreshiq
description: A new Flutter application.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cloud_firestore: ^0.14.0+2
firebase_core: ^0.5.0
shared_preferences: ^0.5.7+2
firebase_messaging: ^7.0.0
cupertino_icons: ^0.1.2
http: ^0.12.0+2
flutter_spinkit: ^3.1.0
english_words: ^3.1.5
firebase_auth: ^0.18.0+1
provider: ^4.1.3
firebase_storage: ^4.0.0
image_picker: ^0.6.7+2
image_cropper: ^1.2.3
url_launcher: ^5.4.11
localization: ^0.1.0
cached_network_image: ^2.2.0+1
fluttertoast: ^6.0.1
badges: ^1.1.3
data_connection_checker: ^0.3.4
intl: ^0.17.0-nullsafety.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/images/
- assets/gifs/
- assets/languages/
fonts:
- family: Rabar
fonts:
- asset: assets/fonts/Rabar_014.ttf
- family: Rubik
fonts:
- asset: assets/fonts/Rubik-Light.ttf
You need to upgrade your flutter version on your local machine to flutter 2.0+ now cause you are importing null safety supported dependency which uses dart sdk 2.12.0 but you have 2.7.0 which is making conflict with the other dependencies. If you do have 2.0+ already then upgrade the sdk of your app from pubspec.yaml. You will then have to update your code to full sound null safety starting from upgrading all the dependencies then the code, its not that hard even if your app is using firebase I get my apps upgraded to null safety within a week. Once all gets sorts out you'll have no trouble with your project in importing some null safety dependency or some else more importantly you will be able to have better performance of your app and can keep all the dependencies to support latest versions and might possible you app will be android 12 ready too