Menu

1 / 5

dz_delivery: typed Dart clients for Algerian delivery companies

DEV Community: mobile·Abdeldjalil Chougui·1 day ago
#pRaoYjbx
#devtomobile#devto#dev#provider#express
Reading 0:00
15s threshold

A shop app or a backend that ships parcels in Algeria has the same few jobs to do with a delivery company: create parcels, quote the delivery fee for a wilaya, get a label, and follow each parcel until the cash on delivery is collected. Each delivery company has its own API, its own field names and its own list of status strings.

So the integration code is written once per company, and each one leaks into the rest of the app: a different JSON shape for the parcel, a different way to say "out for delivery", a different error when the phone number is wrong.

dz_delivery is a Dart package that puts those APIs behind one typed interface, DeliveryProvider , usable from a Flutter app or a Dart backend.

There is a caveat, and the README puts it at the top: the package is unverified against the live API . Every client in it was built from the provider's public API documentation, not from live traffic, because no API keys were available.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.