trackCustomEvent static method

Future<bool> trackCustomEvent(
  1. String event,
  2. Map<String, String> properties
)

Implementation

static Future<bool> trackCustomEvent(
    String event, Map<String, String> properties) {
  Map<String, dynamic> eventData = {
    'eventName': event,
    'eventData': properties
  };
  return NativeBridge.sync(
          'Analytics.trackCustomEvent', jsonEncode(eventData))
      .then((result) => jsonDecode(result)['result'] == true);
}