Skip to main content

whatsup 1.0.6 copy "whatsup: ^1.0.6" to clipboard
whatsup: ^1.0.6 copied to clipboard

A lightweight package to return time-based greetings like "Good morning" or "Good afternoon" from a given datetime.

example/whatsup.dart

// ignore_for_file: avoid_print

import 'package:whatsup/whatsup.dart';

void main() {
  // Get greeting based on specific hour
  print(Whatsup.now(hour: 5)); // "Good morning"

  // Get greeting without prefix
  print(Whatsup.now(hour: 12, prefix: false)); // "Afternoon"

  // Get day name (1 = Monday, 7 = Sunday)
  print(Whatsup.nameOfDay(day: 1)); // "Monday"

  // Get month name (1 = January, 12 = December)
  print(Whatsup.nameOfMonth(month: 1)); // "January"
}
2
likes
160
points
351
downloads

Documentation

API reference

Publisher

verified publishermofunetive.site

Weekly Downloads

A lightweight package to return time-based greetings like "Good morning" or "Good afternoon" from a given datetime.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on whatsup