A NASA's Astronomy Picture of the Day API consumer app.
Contains some goodies such as:
- Layered architecture
- Pagination
- Animations
- Unit testing
- Widget testing
- Integration testing
- Offline-first
- Caching
- API keys via environment variables
- CI with GitHub Actions
demo.mp4
You will need an API key. You can get one here.
After that you need to move env-example.json
to env.json
and fill it with key you just got.
Or you could just use
env-example.json
as is. Just remember to provide the correct filee name in the commands bellow.
Nothing too special. Just remember to provide the env file as an argument:
flutter run --dart-define-from-file=env.json
Just the usual:
flutter test
This one needs the key as it will query the API.
To run all tests:
flutter test --dart-define-from-file=env.json integration_test
To run a specific test, provide its file name:
flutter test --dart-define-from-file=env.json integration_test/picture_of_the_day_test.dart