Age Calculator API - Dart/Flutter Client

Age Calculator is a simple tool for calculating age from the date of birth. It returns the calculated age based on the date of birth provided.

pub package License: MIT

This is the Dart/Flutter client for the Age Calculator API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_agecalculator: ^1.1.14

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_agecalculator/apiverve_agecalculator.dart';

void main() async {
  final client = AgecalculatorClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'dob': '1990-08-02'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "dob": "1990-01-01",
    "age_years": 35,
    "age_months": 421,
    "age_weeks": 1833,
    "age_days": 12834,
    "age_words": {
      "years": "thirty-five",
      "ordinal": "thirty-fifth",
      "full": "thirty-five years old"
    }
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_agecalculator
Age Calculator API client for Dart/Flutter