Giter Site home page Giter Site logo

jordyhers / open_weather_example_flutter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bizz84/open_weather_example_flutter

0.0 0.0 0.0 216 KB

Flutter Weather App Example using the OpenWeatherMap API

Home Page: https://codewithandrea.com/

License: MIT License

Kotlin 0.52% Ruby 9.12% Swift 4.65% Objective-C 0.13% Dart 72.11% HTML 13.48%

open_weather_example_flutter's Introduction

Flutter Weather App Example

An example Flutter weather app using the OpenWeatherMap API.

Flutter Weather App Preview

Related Tutorials

Supported Features

  • Current weather (condition and temperature)
  • 5-day weather forecast

App Architecture

The app is composed by two main layers.

Data Layer

The data layer contains a single weather repository that is used to fetch weather data from the OpenWeatherMap API.

The data is then parsed (using Freezed) and returned using type-safe entity classes (Weather and Forecast).

For more info about this, read this tutorial:

Presentation Layer

This layer holds all the widgets, along with their controllers.

Widgets do not communicate directly with the repository.

Instead, they watch some controllers that extend the StateNotifier class (using Riverpod).

This allows to map the data from the layer above to AsyncValue objects that can be mapped to the appropriate UI states (data, loading, error).

Packages in use

About the OpenStreetMap weather API

The app shows data from the following endpoints:

Note: to use the API you'll need to register an account and obtain your own API key. This can be set via --dart-define or inside lib/src/api/api_keys.dart.

open_weather_example_flutter's People

Contributors

bizz84 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.