Hereβs a professional and developer-friendly README.md file for your Flutter library named sunny_weather:
# π€οΈ sunny_weather
`sunny_weather` is a Flutter library that allows developers to easily fetch the current weather of any location and display beautiful weather-specific UIs like clouds, rain, and sunny scenes.
## β¨ Features
- π Fetch real-time weather for any location (using coordinates or city name)
- π₯οΈ Dynamic weather-based UI:
- Sunny View
- Cloudy View
- Rainy View
- π§© Easily pluggable into any Flutter app
- π§ Clean and customizable widgets
## π¦ Installation
Add this to your `pubspec.yaml`:
```yaml
dependencies:
sunny_weather: ^1.0.0
Then run:
flutter pub get
π οΈ Usage
1. Import the package
import 'package:sunny_weather/sunny_weather.dart';
2. Fetch Weather
final weather = await SunnyWeather.getWeather(
latitude: 28.6139,
longitude: 77.2090,
);
3. Display Weather UI
Widget build(BuildContext context) {
return WeatherDisplayWidget(weatherData: weather);
}
WeatherDisplayWidgetautomatically chooses the UI based on the weather condition (sunny, rainy, cloudy).
π§ Customization
You can customize the weather UI styles by overriding properties in WeatherDisplayWidget.
WeatherDisplayWidget(
weatherData: weather,
sunnyIcon: Icons.wb_sunny,
rainyAnimation: MyCustomRainAnimation(),
)
π Location Support
This package can use device GPS or manual location input. For location-based fetch, ensure to ask permission using a plugin like geolocator.
πΈ Screenshots
| Sunny | Rainy | Cloudy |
|---|---|---|
![]() |
![]() |
![]() |
π TODO
- Add support for more weather types (e.g. snow, storm)
- Offline caching
- Unit tests
π License
MIT License. See LICENSE for details.
Made with β€οΈ by [Your Name or Organization]
---
Let me know if you'd like:
- A sample project included
- Instructions on publishing to `pub.dev`
- Auto-detect location sample using `geolocator` or `location` plugin


