Home > Blockchain >  Remove flutter plugin from dependencies
Remove flutter plugin from dependencies

Time:12-08

I wanna delete the flutter toast plugin that I have in my project.

dependencies:
  flutter:
    sdk: flutter
  fluttertoast: ^8.0.9

How to remove it safety? I want to:

  • delete this line fluttertoast: ^8.0.9 from pubspec.yaml file
  • delete this piece of code in pubspec.lock
fluttertoast:
    dependency: "direct main"
    description:
      name: fluttertoast
      url: "https://pub.dartlang.org"
    source: hosted
    version: "8.0.9"
  • remove unused flutter toast imports in files

Is it ok? Or should I do it in another way?

CodePudding user response:

1)remove flutter toast from you pubspec.yaml file and hit flutter pub get in the terminal and remove the imports from your project

or

2)Hit flutter remove fluttertoast in the terminal and remove the imports.

this should work

CodePudding user response:

First remove fluttertoast: ^8.0.9 and all the config in your yamel file, then remove all the import that you use in your dart files. After that run flutter pub get.

  • Related