An example Flutter weather app using the OpenMeteoApi API.
- Current weather (condition and temperature)
- switch temperature metric unit
- Search by city
The app is composed by four main layers.
The data layer contains a single weather repository that is used to fetch weather raw data from the API.
Abstract the data layer and expose domain models for the application to consume, facilitating the communication with the Bussiness Logic layer.
Consumes the domain model from the repository layer and expose a feature-level model which will be surfaced to the user via UI.
This layer holds all the widgets, along with their blocs. Widgets do not communicate directly with the repository.
- flutter_bloc for state management
- build_runner for code generation
- http for talking to the REST API
- mocktail for testing
- go_router for navigation
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.