ms_ean_db 0.1.0 copy "ms_ean_db: ^0.1.0" to clipboard
ms_ean_db: ^0.1.0 copied to clipboard

A Dart package to access the EAN database API for product information.

Pub GitHub stars Buy Me A Coffee donate button

A simple client of EAN-DB API, a database of EAN codes with more than 64 M barcodes.

Features #

  • Search for EAN codes

Getting started #

Create an account at EAN-DB to get your API token.

You can find your API token in your account settings after logging here.

Usage #

To use this package, add ms_ean_db as a dependency in your pubspec.yaml file.

flutter pub add ms_ean_db

Then, import the package in your Dart code:

import 'package:ms_ean_db/ms_ean_db.dart';

So you can use the EanDb class to interact

void main() async {
  final eanDb = EanDb(token: 'YOUR_API_TOKEN');
  final accountResponse = await eanDb.getAccount();
  print('Account: ${accountResponse.data.primaryEmail}'); // Account: [email protected]
  print('Balance: ${accountResponse.data.balance}'); // Balance: 123
  final product = await eanDb.barcodeLookup('7896051135425');
  print('Product: ${product.titles.get('pt')}'); // Output: Product: Manteiga de Primeira Qualidade com Sal
}

Thanks #

I would like to thank EAN-DB for providing this API and allowing us to use it in our projects.

I hope this package helps you to easily integrate EAN code search functionality into your Flutter applications. Consider supporting the project by buying me a coffee if you find it useful.

1
likes
140
points
12
downloads

Publisher

verified publishermarcussoftware.info

Weekly Downloads

A Dart package to access the EAN database API for product information.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, http

More

Packages that depend on ms_ean_db