Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Country Calling Code API - Dart/Flutter Client

Country Calling Code is a simple tool for getting the country's international dialing codes. It returns the country's international dialing codes.

pub package License: MIT

This is the Dart/Flutter client for the Country Calling Code API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_callingcode: ^1.1.14

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_callingcode/apiverve_callingcode.dart';

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

  try {
    final response = await client.execute({
      'country': 'FR'
    });

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

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "country": "France",
    "officialName": "French Republic",
    "countryCode": "FR",
    "callingcodes": [
      "+33"
    ]
  }
}

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