Cordova pugin definitions for use in Dart projects.

Generally speaking, any interactions with plugins should happen after the "deviceReady" event has fired. See example for a simple implementation.

Supported plugins

  • Device
  • Platform (property)
  • UUID (property)
  • Splashscreen
  • show();
  • hide();
  • AdMob (Pro Version)
  • createBanner(BannerOptions options);
  • hideBanner();
  • showBanner(int position);
  • showBannerAtXY(int x, int y);
  • removeBanner();
  • prepareInterstitial(InterstitialOptions options);
  • showInterstitial();
  • In-app Purchase
  • ProductEvent when(String v);
  • refresh();
  • order(String v);
  • ready(Function v);
  • register(StoreProduct product);
  • Google Analytics
  • startTrackerWithId(String v);
  • trackView(String v);
  • trackEvent(String category, String action, String label, num v);
  • trackException(String description, bool fatal);
  • trackTiming(String category, num intervalInMilliseconds, String v, String label);
  • addTransaction(String id, String affiliation, num revenue, num tax, num shipping, String currencyCode);
  • addTransactionItem(String id, String name, String sku, String category, num price, num quantity, String currencyCode);
  • addCustomDimension(String key, String value, Function success, Function error);
  • setUserId(String id);
  • debugMode();
  • enableUncaughtExceptionReporting(bool enable, Function success, Function error);


A simple usage example:

import 'dart:html';
import 'package:dartins/dartins.dart';

main() {

	    //Device Example
	    var currentPlatform = Device.platform;
	    print('Currently using a ${currentPlatform} device');

	    //Splashscreen Example

	    //AdMob example
	    AdMob.createBanner(new BannerOptions(
			adId: 'cx-xxx',
			position: AdMobPosition.BOTTOM_CENTER.index,
			isTesting: Device.UUID == '123123',
			overlap: true

		//Store example
		Store.register(new StoreProduct(id: 'product1', type: StoreProduct.NON_CONSUMABLE));
        Store.when('product1').approved(allowInterop((var product){
            print('Successfully bought product1');
        Store.when('product1').owned(allowInterop((var product){
            print('Owns product1');

        //Analytics example
        GoogleAnalytics.trackEvent('AppState', 'started');