Last updated:
0 purchases
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 #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.