weather_svg_icons 0.3.0
weather_svg_icons: ^0.3.0 copied to clipboard
Static and animated SVG weather icons for Flutter, with WMO code mapping and an Icon-style widget API.
example/main.dart
import 'package:flutter/material.dart';
import 'package:weather_svg_icons/weather_svg_icons.dart';
void main() => runApp(const WeatherSvgIconsExample());
class WeatherSvgIconsExample extends StatelessWidget {
const WeatherSvgIconsExample({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(title: const Text('Weather SVG Icons')),
body: Center(
child: Wrap(
spacing: 24,
runSpacing: 24,
alignment: WrapAlignment.center,
children: [
WeatherSvgIcon.byCode(
0,
isDay: true,
animated: true,
size: 72,
),
const WeatherSvgIcon(
WeatherSvgIcons.rain,
size: 72,
),
const WeatherSvgIcon(
WeatherSvgIcons.snow,
size: 72,
),
const WeatherSvgIcon(
WeatherSvgIcons.thunderstorms,
size: 72,
),
],
),
),
),
);
}
}