How to migrate to Polymer and PaperElements 1.0 using pubspec.yaml

Issue

I have found Migration guide (https://www.polymer-project.org/1.0/docs/migration.html). My Dart project does not use bower but pubspec.yaml and when I changed dependencies version for PaperElements I get message: paper_elements has no versions that match >=1.0.0

environment:
 sdk: '>=0.8.10+6 <2.0.0'
dependencies:
 browser: '>=0.10.0+2'
 code_transformers: any
 core_elements: '>=0.6.0'
 dnd: any
 logging: '>=0.9.3'
 paper_elements: '>=1.0.0'
 polymer: any
 polymer_intl: any
 vector_math: any
transformers:
- polymer:
  entry_points:
    web/index.html
  inline_stylesheets:
    packages/polymer/src/build/log_injector.css: false
- $dart2js:
minify: true

How to upgrade?

Solution

update

https://pub.dartlang.org/packages/polymer_elements

(ignore the deprecated comment in the readme)

original

There are no 1.0 elements for Dart yet.
This is work in progress and before they are not published there is no way to use them the way you did previously.
You can use the Polymer.js elements in the meantime of course but then you have to use bower and dart-js-interop.

Answered By – Günter Zöchbauer

Answer Checked By – Cary Denson (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *