griffins
griffins

Reputation: 8274

This package does not have flutter_web_plugins in the `dependencies` section of `pubspec.yaml`

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';
    │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Upvotes: 32

Views: 15164

Answers (2)

Abdelazeem Kuratem
Abdelazeem Kuratem

Reputation: 1706

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:

Upvotes: 0

griffins
griffins

Reputation: 8274

inside your pubspec.yaml

add this

dependencies:
  flutter:
    sdk: flutter
  flutter_web_plugins:
    sdk: flutter

Upvotes: 103

Related Questions