open_weather_widget 0.0.3 copy "open_weather_widget: ^0.0.3" to clipboard
open_weather_widget: ^0.0.3 copied to clipboard

A Flutter package that provides an easy-to-use weather widget powered by Open Weather Map.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:open_weather_widget/open_weather_widget.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  MyApp({Key? key}) : super(key: key);
  String apiKey = "378fd4e950bba4a2cs12734b760d69afe";

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.grey,
        appBar: AppBar(
          title: Text("Weather Widget Example"),
        ),
        body: Center(
          child: OpenWeatherWidget(
            latitude: 22.550460,
            longitude: 88.347311,
            location: "Kolkata",
            height: 180,
            apiKey: apiKey,
            alignment: MainAxisAlignment.center,
            margin: EdgeInsets.all(5),
          ),
        ),
      ),
    );
  }
}
12
likes
100
pub points
44%
popularity

Publisher

unverified uploader

A Flutter package that provides an easy-to-use weather widget powered by Open Weather Map.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dio, flutter, intl, rxdart

More

Packages that depend on open_weather_widget