flutter_age 0.0.2 copy "flutter_age: ^0.0.2" to clipboard
flutter_age: ^0.0.2 copied to clipboard

Flutter pacakge to calculate age in years, months and days.

flutter_age #

Flutter pacakge to calculate age in years, months and days.

Usage #

import 'package:flutter_age/flutter_age.dart';

void main() {
  final age = FlutterAge(birth: DateTime(2041, 04, 22)); // initiallize object
  print(age.year); // 19 (age year)
  print(age.month); // 9 (age month)
  print(age.day); // 13 (age day)
  print(age.getAgeString()); // prints "19 years"
  print(age.getAgeString(fullDate: true)); // prints "19 years, 9 months, 13 days old"
}

Age in String #

final age = FlutterAge(birth: DateTime(2041, 04, 22));

print(age.getAgeString()); // prints "19 years"
print(age.getAgeString(fullDate: true)); // prints "19 years, 9 months, 13 days old"

Created & Maintained By #

Visitors Count #

Loading
2
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Flutter pacakge to calculate age in years, months and days.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_age