19

When publishing my package after adding web support i got this error

Package validation found the following error:
* line 9, column 1 of lib/hexcolor_web.dart: This package does not have flutter_web_plugins in the `dependencies` section of `pubspec.yaml`.
    ╷
  9 │ import 'package:flutter_web_plugins/flutter_web_plugins.dart';
    │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
griffins
  • 7,079
  • 4
  • 29
  • 54

2 Answers2

51

inside your pubspec.yaml

add this

dependencies:
  flutter:
    sdk: flutter
  flutter_web_plugins:
    sdk: flutter
griffins
  • 7,079
  • 4
  • 29
  • 54
0

If not findable inside flutter sdk like collection(in my case)

you can just add it as a normal package from pub.dev

dependencies:
  flutter:
    sdk: flutter
  collection:
Abdelazeem Kuratem
  • 1,324
  • 13
  • 20