weather_unit 1.1.2 copy "weather_unit: ^1.1.2" to clipboard
weather_unit: ^1.1.2 copied to clipboard

Providing weather unit in Dart with display, compare and convert unit.

example/main.dart

import 'package:weather_unit/weather_unit.dart';

void main() {
  // Sample temperature is 25.5°C
  final Celsius demoTemp = Celsius(25.5);

  // Sample humidity is 75%
  final Humidity demoHumid = Humidity(75);

  // Print result: {temperature: 25.5°C, humidity: 75%}
  print({"temperature": demoTemp.toString(), "humidity": demoHumid.toString()});

  // Convert to Fahrenheit
  print(demoTemp.toString() +
      " in Fahrenheit is " +
      demoTemp.toFahrenheit.toString());
}
0
likes
145
pub points
0%
popularity

Publisher

unverified uploader

Providing weather unit in Dart with display, compare and convert unit.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

CC0-1.0 (license)

More

Packages that depend on weather_unit