mzimmerm / flutter_charts

Charts Library for Flutter, written in Dart with Flutter.
Other
250 stars 42 forks source link

how do I use this? #2

Closed MichaelRFairhurst closed 6 years ago

MichaelRFairhurst commented 6 years ago

If I add

    flutter_charts: ^0.1.0

to my pubspec.yaml of a fresh flutter project, I get

ERR : Incompatible dependencies on flutter:
    | - flutter_charts 0.1.0 depends on it from source hosted
    | - flutter_test 0.0.15 depends on it from source sdk
    | - reader depends on it from source sdk

I ordinarily would not consider this something I should go to you about, except for that this is what your instructions say on pub's site.

mzimmerm commented 6 years ago

Thanks for reporting. I think this is an issue with the way I published the package (as a Dart package rather than a Flutter package). I am looking into it. BTW, you get the error you mentioned during flutter run from the new project directory (supplied with the dependency you mentioned)? Thanks

MichaelRFairhurst commented 6 years ago

I'm trying flutter packages get, but yes, I've also seen this error on flutter run. Definitely running both from within the root of my project

MichaelRFairhurst commented 6 years ago

Also I was in a hurry before so I neglected to say: Excited to give this a try, it looks great :) Sorry to have skipped on politeness a bit before!

mzimmerm commented 6 years ago

No problem at all, I did not notice :) I am happy you tried and reported, and sorry for the failure. I am using this package directly on my project, and only after your report I created a test app which uses flutter_charts from pub (fwiw, pushed to https://github.com/mzimmerm/flutter_charts_sample_app) and was able to duplicate this issue.

To abbreviate the story, I published a new version https://pub.dartlang.org/packages/flutter_charts 0.1.5 which fixes this issue for me. If you did have time to validate, that would be great, but first of all thanks again for reporting this.

The longer version:

The cause of this issue was : I originally published flutter_charts with a specified version of flutter (something like flutter: >=0.0.yy <0.xx.0). Apparently one should remove any flutter version before flutter packages pub publish and just use in the published package:

dependencies:
  flutter:
    sdk:  flutter
  decimal: ">=0.1.4 <0.2.0"

dev_dependencies:
  test:
  flutter_test:
    sdk:  flutter

The weird thing is it was something in the tools messages that prompted me to set the version on initial publishing, but I do not remember the detail.

Thanks, Milan

MichaelRFairhurst commented 6 years ago

Working great! https://github.com/MichaelRFairhurst/flutter-language-reader-app

mzimmerm commented 6 years ago

Thanks! Very cool app, thanks for sharing. I need to do some polish, generalization and better label scaling. But there is also expansion in other directions so I am slow. Would you mind if I later show "known client apps" and link to your app? (Ok if not). Thanks.

MichaelRFairhurst commented 6 years ago

Absolutely, would be cool to see it linked! I will attach some screenshots to the readme/upload it to the store(s) hopefully before too long, too.

mzimmerm commented 6 years ago

Sounds great. Will watch for it, thanks