https://github.com/marcus-software/ms_ean_db
A Dart package to access the EAN database API for product information.
https://github.com/marcus-software/ms_ean_db
Last synced: 8 months ago
JSON representation
A Dart package to access the EAN database API for product information.
- Host: GitHub
- URL: https://github.com/marcus-software/ms_ean_db
- Owner: Marcus-Software
- License: mit
- Created: 2025-06-18T02:39:59.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-07-28T22:36:33.000Z (10 months ago)
- Last Synced: 2025-07-29T00:23:01.343Z (10 months ago)
- Language: Dart
- Size: 24.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pub.dartlang.org/packages/ms_ean_db)
[](https://github.com/Marcus-Software/ms_ean_db)
A simple client of [EAN-DB](https://ean-db.com/) 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](https://ean-db.com/) to get your API token.
You can find your API token in your account settings after logging [here](https://ean-db.com/account).
## Usage
To use this package, add `ms_ean_db` as a dependency in your `pubspec.yaml` file.
```shell
flutter pub add ms_ean_db
```
Then, import the package in your Dart code:
```dart
import 'package:ms_ean_db/ms_ean_db.dart';
```
So you can use the `EanDb` class to interact
```dart
void main() async {
final eanDb = EanDb(token: 'YOUR_API_TOKEN');
final accountResponse = await eanDb.getAccount();
print('Account: ${accountResponse.data.primaryEmail}'); // Account: your_nice_email@host.com
print('Balance: ${accountResponse.data.balance}'); // Balance: 123
final productResponse = await eanDb.barcodeLookup('7896051135425');
print(
'Product: ${productResponse.data?.titles.get('pt')}',
); // Output: Product: Manteiga de Primeira Qualidade com Sal
}
```
## Thanks
I would like to thank [EAN-DB](https://ean-db.com/) 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](https://www.buymeacoffee.com/marcusedu) if you find it useful.