Home > Blockchain >  Fixing infos error in Flutter project with a command
Fixing infos error in Flutter project with a command

Time:06-18

I have a Flutter project with some Infos(less than warnings) in my console in vsCode.

Like : remove unused imports ..

I got a ton of them after months of work. Is there a way to fix them all with a simple command or any tool ?

Thank you.

CodePudding user response:

You can use

dart fix --apply

The dart fix command finds and fixes two types of issues:

Analysis issues identified by dart analyze that have associated automated fixes (sometimes called quick-fixes or code actions)

Outdated API usages when updating to newer releases of the Dart and Flutter SDKs.

See this doc: https://dart.dev/tools/dart-fix

  • Related