I wanted to use pub get
using Flutter, and I encountered this error:
C:srcflutterbinflutter.bat --no-color pub get
Resolving dependencies...
The current Dart SDK version is 3.0.0-417.0.dev.
Because flutter_launcher_name 0.0.1 doesn't support null safety and no versions of flutter_launcher_name match >0.0.1 <0.1.0, flutter_launcher_name ^0.0.1 is forbidden.
So, because qed_app_thinkit depends on flutter_launcher_name ^0.0.1, version solving failed.
The lower bound of "sdk: '>=2.1.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety
Process finished with exit code 1
I don’t know what to do. the result of flutter doctor
was normal, and I tried Flutter Update, flutter clean, etc.
What is the problem?
working pub get
properly.
2
Answers
Your error is very clear: it says
flutter_launcher_name
doesn’t support null-safety. Check out your plugin version, it is written in 3 years ago. Please use other plugin.Edit: I don’t know why you need to use this plugin, you can easily change your app name at
MaterialApp
It is not recommended to use
non-null-safe
packages innull-safe
projects. While it may be technically possible to do so, it can introduce potential issues into your codebase, and it may be difficult to maintain in the long term.Here is a tutorial that you can use to change the application name:
Change Application Name and Icon in Flutter project(Android and iOS)
In addition, you can take a look at this thread:
Use a non-null safety package inside a null safety enabled app dart