This repository is a collection of Flutter and Dart recipes in GitHub Gists that can be also immediately executed and tested in DartPad. I find that it's a great way to learn, understand and discover Flutter's features. For all gists, I give a short introduction with links to relevant articles or the documentation.
If you find this repo helpful, I'd appreciate your help with getting the word out!
A tweet takes only a click but would help this collection reach a bigger group of Flutter developers.
- Tweet about it 🐦
- Star the repository 🤩
- Follow me 🌝
- Twitter
@vincevargadev
💙 - GitHub
@vincevargadev
🤓
- Twitter
- Check out my Flutter 101 Podcast 🎧
If you open the gists on DartPad, you can run the examples immediately without having to first install Flutter on your machine. All you need is a modern web browser, and you'll be able to see the different code examples run in real time. You can also make edits and observe how the program changes its behavior based on your edits.
You can open also open the gists on GitHub where you can fork the gist. After forking, the gist is yours and you'll be able to edit it or just keep it as a reference.
All examples are without any external dependencies or packages, and they should work well on all platforms.
You can run the examples on your mobile phones if you have Flutter installed, just copy the code into your main.dart file after you created a Flutter project with flutter create .
Unfortunately, DartPad doesn't work great on mobiles. The layouts will look the best on desktop in medium-sized windows. I also discovered a couple of bugs with DartPad, that breaks some of my gists that locally work perfectly.
The gist hashes are used in this README
so that we can refer back to the repository from the gists easily, while changing gist titles and descriptions at any time.
Discover how the snack bar behaves with long text content and a long snack bar action. TODO: description