Flutter Weather App Example using the OpenWeatherMap API

Overview

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.

LICENSE: MIT

You might also like...

Weather app created using Flutter and Dart

Weather app created using Flutter and Dart

FlutterWeather FlutterWeather A simple weather App created using Flutter and Dart and using API from OpenWeatherMap Features Automatically acquire use

Dec 30, 2022

weather app using flutter framework

weather app using flutter framework

flutter_weather_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you star

Dec 26, 2022

Weather app using Bloc architecture pattern & generic HTTP client with interface implementation and much more for more detail read Readme

Weather app using Bloc architecture pattern & generic HTTP client with interface implementation and much more for more detail read Readme

weather Weather application for current weather, hourly forecast for 48 hours, Daily forecast for 7 days and national weather alerts. How to Run Insta

Oct 29, 2022

Coolet - A simple app that will give you suggestion on what to wear/do using the latest weather status at your current location

Coolet - A simple app that will give you suggestion on what to wear/do using the latest weather status at your current location

coolet A simple app that gives you a suggestion on what to wear (sometimes do) b

Jan 20, 2022

This example uses a ScrollView, JSON Rest API, Navigation, Alert Pop Up, Progress Indicator, Globals, Images in a shared asset folder, and 100% Shared Code

This example uses a ScrollView, JSON Rest API, Navigation, Alert Pop Up, Progress Indicator, Globals, Images in a shared asset folder, and 100% Shared Code

This example uses a ScrollView, JSON Rest API, Navigation, Alert Pop Up, Progress Indicator, Globals, Images in a shared asset folder, and 100% Shared Code. Now with the ability to login with FaceID, TouchID, and Fingerprint Reader on Android.

Jan 6, 2023

A rewrite of Bloc tutorial: Flutter Weather Tutorial using freezed

A rewrite of Bloc tutorial: Flutter Weather Tutorial using freezed. Bloc was used instead of Cubit (Cubit vs Bloc)

Nov 23, 2022

Netflix app UI clone using bloc,Rest API and TMDB for API key

netflix_flutter project_using_bloc packages Used flutter_bloc json_serializable get_it dio A few resources to get you started if this is your first Fl

Nov 25, 2022

In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API.

In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API.

Flutter CRUD Using NodeJS API In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API. 📎 Packages Used h

Dec 30, 2022

A weather app built to learn how to use Canvas and Animation in Flutter.

A weather app built to learn how to use Canvas and Animation in Flutter.

Weather Quick Disclaimer I removed my private OpenWeather API key from the repo, if you want to get the weather forecast use your own in the openweath

Dec 21, 2022
Comments
  • search feature

    search feature

    add search feature like what in the website of weather. It's just for practice on this beautiful example of repository architecture and git on it. 😁 weather with search

    opened by abdullahalamodi 1
Owner
Andrea Bizzotto
Flutter GDE ❖ Creator of codewithandrea.com ❖ YouTube: nnbd.me/yt ❖ Complete Dart Course: nnbd.me/dart
Andrea Bizzotto
A simple flutter app that fetches weather data from openweathermap.org depending on your location or city you specify.

Clima ☁ My Goal The objective of this project is to learn about asynchronous programming in Dart. I'll be looking at how to carry out time consuming t

David-Legend 7 Sep 28, 2021
Beautiful Weather App using API with support for dark mode. Created by Jakub Sobański ( API ) and Martin Gogołowicz (UI, API help)

Flutter Weather App using API with darkmode support Flutter 2.8.1 Null Safety Beautiful Weather App using https://github.com/MonsieurZbanowanYY/Weathe

Jakub Sobański 5 Nov 29, 2022
Weatrio App An Weather App to check the weather around the world!

Weatrio App An Weather App to check the weather around the world! View Demo · Documentation · Report Bug · Request Feature ?? Table of Contents About

Liron Abutbul 2 Sep 12, 2022
A weather app that allows the user to find out the live weather data of any city.

Clima ☁ My Goal My objective of completing this project was to learn about asynchronous programming in Dart, how to carry out time consuming tasks suc

Ginny (Khue) Dang 1 May 6, 2022
A weather application and the location is hard-coded to fetch weather data from London.

Weather Application This project is a weather application and the location is hard-coded to fetch weather data from London. Regarding the state manage

André Nogueira 2 Jun 21, 2022
This App Using 2 Rest APi One for Login & SignUP and other for Weather

Requirnment A Flutter app where user can signup using Api endpoint and login using Api endpoint. And after login user go to the dashboard where user c

Md Enam Ahmed Chowdhury 3 Mar 14, 2022
Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight Node.js based Bhagavad Gita API [An open source rest api on indian Vedic Scripture Shrimad Bhagavad Gita].

Gita Bhagavad Gita flutter app. Download App - Playstore Web Application About Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight No

Ravi Kovind 7 Apr 5, 2022
Lottie-package-example-Flutter - A simple example about lottie package in Flutter

Lottie Package example - Flutter ScreenShot ⚠️ Essential Packages lottie: ^1.2.1

AmirHossein Bayat 3 Dec 7, 2022
Smooth-Page-Indicator-Example-Flutter - A simple example about smooth page indicator in Flutter

Smooth Page Indicator Example - Flutter Screenshots ⚠️ Essential Packages smooth

AmirHossein Bayat 6 Dec 7, 2022
The Mashmart mobile app is designed as an example of how to retrieve data from the JSON API

Mashmart Mobile App (Demo Version) ✨ About The Mashmart mobile app is designed a

Dileepa Bandara 3 Nov 17, 2022