Skip to content

Flutter application showing NASA Picture of the Day

Notifications You must be signed in to change notification settings

pawelch96/nasa_pod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NASA Picture of the Day

A Flutter project presenting NASA Picture of the Day for a randomly chosen day.

Table of contents

Getting started

This application is based on NASA Open APIs. To use it, generate your API KEY which could be then used in the app.

Code generators

This project uses several plugins to generate code, such as json_serializable, freezed, retrofit_generator, and injectable_generator. To generate these files, run:

flutter packages pub run build_runner build --delete-conflicting-outputs

or to rebuild generated files continuously during development:

flutter packages pub run build_runner watch --delete-conflicting-outputs

Localization is generated in Visual Studio Code, with the help of Flutter Intl extension. Thanks to it, there is no need to run

flutter gen-l10n

after every change in arb files.

Application architecture

The application shows a preview of an interpretation of Uncle Bob's Clean Architecture.
It consists of several layers:

  1. Domain layer
    The domain layer is the inner layer containing the app's business logic and abstractions.
  2. Application layer
    The application layer holds state management logic, in this example based on BLoC. The logic here is only connected with the presentation layer and users' interactions, with no data-related computations. Mostly just state managers distributing tasks to UseCase from the domain layer.
  3. Data layer
    This layer implements repositories from the domain layer. Errors and exceptions are handled there. In addition, there is an implementation of data sources, such as Rest APIs or local DBs. There are also JSON parsers and models, which are further converted by mappers to entities.
  4. Presentation layer
    All pages, widgets, and navigation are kept in the presentation layer. It is the “dumbest” layer, containing only the UI (even without form validation which is handled in the ppplication layer). Depends completely on the Flutter framework.

The project structure is feature-based, meaning that each feature contains the whole architecture inside its folder. If there are any components or logic that are used throughout the app, there's a `core` folder holding these reusable code pieces.

About

Flutter application showing NASA Picture of the Day

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages