A Dart wrapper of the SMHI Open Data API

Related tags

Templates smhi
Overview

Pub style: lint

SMHI Open Data for Dart

This package is in early development and some features may not work as intended. If so, feel free to submit a pull request.

A Dart package for usage of the Swedish Meteorological and Hydrological Institute's Open Data API. The API allows you to get the weather and other meterological data like air temperature & pressure. At the time of writing this, the Meteorological Forecasts API is available in the following countries:

  • Sweden
  • Norway
  • Finland
  • Denmark
  • Estonia

And partly:

  • Latvia
  • Lithuania

Usage

This example shows how to get the air temperature at this time tomorrow in Stockholm:

import 'package:smhi/smhi.dart';

final MeteorologicalForecasts meteorologicalForecasts = MeteorologicalForecasts();
// Your request will automatically be cached. So if you make the same request again, it will return the cached version.
final Forecast? forecast = await meteorologicalForecasts.forecast(const GeoPoint(59.334591, 18.063240));
if (forecast != null) {
	// Forecasts are divided into moments where each moment represents a date & time.
	// Read more at SMHI's documentation: https://opendata.smhi.se/apidocs/metfcst/get-forecast.html
	final ForecastMoment moment = forecast.momentWhen(DateTime.now().add(const Duration(days: 1)));
	print(moment.valueOf(MetFcstParameter.airTemperature));
}

Supported SMHI Open Data APIs

API Supported
Meteorological Forecasts (Only pmp3gv2)
Warnings
Radar

Terms of use

You can find SMHI's terms of use and their documentation on their website, written in Swedish and English respectively. Their open data follows the Creative Commons Attribution 4.0 International (CC BY 4.0) license.

To prevent unnecessary usage of SMHI's API, requests will automatically be cached. You can clear the cache manually:

SMHICache().clear();

Features and bugs

Please file feature requests and bugs at the issue tracker.

You might also like...

Flutter wrapper widget for Avataaars API

Flutter wrapper widget for Avataaars API

Flutter_avataaar Flutter wrapper widget for Avataaars API - a free online avatar

Nov 11, 2022

DiceBear API wrapper. DiceBear is an avatar library for designers and developers. Generate random avatar profile pictures!

dice_bear Flutter Package DiceBear API wrapper. DiceBear is an avatar library for designers and developers. Generate random avatar profile pictures! C

Oct 31, 2022

Dart package for Async Data Loading and Caching. Combine local (DB, cache) and network data simply and safely.

Dart package for Async Data Loading and Caching. Combine local (DB, cache) and network data simply and safely.

Stock is a dart package for loading data from both remote and local sources. It is inspired by the Store Kotlin library.

Dec 24, 2022

This demo shows how you can open an expansion tile while closing an already open expansion tile.

This demo shows how you can open an expansion tile while closing an already open expansion tile.

Expansion Tile Open/Close Demo This demo shows you how to open an expansion tile while simultaneously closing an already open tile while maintaining a

Oct 21, 2022

Backbone - A Dart framework for writing REST APIs from an Open API spec

The Backbone Dart Backend Framework A Dart framework for writing REST APIs from

Oct 6, 2022

A simple dart zeromq implementation/wrapper around the libzmq C++ library

dartzmq A simple dart zeromq implementation/wrapper around the libzmq C++ library Features Currently supported: Creating sockets (pair, pub, sub, req,

Dec 29, 2022

Unofficial wrapper for using Rapid7 insightOps logs (former LogEntries) with Dart.

An unofficial wrapper for using Rapid7 insightOps logs (former LogEntries) with Dart. This package is using logging package to do the actual logging,

Mar 3, 2021

A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.

A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.

Ably Flutter Plugin A Flutter plugin wrapping the ably-cocoa (iOS) and ably-java (Android) client library SDKs for Ably, the platform that powers sync

Dec 13, 2022

A most easily usable JSON wrapper library in Dart

A most easily usable JSON response wrapper library in Dart! 1. About 1.1. Introd

Jan 4, 2022
Federico 1 Feb 3, 2022
A most easily usable RESAS API wrapper in Dart. With this library, you can easily integrate your application with the RESAS API.

A most easily usable RESAS API wrapper library in Dart! 1. About 1.1. What Is RESAS? 1.2. Introduction 1.2.1. Install Library 1.2.2. Import It 1.2.3.

Kato Shinya 2 Apr 7, 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
Data Migrator - provide a universal translator for data by being portable, diverse, and efficient in migrating and converting data across discrete schemas

Data Migrator - provide a universal translator for data by being portable, diverse, and efficient in migrating and converting data across discrete schemas

Tanner Meade 77 Jan 2, 2023
A MangaDex API wrapper for Dart/Flutter

A MangaDex API wrapper for Dart Usage A simple usage example: import 'package:mangadex_api/mangadex_api.dart'; main() { var client = MDClient();

Matyáš Caras 4 Dec 2, 2022
An api wrapper for FortniteApi.io in dart.

Fortnite An api wrapper for FortniteApi.io in dart. Installation Add this to your package's pubspec.yaml file: dependencies: fortnite_api_io: any

Vanxh 3 Jan 29, 2022
Dart wrapper for mpesa daraja api by safaricom

mpesa-daraja-plugin-flutter-dart dart wrapper for mpesa daraja api by safaricom Features [Done]Lipa na mpesa [x] [inprogress] C2B [inprogress] B2B [in

Anselmo.Jr 11 Nov 6, 2022
The lightweight and powerful wrapper library for Twitter Ads API written in Dart and Flutter 🐦

TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them. Features TODO: List w

Twitter.dart 2 Aug 26, 2022
Dart wrapper via `dart:js` for webusb

Dart wrapper via dart:js for https://wicg.github.io/webusb/ Features canUseUsb g

Woodemi Co., Ltd 1 Jan 25, 2022
An unofficial wrapper for the kdecole api

This is an UNOFFICIAL wrapper for the kdecole api How to use ? Login First, you need to create a Client() object : LOGIN AND PASSWORD ARE NOT YOUR ENT

null 5 Nov 2, 2022