mbitson / mcg

Material Design Palette/Theme Generator - AngularJS, React, Ember, Vue, Android, Flutter & More!
http://mcg.mbitson.com/
MIT License
630 stars 96 forks source link

Export to Dart for Flutter #106

Closed vincevargadev closed 4 years ago

vincevargadev commented 5 years ago

Feature request: Add import to Dart/Flutter for speeding up the process of creating MaterialColors for Flutter.

I hacked this script that I can paste into the console to speed things up and I'm not sure when I can get to submitting a PR for this, so I'd open a feature request and share my code with anyone who'd like to submit a PR.

https://gist.github.com/vargavince91/ce120397bc2f58f51337f6dc295972d1#file-dart-interpreter-js

// Output
<int, Color>{
  50: Color(0xFFFFFEFC),
  100: Color(0xFFFFFCF8),
  200: Color(0xFFFFFAF4),
  300: Color(0xFFFFF7F0),
  400: Color(0xFFFFF6EC),
  500: Color(0xFFFFF4E9),
  600: Color(0xFFFFF3E6),
  700: Color(0xFFFFF1E3),
  800: Color(0xFFFFEFDF),
  900: Color(0xFFFFECD9),
};
mbitson commented 4 years ago

Hey there @vargavince91 !

Thank you for this request! @vstollen's pull request addresses this here: https://github.com/mbitson/mcg/pull/108

Also thank you to @berryp for bugfixes on that!

Please let me know if you run into any problems or have any questions!