dartoos-dev / astronomy_picture_of_the_day

A Flutter app to display NASA's astronomy image of the day
MIT License
3 stars 1 forks source link
android astronomy dart flutter ios mobile nasa web

astronomy_picture_of_the_day

NASA icon

license build codecov CodeFactor Grade style: lint Hits-of-Code DevOps By
Rultor.com

Contents

Overview

This is a Flutter app project to display NASA's astronomy picture of the day.

Getting Started

This project is a fully functional example, focussed on showing astronomy-related images by making http requests to NASA's public APIs.

You can take the code in this project and experiment with it.

  git clone https://github.com/dartoos-dev/astronomy_picture_of_the_day.git
  cd astronomy_picrture_of_the_day

Running the App

As it is a Flutter project, you can run it on different platforms — Android, IoS, Web, etc. But before running the application, you need to know which devices are connected to your computer; you can achieve this by listing all devices with the following terminal command:

  flutter devices

The above command will display a list similar to:

list of connected devices

For example, to run the app on one of the listed devices in debug mode:

Android

  flutter run -d RQCW70

IoS

  flutter run -d 257E76

Chrome

  flutter run -d chrome

Main Application Features

Project Structure Overview

Project Architecture

Directory Structure

lib  
└───features  
│   └───feature1  
│   │   └───sub_feature  
│   │   └───data  
│   │   └───domain  
│   │   └───external  
│   │   └───presenter  
│   └───feature2  
│   │   └───sub_feature  
│   │   └───data  
│   │   └───domain  
│   │   └───external  
│   │   └───presenter  
└───shared  
│   app_module.dart  
│   app_widget.dart 
│   main.dart 

Package by feature

In regard to packages or modules, this project uses the "package-by-feature" approach rather than the more usual "package-by-layer". The former uses packages to reflect the feature set; it places all items related to a single feature into a single directory whose name corresponds to important, high-level aspects of the problem domain.

It is important to note that package-by-feature style still honors the idea of separating layers, but that separation is implemented using separate classes.

Advantages of package by feature

Drawbacks of package by layer

Core Third-Party Packages

References