DataKick SDK

SDK to interface with datakick.com

There are 3 constructors

///Default product
product();
///empty product
product.empty();
///product with just the food parameters
product.food();

Getting, setting and updating product info is easy

///create an object
Product product = new Product.empty();

/// Then pass a barcode to the object and wait for the future
product.getBarcode("00000000000000").then((product) {
    ///Now you can work with your product here...

    // change the name of the product
    product.name = "new name";
    product.update();
}

You can store a list of products in a productmap object as well.

///Datakick will retrieve 100 products at a time.
dataKickList(dkl).then(expectAsync1((ProductMap pro3) {
  ///Calling this recursively will grow the list by 100
  ///products at a time.
  dataKickList(pro3).then(expectAsync1((ProductMap pro4) {
    /// list would now have 200 entries.
  }));
}));

package Road map:

  • Initial commit contains just enough to:
    • Get by barcode
    • Update products
    • create products
    • list products (100 at a time. Resubmit the product back to the list function to grow it by the next 100 products)

TODO:

  • Add functionality for camera plugin to create a widget (v0.3.0)
  • Add functionality for adding images (v1.0.0)
  • Add functionality for updating or modifying images (version undetermined)
  • Add functionality for image removal (version undetermined)
  • Add functionality for image data parsing through ML/AI (v2.0.0)

Libraries

datakick_sdk

Dart

dart:ui
Built-in types and core primitives for a Flutter application. [...]

Core

dart:async
Support for asynchronous programming, with classes such as Future and Stream. [...]
dart:collection
Classes and utilities that supplement the collection support in dart:core. [...]
dart:convert
Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
dart:core
Built-in types, collections, and other core functionality for every Dart program. [...]
dart:developer
Interact with developer tools such as the debugger and inspector. [...]
dart:math
Mathematical constants and functions, plus a random number generator. [...]
dart:typed_data
Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]

VM

dart:io
File, socket, HTTP, and other I/O support for non-web applications. [...]
dart:isolate
Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]