Dart 2 Cheat Sheet and Quick Reference 2019 | raywenderlich.com

Download a handy 4-page PDF Dart Cheat Sheet and Quick Reference!

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4482580-dart-2-cheat-sheet-and-quick-reference-2019

Thanks for this great cheat sheet! I have two remarks:

On the end of page one is a little mistake: case: Month.june/.july should return Semester.summer

On the last page I miss an example for mixins.

GREAT INFO, Thank you - One small issue on page 2… you have a paren on the end of
avengers[“Iron Man”]);

Thannks @babelfisch and @markstepp for the feedback! We’ll be releasing a 1.0.1 cheat sheet soon with these fixes!

  • I think that it would also be cool to introduce the cascading operator to retain the type that we want: Method Cascades in Dart

  • On Strings, it’d be cool to also mention that we can use methods inside${variable.getProperty()}

  • Might be a stretch, but mixins are very powerful and could be introduced here

  • Also new functions for the language such as spread operators: flutter - How to spread a list in dart - Stack Overflow

  • And a final note: const vs var vs val vs final vs specifying the type, showing all the different alternatives

Thanks @vanethos! We’ll try to get at least some of those into our next update. This cheat sheet was getting pretty long, so we may end up doing an “Advanced Dart Cheat Sheet” that would include things like mixins, streams, and more.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!