open_weather_map_client 1.0.2 copy "open_weather_map_client: ^1.0.2" to clipboard
open_weather_map_client: ^1.0.2 copied to clipboard

Package that communicates with Open Weather Map to obtain climate data in a model.

example/lib/main.dart

import 'package:example/src/current_weather/current_weather_view.dart';
import 'package:example/src/home/home_view.dart';
import 'package:example/src/not_found/not_found_view.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter open_weather_map_client example',
      initialRoute: '/',
      onGenerateRoute: (settings) {
        return MaterialPageRoute(
          builder: (context) {
            switch (settings.name) {
              case CurrentWeatherView.routeName:
                return const CurrentWeatherView();
              case HomeView.routeName:
                return const HomeView();
              default:
                return const NotFoundView();
            }
          },
          settings: settings,
        );
      },
    );
  }
}
3
likes
105
pub points
25%
popularity

Publisher

verified publisheralexastudillo.com

Package that communicates with Open Weather Map to obtain climate data in a model.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause-Views (LICENSE)

Dependencies

flutter, http

More

Packages that depend on open_weather_map_client