How to add a package from command line in flutter?

  • Add a package as a direct dependency:

    flutter pub add <package-name>
    
  • Add a package as a dev-dependency:

    flutter pub add -d <package-name>
    
  • Remove a package:

    flutter pub remove <package-name>
    

Note: You can also use dart command instead of flutter above.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)