flutter_age 0.0.2
flutter_age: ^0.0.2 copied to clipboard

Flutter Android iOS Linux macOS web Windows

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
1
likes
70
pub points
10%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

sindhuaniket@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_age