Coder Social home page Coder Social logo

lord-chris / weather-forecaster Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.5 MB

This is a simple weather forecaster that uses the OpenWeatherMap API to get the weather forecast for a predefined list of cities. It showcases DDD architecture, unit and widget testing, and code documentation.

Kotlin 0.06% Ruby 1.36% Swift 0.96% Objective-C 0.02% Dart 74.90% CMake 9.46% C++ 11.65% C 0.69% HTML 0.90%
ddd-architecture flutter unit-testing widget-testing

weather-forecaster's Introduction

Weather Forecaster

This is a simple weather forecaster that uses the OpenWeatherMap API to get the weather forecast for a given city. The user can input the city name to search from a predefined list of cities. Clicking on a city will display the weather forecast for the next 5 days.

Weather Forecaster

Features

  • View Current Weather: View the current weather for a given city, including minimum and maximum temperatures.
  • 5-day forecast: View the weather forecast for the next 5 days.

Getting Started

Prerequisites

  • Ensure you have Flutter installed on your machine.
  • You will need an API key from OpenWeatherMap to access the weather data.

Steps

  1. Clone the Repository

    First, clone this repository to your local machine using Git.

    git clone https://github.com/Lord-Chris/weather-forecaster.git
    cd weather-forecaster
  2. Install Dependencies

    Navigate to the project directory and run the following command to install the necessary Flutter dependencies:

    flutter pub get
  3. Run the App

    Ensure an emulator is running or a device is connected to your computer. You can check connected devices with:

    flutter devices

    Then, execute the following command to run the app:

    flutter run --dart-define=OPEN_WEATHER_API_KEY=${API_KEY} 

Using the App

  1. Select a City

    Click on the search bar to select a city from the list of predefined cities.

  2. View Weather Forecast

    Click on a city to view the weather forecast for the next 5 days.

  3. Refresh Data

    Pull down the screen to refresh the weather data.

Running Tests

Execute the following command to run the tests:

flutter test

To generate a coverage report, run the following command:

flutter test --coverage

The coverage report will be generated in the coverage directory.


Truth can only be found in one place: the code.
-- Robert C. Martin

... and Assurance can be found in one place: the tests.
-- LordChris

weather-forecaster's People

Contributors

lord-chris avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.