This SDK aims to help the development of integrations with Mpost that use Dart

Mpost Flutter Library

This SDK aims to help the development of integrations with Mpost that use Dart, providing an easy interface to communicate with Mpost’s REST API. It’s multi-platform, and supports mobile, desktop, and the browser.

Usage

You can keep open a persistent connection by using a [Mpost] Object initialised with your [api-key]

import 'package:mpost_sdk/mpost/Mpost.dart';
import 'package:mpost_sdk/models/distance.dart';
Mpost mpost = Mpost().initializeWithApiKey("=======ENTER KEY HERE======");

//calculateDistance
Distance distance = await  mpost.calculateDistance(distanceRequest);

//createDeliveryRequest
DeliveryRequest deliveryRequest = await mpost.createDeliveryRequest(newDeliveryRequest);

Available methods

  • getDeliveryRequests(queryObject)
  • getDeliveryRequestById(queryObject)
  • createDeliveryRequest(queryObject)
  • calculateDistance(queryObject)

Creating Delivery Request Case Study

GitHub

View Github