Country Languages API - Dart/Flutter Client

Country Languages lists official and commonly spoken languages for any country using its two-letter ISO code. It returns the common country name, formal official name, an array of recognized languages, and the total language count.

pub package License: MIT

This is the Dart/Flutter client for the Country Languages API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_countrylanguages: ^1.2.2

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_countrylanguages/apiverve_countrylanguages.dart';

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

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

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

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "country": "ZW",
    "name": "Zimbabwe",
    "officialName": "Republic of Zimbabwe",
    "officialLanguages": [
      "Chibarwe",
      "English",
      "Kalanga",
      "Khoisan",
      "Ndau",
      "Northern Ndebele",
      "Chewa",
      "Shona",
      "Sotho",
      "Tonga",
      "Tswana",
      "Tsonga",
      "Venda",
      "Xhosa",
      "Zimbabwean Sign Language"
    ],
    "officialLanguageCount": 15
  }
}

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_countrylanguages
Country Languages API client for Dart/Flutter