0

I want to migrate my project to null safety but the dependecie flutter_template_images is not supporting null safety:

Package Name             Current  Upgradable  Resolvable  Latest

direct dependencies:
flutter_template_images  ✗4.0.0   ✗4.0.0      ✗4.0.0      ✗4.0.0

dev_dependencies: all support null safety.
You are already using the newest resolvable versions listed in the 'Resolvable' column.
Newer versions, listed in 'Latest', may not be mutually compatible.

I dont know where this package comes from and I dont find it in the pubspec.yaml file. Can I migrate null safety without upgrading this dependencie?

EDIT: This is my pubspec.yaml file:

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  material_design_icons_flutter: ^4.0.5955

  pdf: ^3.3.0

  path_provider: ^2.0.2

  provider: ^6.0.0

  open_file: ^3.2.1

  intl: ^0.17.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  cloud_firestore: ^2.3.0
  get: ^4.1.4
  printing: ^5.4.3
  google_sign_in: ^5.0.5
  firebase_auth: ^3.0.1
  fl_chart: ^0.36.3
  url_launcher: ^6.0.9
  sqflite: ^2.0.0+4
Dalon
  • 566
  • 8
  • 26
  • Can you attach your `pubspec.yaml` , as it's mentioned in the error it's a direct dependencies it should be present in file , or it might be a possibility you are using some library which has `flutter_template_images` bundled inside them – Nitish Oct 01 '21 at 09:40
  • I added the pubspec.yaml file to my question – Dalon Oct 01 '21 at 09:43
  • Could you update the dart sdk and all libraries to the latest version – Nitish Oct 01 '21 at 10:09
  • Is there a command to do that? – Dalon Oct 01 '21 at 10:16
  • Go to Tools -> Flutter -> Flutter Upgrade (this is update your dart sdk) and refer this for [upgrade dependencies](https://stackoverflow.com/questions/57764070/how-to-automatically-upgrade-flutter-dependencies) – Nitish Oct 01 '21 at 10:19
  • I think it only updated flutter to the newest version but dart stays the same – Dalon Oct 01 '21 at 10:22
  • Does this help - https://stackoverflow.com/questions/55898181/update-dart-sdk-for-flutter , but I think it updated dart also, as I updated the same few days ago using this – Nitish Oct 01 '21 at 10:27
  • Thank you, after updating, whats next? – Dalon Oct 01 '21 at 10:30
  • Does It still the same error of `flutter_template_images` not supporting – Nitish Oct 01 '21 at 10:35
  • Yes I still dont find it in pubspec.yaml... Where else could this dependency be? – Dalon Oct 01 '21 at 10:39
  • **This project is an internal dependency of the flutter tool, and is not intended to be used directly. It contains images files used in flutter create templates, to avoid checking them into the main Flutter repository, where they would permanently increase the checkout size over time if altered**. - this is what dependency says in it's Readme files says , Upgrading the flutter should have resolved the issue – Nitish Oct 01 '21 at 10:41
  • When upgrading i get this text from console: No dependencies changed. 1 package is discontinued. – Dalon Oct 01 '21 at 10:55

1 Answers1

1

It appears the maintainer has not migrated the package to dart-null-safety, you could either wait for the maintainer to migrate the package or clone the package and migrate the package yourself. Another option could be that you remove the package from your project.

For more clarification dart-null-safety

  • I would like to delete this package because I dont use it but the problem is i dont know where this package is from and I cant find it in any file. Do you know how I can find where this package is installed? – Dalon Oct 01 '21 at 08:41
  • Your error message says it is a direct dependency so I believe you could find it in your pubspec.yaml. – Adedokun Emmanuel Oct 01 '21 at 08:50
  • There is no dependency called flutter_template_images in my pubspec.yaml. So where can i find it? – Dalon Oct 01 '21 at 09:07
  • Same issue here, nowhere to be found on pubspec but the null-safety check picks it up. – MDompekidis May 05 '22 at 08:46