Add Fixed Spacing with the Gap Widget

One of the most best things you can do for your Flutter project is to run all the tests when you push your code.

And with GitHub workflows, this can be accomplished in 10 lines of code.

Just create a tests.yaml file and put it in .github/workflows.


There is SO MUCH more that you can do with GitHub workflows!

This page covers the entire workflows syntax. 100% worth it:

Adding a tests workflow to your repo

To add a basic test worflow to your project, create a .github/workflows/tests.yaml file with these contents:

name: Run Tests on: [push, workflow_dispatch] jobs: drive: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: subosito/flutter-action@v2.8.0 run: flutter test

Then, commit and push your changes, and the tests will run on every push.


I'll be covering all the advanced setup stuff, including code signing, Testflight, Fastlane, API secrets and much more in my upcoming course about Flutter in Production.

If this is of interest, you can sign up here:

Happy coding!

Want More?

Invest in yourself with my high-quality Flutter courses.

Flutter Foundations Course

Flutter Foundations Course

Learn about State Management, App Architecture, Navigation, Testing, and much more by building a Flutter eCommerce app on iOS, Android, and web.

Flutter & Firebase Masterclass

Flutter & Firebase Masterclass

Learn about Firebase Auth, Cloud Firestore, Cloud Functions, Stripe payments, and much more by building a full-stack eCommerce app with Flutter & Firebase.

The Complete Dart Developer Guide

The Complete Dart Developer Guide

Learn Dart Programming in depth. Includes: basic to advanced topics, exercises, and projects. Fully updated to Dart 2.15.

Flutter Animations Masterclass

Flutter Animations Masterclass

Master Flutter animations and build a completely custom habit tracking application.