Yunnane
Yunnane

Reputation: 155

Remove flutter plugin from dependencies

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:

fluttertoast:
    dependency: "direct main"
    description:
      name: fluttertoast
      url: "https://pub.dartlang.org"
    source: hosted
    version: "8.0.9"

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

Upvotes: 1

Views: 3899

Answers (2)

Rahul Pandey
Rahul Pandey

Reputation: 570

  1. Remove fluttertoast from your "pubspec.yaml" file and hit flutter pub get in the terminal and remove the imports from your project.

Or

  1. Hit flutter pub remove fluttertoast in the terminal and remove the imports.

This should work.

Upvotes: 4

eamirho3ein
eamirho3ein

Reputation: 17940

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.

Upvotes: 1

Related Questions