weather_sdk 1.0.0 copy "weather_sdk: ^1.0.0" to clipboard
weather_sdk: ^1.0.0 copied to clipboard

A simple Dart SDK to fetch current weather using OpenWeatherMapAPI.

🌦️ Weather SDK for Dart #

A lightweight Dart SDK to fetch current weather data using the OpenWeatherMap API. Simple to use, ideal for Flutter and Dart apps.


✨ Features #

  • 🌐 Fetch current weather by city name
  • 📦 Clean and minimal API client
  • 📊 Returns typed WeatherData object
  • 🚨 Handles API errors gracefully

🚀 Installation #

Add this to your pubspec.yaml:

dependencies:
  weather_sdk: ^0.0.1

Usage #

import 'package:weather_sdk/weather_sdk.dart';

void main() async {
  final client = WeatherClient(apiKey: 'YOUR_API_KEY');

  try {
    final weather = await client.getCurrentWeather('London');
    print(weather); // Example: London: 15.0°C, light rain
  } catch (e) {
    print('Failed to fetch weather: \$e');
  }
}

Sample output #

London: 18.3°C, clear sky

0
likes
130
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

A simple Dart SDK to fetch current weather using OpenWeatherMapAPI.

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on weather_sdk