Home > OS >  Accidentally deleted dart package in Flutter
Accidentally deleted dart package in Flutter

Time:11-15

I accidentally deleted flutter_material_color_picker-1.1.0 2 package folder that was part of flutter-settings-screens. Now when I try to run the app I get this error:

../../MobileDev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_settings_screens-0.2.2 1/lib/src/widgets/settings_widgets.dart:3:8: Error: Error when reading '../../MobileDev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_material_color_picker-1.1.0 2/lib/flutter_material_color_picker.dart': No such file or directory import 'package:flutter_material_color_picker/flutter_material_color_picker.dart';

I tried:

Deleting pubspec.lock

flutter clean

CodePudding user response:

run flutter pub add flutter_material_color_picker so that the package is added again into the project

CodePudding user response:

I solved the problem by reinstalling flutter sdk

  • Related