This repository contains a sample app that I use to give workshops geared towards beginners to Flutter
- Building adaptive/responsive layouts with
adaptive_layout
- Internationalization
- Improving accessibility with Semantics
- Navigation by creating a new route and pushing it to the Navigator
- Navigation with named routes
- Networking
- Manual JSON parsing and serialization
- Spawning a background isolate manually and with
compute
- BLoC pattern with StreamBuilder
- Storing key-value data on disk
- Dependency injection with InheritedWidget and with provider
- Unit, widget and integration tests
- Configuring linting rules to implement the Effective Dart guidelines
- Continuous integration pipelines with Travis CI
- Uploading code coverage to Codecov
- Migrating to Null-safety (mostly done by the migration tool)
- Easily overriding
==
andhashCode
withequatable
- Using custom icons generated with FlutterIcon
The commit history contains multiple ways of doing the same thing. Some examples are:
- In one commit we manually spawn an isolate to do work in the background and in a later commit we use use Flutter's
compute
function to do the job. - In one commit we manually parse and serialize JSON and in a later commit we do it with code generation.
- Dependency injection is done with with InheritedWidget and then with provider.
- Navigation is done by creating a new route and pushing it to the Navigator then we used named routes.
I've made an effort to squash changes into atomic commits that each represent a teachable building block in the app.
Find a live demo of the app at https://flutter-workshop.surge.sh
flutter doctor # Verify that your dev environment is set up correctly
flutter pub run build_runner build # Generate serialization boilerplate code
flutter run # Run the app on an attached device
flutter analyze --no-pub --no-current-package lib/ test/ # Static analysis
flutter test # Tests
flutter packages get &&
flutter pub run build_runner build --delete-conflicting-outputs &&
flutter analyze --no-pub --no-current-package lib/ test/ &&
flutter test
💡 :bulb:
when adding a new functionality
🔁 :repeat:
when making changes to an existing functionality
🆒 :cool:
when refactoring
🐛 :bug:
when fixing a problem
💚 :green_heart:
when fixing continuous integration / tech health issues
✅ :white_check_mark:
when adding tests
📘 :blue_book:
when writing documentation
⬆️ :arrow_up:
when upgrading dependencies
⬇️ :arrow_down:
when downgrading dependencies
🔒 :lock:
when dealing with security
🐎 :racehorse:
when improving performance
🚱 :non-potable_water:
when resolving memory leaks
🔥 :fire:
when removing code or files
💽 :minidisc:
when doing data backup
😬 :grimacing:
for that "temporary" workaround