flutter_age

Last updated:

0 purchases

flutter_age Image
flutter_age Images
Add to Cart

Description:

flutter age

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"
}
copied to clipboard
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"

copied to clipboard
Created & Maintained By #

Aniket Sindhu (Twitter)

Visitors Count #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.