Skip to content

A NASA's Astronomy Picture of the Day API consumer app

Notifications You must be signed in to change notification settings

Ascenio/nasa_potday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

59bb388 · Jul 8, 2024

History

48 Commits
Jul 8, 2024
Jul 7, 2024
May 6, 2024
May 7, 2024
Jul 8, 2024
May 9, 2024
Jul 8, 2024
May 9, 2024
May 8, 2024
May 6, 2024
Jul 8, 2024
May 6, 2024
May 6, 2024
May 9, 2024
May 9, 2024

Repository files navigation

nasa_potday

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

Getting started

Configuration

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.

Running

Nothing too special. Just remember to provide the env file as an argument:

flutter run --dart-define-from-file=env.json

Testing

Unit and widget tests

Just the usual:

flutter test

Integration 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